Few small optimizations here and there
This commit is contained in:
1 parent
0f9c7106ce
commit
8bb777ef5c
35 files changed
+366
-373
No files matched your search
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user