• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Most retarded debug much?

Alrighty, everytime a MONSTER speaks, i get debugged.
anyone kno why the hell this happens?

Wrong speak class at source?

Code:
void Monster::onThinkYell(uint32_t interval)
{
	if(mType->yellSpeedTicks > 0)
	{
		yellTicks += interval;
		if(yellTicks >= mType->yellSpeedTicks)
		{
			yellTicks = 0;
			if(!mType->voiceVector.empty() && (mType->yellChance >= (uint32_t)random_range(1, 100)))
			{
				uint32_t index = random_range(0, mType->voiceVector.size() - 1);
				const voiceBlock_t& vb = mType->voiceVector[index];
				if(vb.yellText)
					g_game.internalCreatureSay(this, SPEAK_MONSTER_YELL, vb.text);
				else
					g_game.internalCreatureSay(this, SPEAK_MONSTER_SAY, vb.text);
			}
		}
	}
}

Code:
enum SpeakClasses
{
	SPEAK_CLASS_FIRST 	= 0x01,
	SPEAK_SAY			= SPEAK_CLASS_FIRST,
	SPEAK_WHISPER		= 0x02,
	SPEAK_YELL			= 0x03,
	SPEAK_PRIVATE_PN	= 0x04,
	SPEAK_PRIVATE_NP	= 0x05,
	SPEAK_PRIVATE		= 0x06,
	SPEAK_CHANNEL_Y		= 0x07,
	SPEAK_RVR_CHANNEL	= 0x08,
	SPEAK_RVR_ANSWER	= 0x09,
	SPEAK_RVR_CONTINUE	= 0x0A,
	SPEAK_BROADCAST		= 0x0B,
	SPEAK_CHANNEL_R1	= 0x0C, //red - #c text
	SPEAK_PRIVATE_RED	= 0x0D,	//@name@text
	SPEAK_CHANNEL_O		= 0x0E,
	SPEAK_UNKNOWN_1		= 0x0F,
	SPEAK_CHANNEL_R2	= 0x10,	//red anonymous - #d text
	SPEAK_UNKNOWN_2		= 0x11,
	SPEAK_MONSTER_SAY	= 0x12,
	SPEAK_MONSTER_YELL	= 0x13,
	SPEAK_CLASS_LAST 	= SPEAK_MONSTER_YELL
};

Monster.cpp / const.h
 
Back
Top