Core/Scripts: return const modifier to Player methods back (should restore compilation for those with custom scripts).

NOTE: The main idea of original change is to allow scripts change content of message so that calling method sends modified message to client.
For example, moderating script which cuts illegal words from message.

--HG--
branch : trunk
This commit is contained in:
azazel
2010-11-18 10:26:34 +06:00
parent 3de2f6af01
commit 87d723405e
5 changed files with 39 additions and 36 deletions

View File

@@ -625,18 +625,18 @@ public:
if (say_timer <= diff)
{
say_timer = 3000;
Player *plr = SelectRandomPlayer(100.0f,false);
Player *plr = SelectRandomPlayer(100.0f, false);
if (count < 3)
{
if (plr)
plr->Say(std::string(Text[count]),0);
plr->Say(Text[count], 0);
}
else
{
DoCast(me, SPELL_RHYME_BIG);
if (plr)
{
plr->Say(std::string(Text[count]),0);
plr->Say(Text[count], 0);
plr->HandleEmoteCommand(ANIM_EMOTE_SHOUT);
}
wp_reached = true;

View File

@@ -270,8 +270,9 @@ public:
return false;
else
{
//This should be sent to the player as red text.
pPlayer->Say(std::string("You have created enough ghouls. Return to Gothik the Harvester at Death's Breach."), LANG_UNIVERSAL);
// This should be sent to the player as red text.
// TODO: Text should be moved to DB
pPlayer->Say("You have created enough ghouls. Return to Gothik the Harvester at Death's Breach.", LANG_UNIVERSAL);
return true;
}
}