From 87d723405e5d34bc9b16656f6bf30a48d010c50d Mon Sep 17 00:00:00 2001 From: azazel Date: Thu, 18 Nov 2010 10:26:34 +0600 Subject: 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 --- .../EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp | 6 +++--- src/server/scripts/World/item_scripts.cpp | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'src/server/scripts') diff --git a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp index 71d896fc914..4dd7081d836 100644 --- a/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp +++ b/src/server/scripts/EasternKingdoms/ScarletMonastery/boss_headless_horseman.cpp @@ -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; diff --git a/src/server/scripts/World/item_scripts.cpp b/src/server/scripts/World/item_scripts.cpp index 9f0b5cbf6c0..8500c289119 100644 --- a/src/server/scripts/World/item_scripts.cpp +++ b/src/server/scripts/World/item_scripts.cpp @@ -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; } } -- cgit v1.2.3