Reinstate ITEM_FLAGS_NO_EQUIP_COOLDOWN implementation and the serverside checks for ITEM_FLAGS_INDESTRUCTIBLE (with prototypes this time)
--HG-- branch : trunk
This commit is contained in:
@@ -111,8 +111,9 @@ enum ITEM_FLAGS
|
|||||||
ITEM_FLAGS_OPENABLE = 0x00000004,
|
ITEM_FLAGS_OPENABLE = 0x00000004,
|
||||||
ITEM_FLAGS_WRAPPED = 0x00000008,
|
ITEM_FLAGS_WRAPPED = 0x00000008,
|
||||||
ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability == 0)
|
ITEM_FLAGS_BROKEN = 0x00000010, // appears red icon (like when item durability == 0)
|
||||||
ITEM_FLAGS_TOTEM = 0x00000020, // ?
|
ITEM_FLAGS_INDESTRUCTIBLE = 0x00000020, // Item can not be destroyed, except by using spell (item can be reagent for spell and then allowed)
|
||||||
ITEM_FLAGS_USABLE = 0x00000040, // ?
|
ITEM_FLAGS_USABLE = 0x00000040, // ?
|
||||||
|
ITEM_FLAGS_NO_EQUIP_COOLDOWN = 0x00000080, // ?
|
||||||
ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper
|
ITEM_FLAGS_WRAPPER = 0x00000200, // used or not used wrapper
|
||||||
ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not
|
ITEM_FLAGS_PARTY_LOOT = 0x00000800, // determines if item is party loot or not
|
||||||
ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase
|
ITEM_FLAGS_REFUNDABLE = 0x00001000, // item cost can be refunded within 2 hours after purchase
|
||||||
|
|||||||
@@ -21002,6 +21002,9 @@ void Player::SendInstanceResetWarning(uint32 mapid, Difficulty difficulty, uint3
|
|||||||
|
|
||||||
void Player::ApplyEquipCooldown(Item * pItem)
|
void Player::ApplyEquipCooldown(Item * pItem)
|
||||||
{
|
{
|
||||||
|
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_NO_EQUIP_COOLDOWN))
|
||||||
|
return;
|
||||||
|
|
||||||
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
for (uint8 i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
||||||
{
|
{
|
||||||
_Spell const& spellData = pItem->GetProto()->Spells[i];
|
_Spell const& spellData = pItem->GetProto()->Spells[i];
|
||||||
|
|||||||
@@ -113,7 +113,6 @@ bool Map::ExistVMap(uint32 mapid,int gx,int gy)
|
|||||||
{
|
{
|
||||||
if (vmgr->isMapLoadingEnabled())
|
if (vmgr->isMapLoadingEnabled())
|
||||||
{
|
{
|
||||||
// x and y are swapped !! => fixed now
|
|
||||||
bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(), mapid, gx,gy);
|
bool exists = vmgr->existsMap((sWorld.GetDataPath()+ "vmaps").c_str(), mapid, gx,gy);
|
||||||
if (!exists)
|
if (!exists)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -263,6 +263,12 @@ void WorldSession::HandleDestroyItemOpcode(WorldPacket & recv_data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_INDESTRUCTIBLE))
|
||||||
|
{
|
||||||
|
_player->SendEquipError(EQUIP_ERR_CANT_DROP_SOULBOUND, NULL, NULL);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
uint32 i_count = count;
|
uint32 i_count = count;
|
||||||
|
|||||||
Reference in New Issue
Block a user