Hi everybody!
I don't know if this is the right forum because it has to do with MaNGOS and ScriptDev2, I will post this here. Also if it's the wrong section, please move it
I noticed that many boss encounter addons don't work and I researched in the lua scripts. The "problem" is plain easy:
MaNGOS adds a space after the name of the NPC doing the emote. e.g. "[big tied up Mob (I hope you know who I mean ] 's bonds begin to weaken!"
Here is what I've changed to remove the space...
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 24ce65d..ac1f301 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -1301,9 +1301,9 @@ void WorldObject::BuildMonsterChat(WorldPacket *data, uint8 msgtype, char const*
*data << (uint32)1; // target name length
*data << (uint8)0; // target name
}
- *data << (uint32)(strlen(text)+1+(pre?3:0));
+ *data << (uint32)(strlen(text)+1+(pre?2:0));
if(pre)
- data->append("%s ",3);
+ data->append("%s",2);
*data << text;
*data << (uint8)0; // ChatTag
}
It works great if the emote is triggered by ScriptDev2's DoScriptText. If you use ".npc textemote begins to..." there's one space missing "[NPC]begins to..." but as we all know SD2 just use MaNGOS functions, so it cant be the problem.
I hope you understand what I mean and help fix this
bye
HiTmAn