Core/Misc: fix compiler warnings
This commit is contained in:
@@ -155,7 +155,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
mUseTextTimer = true;
|
||||
sCreatureTextMgr->SendChat(talker, uint8(e.action.talk.textGroupID), mTextGUID);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_TALK: talker: %s (GuidLow: %u), textGuid: %u",
|
||||
talker->GetName(), talker->GetGUIDLow(), mTextGUID);
|
||||
talker->GetName(), talker->GetGUIDLow(), GUID_LOPART(mTextGUID));
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_SIMPLE_TALK:
|
||||
@@ -449,7 +449,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
{
|
||||
(*itr)->ToPlayer()->CastedCreatureOrGO(e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_SEND_CASTCREATUREORGO: Player guidLow %u.org Creature: %u, BaseObject GUID: "UI64FMTD" , Spell: %u",
|
||||
e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell);
|
||||
(*itr)->GetGUIDLow(), e.action.castedCreatureOrGO.creature, GetBaseObject()->GetGUID(), e.action.castedCreatureOrGO.spell);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -499,8 +499,8 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
tempLastInvoker->InterruptNonMeleeSpells(false);
|
||||
|
||||
tempLastInvoker->CastSpell((*itr)->ToUnit(), e.action.cast.spell, (e.action.cast.flags & SMARTCAST_TRIGGERED) ? true : false);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell % on target %u with castflags %u",
|
||||
tempLastInvoker->GetGUIDLow(), (*itr)->GetGUIDLow(), e.action.cast.spell, e.action.cast.flags);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction:: SMART_ACTION_INVOKER_CAST: Invoker %u casts spell %u on target %u with castflags %u",
|
||||
tempLastInvoker->GetGUIDLow(), e.action.cast.spell, (*itr)->GetGUIDLow(), e.action.cast.flags);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -873,7 +873,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
||||
|
||||
me->UpdateEntry(e.action.updateTemplate.creature, e.action.updateTemplate.team ? HORDE : ALLIANCE);
|
||||
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_UPDATE_TEMPLATE: Creature %u, Template: %u, Team: %u",
|
||||
me->GetGUIDLow(), e.action.updateTemplate.team ? HORDE : ALLIANCE);
|
||||
me->GetGUIDLow(), me->GetEntry(), e.action.updateTemplate.team ? HORDE : ALLIANCE);
|
||||
break;
|
||||
}
|
||||
case SMART_ACTION_DIE:
|
||||
|
||||
@@ -127,7 +127,7 @@ bool ArenaTeam::AddMember(const uint64& playerGuid)
|
||||
// Check if player is already in a similar arena team
|
||||
if (player && player->GetArenaTeamId(GetSlot()) || Player::GetArenaTeamIdFromDB(playerGuid, GetType()) != 0)
|
||||
{
|
||||
sLog->outError("Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), playerGuid, GetType());
|
||||
sLog->outError("Arena: Player %s (guid: %u) already has an arena team of type %u", playerName.c_str(), GUID_LOPART(playerGuid), GetType());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -186,7 +186,7 @@ bool ArenaTeam::AddMember(const uint64& playerGuid)
|
||||
player->SetArenaTeamInfoField(GetSlot(), ARENA_TEAM_MEMBER, 1);
|
||||
}
|
||||
|
||||
sLog->outArena("Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), playerGuid, GetType(), GetId());
|
||||
sLog->outArena("Player: %s [GUID: %u] joined arena team type: %u [Id: %u].", playerName.c_str(), GUID_LOPART(playerGuid), GetType(), GetId());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1230,32 +1230,29 @@ bool ChatHandler::HandleLookupCreatureCommand(const char *args)
|
||||
{
|
||||
uint32 id = itr->second.Entry;
|
||||
uint8 localeIndex = GetSessionDbLocaleIndex();
|
||||
if (localeIndex >= 0)
|
||||
if (CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(id))
|
||||
{
|
||||
if (CreatureLocale const *cl = sObjectMgr->GetCreatureLocale(id))
|
||||
if (cl->Name.size() > localeIndex && !cl->Name[localeIndex].empty ())
|
||||
{
|
||||
if (cl->Name.size() > localeIndex && !cl->Name[localeIndex].empty ())
|
||||
std::string name = cl->Name[localeIndex];
|
||||
|
||||
if (Utf8FitTo (name, wnamepart))
|
||||
{
|
||||
std::string name = cl->Name[localeIndex];
|
||||
|
||||
if (Utf8FitTo (name, wnamepart))
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str ());
|
||||
else
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str ());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
|
||||
continue;
|
||||
PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CHAT, id, id, name.c_str ());
|
||||
else
|
||||
PSendSysMessage (LANG_CREATURE_ENTRY_LIST_CONSOLE, id, name.c_str ());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1310,32 +1307,29 @@ bool ChatHandler::HandleLookupObjectCommand(const char *args)
|
||||
for (GameObjectTemplateContainer::const_iterator itr = gotc->begin(); itr != gotc->end(); ++itr)
|
||||
{
|
||||
uint8 localeIndex = GetSessionDbLocaleIndex();
|
||||
if (localeIndex >= 0)
|
||||
if (GameObjectLocale const *gl = sObjectMgr->GetGameObjectLocale(itr->second.entry))
|
||||
{
|
||||
if (GameObjectLocale const *gl = sObjectMgr->GetGameObjectLocale(itr->second.entry))
|
||||
if (gl->Name.size() > localeIndex && !gl->Name[localeIndex].empty())
|
||||
{
|
||||
if (gl->Name.size() > localeIndex && !gl->Name[localeIndex].empty())
|
||||
std::string name = gl->Name[localeIndex];
|
||||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
{
|
||||
std::string name = gl->Name[localeIndex];
|
||||
|
||||
if (Utf8FitTo(name, wnamepart))
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
if (maxResults && count++ == maxResults)
|
||||
{
|
||||
PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
|
||||
continue;
|
||||
PSendSysMessage(LANG_COMMAND_LOOKUP_MAX_RESULTS, maxResults);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CHAT, itr->second.entry, itr->second.entry, name.c_str());
|
||||
else
|
||||
PSendSysMessage(LANG_GO_ENTRY_LIST_CONSOLE, itr->second.entry, name.c_str());
|
||||
|
||||
if (!found)
|
||||
found = true;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9785,7 +9785,7 @@ uint8 Player::FindEquipSlot(ItemTemplate const* proto, uint32 slot, bool swap) c
|
||||
}
|
||||
}
|
||||
|
||||
if (Item* ohWeapon = GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
if (GetItemByPos(INVENTORY_SLOT_BAG_0, EQUIPMENT_SLOT_OFFHAND))
|
||||
{
|
||||
if (proto->SubClass == ITEM_SUBCLASS_WEAPON_POLEARM || proto->SubClass == ITEM_SUBCLASS_WEAPON_STAFF)
|
||||
{
|
||||
|
||||
@@ -15323,7 +15323,7 @@ void Unit::Kill(Unit *pVictim, bool durabilityLoss)
|
||||
}
|
||||
}
|
||||
|
||||
if (Vehicle* veh = pVictim->GetVehicle())
|
||||
if (pVictim->GetVehicle())
|
||||
pVictim->ExitVehicle();
|
||||
}
|
||||
|
||||
@@ -15446,7 +15446,7 @@ void Unit::SetRooted(bool apply)
|
||||
|
||||
// AddUnitMovementFlag(MOVEMENTFLAG_ROOT);
|
||||
|
||||
if (Player* thisPlr = this->ToPlayer())
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
WorldPacket data(SMSG_FORCE_MOVE_ROOT, 10);
|
||||
data.append(GetPackGUID());
|
||||
@@ -15465,7 +15465,7 @@ void Unit::SetRooted(bool apply)
|
||||
{
|
||||
if (!HasUnitState(UNIT_STAT_STUNNED)) // prevent allow move if have also stun effect
|
||||
{
|
||||
if (Player* thisPlr = this->ToPlayer())
|
||||
if (GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
WorldPacket data(SMSG_FORCE_MOVE_UNROOT, 10);
|
||||
data.append(GetPackGUID());
|
||||
|
||||
@@ -1133,9 +1133,7 @@ CreatureModelInfo const* ObjectMgr::GetCreatureModelRandomGender(uint32* display
|
||||
{
|
||||
CreatureModelInfo const *minfo_tmp = GetCreatureModelInfo(minfo->modelid_other_gender);
|
||||
if (!minfo_tmp)
|
||||
{
|
||||
sLog->outErrorDb("Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", displayID, minfo->modelid_other_gender);
|
||||
}
|
||||
sLog->outErrorDb("Model (Entry: %u) has modelid_other_gender %u not found in table `creature_model_info`. ", *displayID, minfo->modelid_other_gender);
|
||||
else
|
||||
{
|
||||
// Model ID changed
|
||||
|
||||
Reference in New Issue
Block a user