Few small optimizations here and there

This commit is contained in:
Aokromes committed 2017-02-01 16:51:21 +01:00
1 parent 0f9c7106ce
commit 8bb777ef5c
35 files changed
+366 -373

No files matched your search

+3 -6
View File
@@ -300,17 +300,14 @@ public:
if (!target)
{
PreparedStatement* stmt = CharacterDatabase.GetPreparedStatement(CHAR_SEL_GUID_BY_NAME);
stmt->setString(0, name);
PreparedQueryResult resultCharacter = CharacterDatabase.Query(stmt);
if (!resultCharacter)
ObjectGuid fullGuid = sWorld->GetCharacterGuidByName(name);
if (fullGuid.IsEmpty())
{
handler->PSendSysMessage(LANG_BANINFO_NOCHARACTER);
return false;
}
targetGuid = (*resultCharacter)[0].GetUInt32();
targetGuid = fullGuid.GetCounter();
}
else
targetGuid = target->GetGUID().GetCounter();