[7279] Allow equipped items loading at relogin to arena map. Author: Lightguard
--HG-- branch : trunk
This commit is contained in:
+9
-5
@@ -10213,11 +10213,6 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
|
|||||||
ItemPrototype const *pProto = pItem->GetProto();
|
ItemPrototype const *pProto = pItem->GetProto();
|
||||||
if( pProto )
|
if( pProto )
|
||||||
{
|
{
|
||||||
// May be here should be more stronger checks; STUNNED checked
|
|
||||||
// ROOT, CONFUSED, DISTRACTED, FLEEING this needs to be checked.
|
|
||||||
if (not_loading && hasUnitState(UNIT_STAT_STUNNED))
|
|
||||||
return EQUIP_ERR_YOU_ARE_STUNNED;
|
|
||||||
|
|
||||||
if(pItem->IsBindedNotWith(GetGUID()))
|
if(pItem->IsBindedNotWith(GetGUID()))
|
||||||
return EQUIP_ERR_DONT_OWN_THAT_ITEM;
|
return EQUIP_ERR_DONT_OWN_THAT_ITEM;
|
||||||
|
|
||||||
@@ -10226,6 +10221,14 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
|
|||||||
if(res != EQUIP_ERR_OK)
|
if(res != EQUIP_ERR_OK)
|
||||||
return res;
|
return res;
|
||||||
|
|
||||||
|
// check this only in game
|
||||||
|
if(not_loading)
|
||||||
|
{
|
||||||
|
// May be here should be more stronger checks; STUNNED checked
|
||||||
|
// ROOT, CONFUSED, DISTRACTED, FLEEING this needs to be checked.
|
||||||
|
if (hasUnitState(UNIT_STAT_STUNNED))
|
||||||
|
return EQUIP_ERR_YOU_ARE_STUNNED;
|
||||||
|
|
||||||
// do not allow equipping gear except weapons, offhands, projectiles, relics in
|
// do not allow equipping gear except weapons, offhands, projectiles, relics in
|
||||||
// - combat
|
// - combat
|
||||||
// - in-progress arenas
|
// - in-progress arenas
|
||||||
@@ -10244,6 +10247,7 @@ uint8 Player::CanEquipItem( uint8 slot, uint16 &dest, Item *pItem, bool swap, bo
|
|||||||
|
|
||||||
if(IsNonMeleeSpellCasted(false))
|
if(IsNonMeleeSpellCasted(false))
|
||||||
return EQUIP_ERR_CANT_DO_RIGHT_NOW;
|
return EQUIP_ERR_CANT_DO_RIGHT_NOW;
|
||||||
|
}
|
||||||
|
|
||||||
uint8 eslot = FindEquipSlot( pProto, slot, swap );
|
uint8 eslot = FindEquipSlot( pProto, slot, swap );
|
||||||
if( eslot == NULL_SLOT )
|
if( eslot == NULL_SLOT )
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7278"
|
#define REVISION_NR "7279"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user