aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Examples
diff options
context:
space:
mode:
authorSpp <spp@jorge.gr>2012-10-24 13:29:34 +0200
committerSpp <spp@jorge.gr>2012-10-24 15:34:48 +0200
commit013fb1f4d9131fc8ec45931445e6a05408dce8f9 (patch)
treedcdc34368a9a53d27826895b91683b7b7358c476 /src/server/scripts/Examples
parentca85c3b4759c111fa8dd277a037aab7a0968dbaf (diff)
Core/Misc: reduced amount of string memory allocations (Step I)
Diffstat (limited to 'src/server/scripts/Examples')
-rw-r--r--src/server/scripts/Examples/example_gossip_codebox.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/scripts/Examples/example_gossip_codebox.cpp b/src/server/scripts/Examples/example_gossip_codebox.cpp
index a5627c68ff6..d6936c8fb9e 100644
--- a/src/server/scripts/Examples/example_gossip_codebox.cpp
+++ b/src/server/scripts/Examples/example_gossip_codebox.cpp
@@ -72,7 +72,7 @@ class example_gossip_codebox : public CreatureScript
return true;
}
- bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, const char* code)
+ bool OnGossipSelectCode(Player* player, Creature* creature, uint32 sender, uint32 action, char const* code)
{
player->PlayerTalkClass->ClearMenus();
if (sender == GOSSIP_SENDER_MAIN)
@@ -80,7 +80,7 @@ class example_gossip_codebox : public CreatureScript
switch (action)
{
case GOSSIP_ACTION_INFO_DEF+1:
- if (std::strcmp(code, player->GetName()) != 0)
+ if (player->GetName() != code)
{
DoScriptText(SAY_WRONG, creature);
creature->CastSpell(player, SPELL_POLYMORPH, true);