Core/Misc: fix compiler warnings
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user