Core/Misc: reduced amount of string memory allocations (Step I)

This commit is contained in:
Spp committed 2012-10-24 15:34:48 +02:00
1 parent ca85c3b475
commit 013fb1f4d9
91 files changed
+881 -890

No files matched your search

+6 -6
View File
@@ -1923,9 +1923,9 @@ public:
if (!target)
handler->SendSysMessage(LANG_MOVEGENS_CHASE_NULL);
else if (target->GetTypeId() == TYPEID_PLAYER)
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName(), target->GetGUIDLow());
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_PLAYER, target->GetName().c_str(), target->GetGUIDLow());
else
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName(), target->GetGUIDLow());
handler->PSendSysMessage(LANG_MOVEGENS_CHASE_CREATURE, target->GetName().c_str(), target->GetGUIDLow());
break;
}
case FOLLOW_MOTION_TYPE:
@@ -1939,9 +1939,9 @@ public:
if (!target)
handler->SendSysMessage(LANG_MOVEGENS_FOLLOW_NULL);
else if (target->GetTypeId() == TYPEID_PLAYER)
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName(), target->GetGUIDLow());
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_PLAYER, target->GetName().c_str(), target->GetGUIDLow());
else
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName(), target->GetGUIDLow());
handler->PSendSysMessage(LANG_MOVEGENS_FOLLOW_CREATURE, target->GetName().c_str(), target->GetGUIDLow());
break;
}
case HOME_MOTION_TYPE:
@@ -2534,7 +2534,7 @@ public:
{
name = TargetName;
normalizePlayerName(name);
player = sObjectAccessor->FindPlayerByName(name.c_str());
player = sObjectAccessor->FindPlayerByName(name);
}
if (!player)
@@ -2593,7 +2593,7 @@ public:
{
name = targetName;
normalizePlayerName(name);
player = sObjectAccessor->FindPlayerByName(name.c_str());
player = sObjectAccessor->FindPlayerByName(name);
}
else // If no name was entered - use target
{