mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-30 01:18:17 +00:00
Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition
This commit is contained in:
+13
-13
@@ -488,7 +488,7 @@ void NPC::CheckMinMaxLevel(Mob *them)
|
||||
if(themlevel < (*cur)->min_level || themlevel > (*cur)->max_level)
|
||||
{
|
||||
material = Inventory::CalcMaterialFromSlot((*cur)->equip_slot);
|
||||
if (material != MaterialInvalid)
|
||||
if (material != EQEmu::legacy::MaterialInvalid)
|
||||
SendWearChange(material);
|
||||
|
||||
cur = itemlist.erase(cur);
|
||||
@@ -748,8 +748,8 @@ void NPC::UpdateEquipmentLight()
|
||||
m_Light.Type.Equipment = 0;
|
||||
m_Light.Level.Equipment = 0;
|
||||
|
||||
for (int index = SLOT_BEGIN; index < EQEmu::constants::EQUIPMENT_SIZE; ++index) {
|
||||
if (index == SlotAmmo) { continue; }
|
||||
for (int index = SLOT_BEGIN; index < EQEmu::legacy::EQUIPMENT_SIZE; ++index) {
|
||||
if (index == EQEmu::legacy::SlotAmmo) { continue; }
|
||||
|
||||
auto item = database.GetItem(equipment[index]);
|
||||
if (item == nullptr) { continue; }
|
||||
@@ -1372,7 +1372,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
|
||||
int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
||||
{
|
||||
if (material_slot >= MaterialCount)
|
||||
if (material_slot >= EQEmu::legacy::MaterialCount)
|
||||
return 0;
|
||||
|
||||
int16 invslot = Inventory::CalcSlotFromMaterial(material_slot);
|
||||
@@ -1383,23 +1383,23 @@ int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
||||
{
|
||||
switch(material_slot)
|
||||
{
|
||||
case MaterialHead:
|
||||
case EQEmu::legacy::MaterialHead:
|
||||
return helmtexture;
|
||||
case MaterialChest:
|
||||
case EQEmu::legacy::MaterialChest:
|
||||
return texture;
|
||||
case MaterialArms:
|
||||
case EQEmu::legacy::MaterialArms:
|
||||
return armtexture;
|
||||
case MaterialWrist:
|
||||
case EQEmu::legacy::MaterialWrist:
|
||||
return bracertexture;
|
||||
case MaterialHands:
|
||||
case EQEmu::legacy::MaterialHands:
|
||||
return handtexture;
|
||||
case MaterialLegs:
|
||||
case EQEmu::legacy::MaterialLegs:
|
||||
return legtexture;
|
||||
case MaterialFeet:
|
||||
case EQEmu::legacy::MaterialFeet:
|
||||
return feettexture;
|
||||
case MaterialPrimary:
|
||||
case EQEmu::legacy::MaterialPrimary:
|
||||
return d_melee_texture1;
|
||||
case MaterialSecondary:
|
||||
case EQEmu::legacy::MaterialSecondary:
|
||||
return d_melee_texture2;
|
||||
default:
|
||||
//they have nothing in the slot, and its not a special slot... they get nothing.
|
||||
|
||||
Reference in New Issue
Block a user