Core/Misc: Another batch of fixes for issues found by static analysis
This commit is contained in:
1 parent
933f50558b
commit
7da33b6bce
6 files changed
+15
-53
No files matched your search
@@ -309,24 +309,14 @@ public:
|
||||
|
||||
if (!pfactionid)
|
||||
{
|
||||
if (target)
|
||||
{
|
||||
uint32 factionid = target->getFaction();
|
||||
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
}
|
||||
uint32 factionid = target->getFaction();
|
||||
uint32 flag = target->GetUInt32Value(UNIT_FIELD_FLAGS);
|
||||
uint32 npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
uint32 dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
handler->PSendSysMessage(LANG_CURRENT_FACTION, target->GetGUIDLow(), factionid, flag, npcflag, dyflag);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!target)
|
||||
{
|
||||
handler->SendSysMessage(LANG_NO_CHAR_SELECTED);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32 factionid = atoi(pfactionid);
|
||||
uint32 flag;
|
||||
|
||||
@@ -340,7 +330,7 @@ public:
|
||||
|
||||
uint32 npcflag;
|
||||
if (!pnpcflag)
|
||||
npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
npcflag = target->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
else
|
||||
npcflag = atoi(pnpcflag);
|
||||
|
||||
@@ -348,7 +338,7 @@ public:
|
||||
|
||||
uint32 dyflag;
|
||||
if (!pdyflag)
|
||||
dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
dyflag = target->GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
else
|
||||
dyflag = atoi(pdyflag);
|
||||
|
||||
|
||||
Reference in new issue
Block a user