mirror of
https://github.com/mangosfour/server.git
synced 2025-12-25 04:37:02 +00:00
more enum updates
This commit is contained in:
parent
20b4f6fa6d
commit
4813c7cde2
4 changed files with 17 additions and 17 deletions
|
|
@ -94,7 +94,7 @@ bool Bag::Create(uint32 guidlow, uint32 itemid, Player const* owner)
|
|||
// Cleaning 20 slots
|
||||
for (uint8 i = 0; i < MAX_BAG_SIZE; ++i)
|
||||
{
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT_1 + (i * 2), ObjectGuid());
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT + (i * 2), ObjectGuid());
|
||||
m_bagslot[i] = NULL;
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +116,7 @@ bool Bag::LoadFromDB(uint32 guidLow, Field* fields, ObjectGuid ownerGuid)
|
|||
// cleanup bag content related item value fields (its will be filled correctly from `character_inventory`)
|
||||
for (int i = 0; i < MAX_BAG_SIZE; ++i)
|
||||
{
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT_1 + (i * 2), ObjectGuid());
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT + (i * 2), ObjectGuid());
|
||||
|
||||
delete m_bagslot[i];
|
||||
m_bagslot[i] = NULL;
|
||||
|
|
@ -158,7 +158,7 @@ void Bag::RemoveItem(uint8 slot, bool /*update*/)
|
|||
}
|
||||
|
||||
m_bagslot[slot] = NULL;
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT_1 + (slot * 2), ObjectGuid());
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT + (slot * 2), ObjectGuid());
|
||||
}
|
||||
|
||||
void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/)
|
||||
|
|
@ -168,7 +168,7 @@ void Bag::StoreItem(uint8 slot, Item* pItem, bool /*update*/)
|
|||
if (pItem)
|
||||
{
|
||||
m_bagslot[slot] = pItem;
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT_1 + (slot * 2), pItem->GetObjectGuid());
|
||||
SetGuidValue(CONTAINER_FIELD_SLOT + (slot * 2), pItem->GetObjectGuid());
|
||||
pItem->SetGuidValue(ITEM_FIELD_CONTAINED, GetObjectGuid());
|
||||
pItem->SetGuidValue(ITEM_FIELD_OWNER, GetOwnerGuid());
|
||||
pItem->SetContainer(this);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
#include "ItemPrototype.h"
|
||||
#include "Item.h"
|
||||
|
||||
// Maximum 36 Slots ( (CONTAINER_END - CONTAINER_FIELD_SLOT_1)/2
|
||||
// Maximum 36 Slots ( (CONTAINER_END - CONTAINER_FIELD_SLOT)/2
|
||||
#define MAX_BAG_SIZE 36 // 2.0.12
|
||||
|
||||
class Bag : public Item
|
||||
|
|
|
|||
|
|
@ -481,8 +481,8 @@ bool Creature::UpdateEntry(uint32 Entry, Team team, const CreatureData* data /*=
|
|||
SetUInt32Value(UNIT_FIELD_FLAGS_2, unitFlags2);
|
||||
|
||||
// preserve all current dynamic flags if exist
|
||||
uint32 dynFlags = GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, dynFlags ? dynFlags : GetCreatureInfo()->DynamicFlags);
|
||||
//uint32 dynFlags = GetUInt32Value(UNIT_DYNAMIC_FLAGS);
|
||||
//SetUInt32Value(UNIT_DYNAMIC_FLAGS, dynFlags ? dynFlags : GetCreatureInfo()->dynamicflags);
|
||||
|
||||
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(GetCreatureInfo()->Armor));
|
||||
SetModifierValue(UNIT_MOD_RESISTANCE_HOLY, BASE_VALUE, float(GetCreatureInfo()->ResistanceHoly));
|
||||
|
|
@ -632,7 +632,7 @@ void Creature::Update(uint32 update_diff, uint32 diff)
|
|||
|
||||
SelectLevel(cinfo);
|
||||
UpdateAllStats(); // to be sure stats is correct regarding level of the creature
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
//SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
if (m_IsDeadByDefault)
|
||||
{
|
||||
SetDeathState(JUST_DIED);
|
||||
|
|
@ -1183,7 +1183,7 @@ void Creature::PrepareBodyLootState()
|
|||
// ... or can have skinning after
|
||||
(GetCreatureInfo()->SkinningLootId && sWorld.getConfig(CONFIG_BOOL_CORPSE_EMPTY_LOOT_SHOW)))
|
||||
{
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
//SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -1193,12 +1193,12 @@ void Creature::PrepareBodyLootState()
|
|||
// if not have normal loot allow skinning if need
|
||||
if (!lootForSkin && GetCreatureInfo()->SkinningLootId)
|
||||
{
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
//RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
return;
|
||||
}
|
||||
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
//RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_LOOTABLE);
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE);
|
||||
}
|
||||
|
||||
|
|
@ -1271,8 +1271,8 @@ void Creature::SetLootRecipient(Unit* unit)
|
|||
{
|
||||
m_lootRecipientGuid.Clear();
|
||||
m_lootGroupRecipientId = 0;
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
//RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
//RemoveFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1291,8 +1291,8 @@ void Creature::SetLootRecipient(Unit* unit)
|
|||
m_lootGroupRecipientId = group->GetId();
|
||||
}
|
||||
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
//SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED);
|
||||
//SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_TAPPED_BY_PLAYER);
|
||||
}
|
||||
|
||||
void Creature::SaveToDB()
|
||||
|
|
@ -2013,7 +2013,7 @@ void Creature::SetDeathState(DeathState s)
|
|||
|
||||
// Dynamic flags may be adjusted by spells. Clear them
|
||||
// first and let spell from *addon apply where needed.
|
||||
SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
//SetUInt32Value(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_NONE);
|
||||
LoadCreatureAddon(true);
|
||||
|
||||
// Flags after LoadCreatureAddon. Any spell in *addon
|
||||
|
|
|
|||
|
|
@ -527,7 +527,7 @@ enum EPlayerFields
|
|||
|
||||
enum EContainerFields // Auto generated for version 5, 4, 1, 17538
|
||||
{
|
||||
CONTAINER_FIELD_SLOT_1 = ITEM_END + 0x0000, // Size: 72, Type: LONG, Flags: PUBLIC
|
||||
CONTAINER_FIELD_SLOT = ITEM_END + 0x0000, // Size: 72, Type: LONG, Flags: PUBLIC
|
||||
CONTAINER_FIELD_NUM_SLOTS = ITEM_END + 0x0048, // Size: 1, Type: INT, Flags: PUBLIC
|
||||
CONTAINER_END = ITEM_END + 0x0049
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue