mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-17 03:08:26 +00:00
Moved struct Item_Struct into namespace EQEmu
This commit is contained in:
+54
-58
@@ -2382,9 +2382,9 @@ bool Mob::CanThisClassDualWield(void) const {
|
||||
|
||||
// 2HS, 2HB, or 2HP
|
||||
if(pinst && pinst->IsWeapon()) {
|
||||
const Item_Struct* item = pinst->GetItem();
|
||||
const EQEmu::Item_Struct* item = pinst->GetItem();
|
||||
|
||||
if((item->ItemType == ItemType2HBlunt) || (item->ItemType == ItemType2HSlash) || (item->ItemType == ItemType2HPiercing))
|
||||
if (item->IsType2HWeapon())
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2754,7 +2754,7 @@ void Mob::SendArmorAppearance(Client *one_client)
|
||||
{
|
||||
if (!IsClient())
|
||||
{
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
for (int i = 0; i < 7; ++i)
|
||||
{
|
||||
item = database.GetItem(GetEquipment(i));
|
||||
@@ -2857,7 +2857,7 @@ int32 Mob::GetEquipmentMaterial(uint8 material_slot) const
|
||||
{
|
||||
uint32 equipmaterial = 0;
|
||||
int32 ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
item = database.GetItem(GetEquipment(material_slot));
|
||||
|
||||
if (item != 0)
|
||||
@@ -2910,7 +2910,7 @@ int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
if (material_slot >= 0 && material_slot < EQEmu::legacy::MaterialPrimary)
|
||||
{
|
||||
uint32 ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
item = database.GetItem(GetEquipment(material_slot));
|
||||
int16 invslot = Inventory::CalcSlotFromMaterial(material_slot);
|
||||
|
||||
@@ -2964,7 +2964,7 @@ int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
|
||||
uint32 Mob::GetEquipmentColor(uint8 material_slot) const
|
||||
{
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
|
||||
if (armor_tint[material_slot])
|
||||
{
|
||||
@@ -2980,7 +2980,7 @@ uint32 Mob::GetEquipmentColor(uint8 material_slot) const
|
||||
|
||||
uint32 Mob::IsEliteMaterialItem(uint8 material_slot) const
|
||||
{
|
||||
const Item_Struct *item;
|
||||
const EQEmu::Item_Struct *item;
|
||||
|
||||
item = database.GetItem(GetEquipment(material_slot));
|
||||
if(item != 0)
|
||||
@@ -3896,7 +3896,7 @@ int32 Mob::GetItemStat(uint32 itemid, const char *identifier)
|
||||
if (!inst)
|
||||
return 0;
|
||||
|
||||
const Item_Struct* item = inst->GetItem();
|
||||
const EQEmu::Item_Struct* item = inst->GetItem();
|
||||
if (!item)
|
||||
return 0;
|
||||
|
||||
@@ -5019,62 +5019,58 @@ void Mob::SlowMitigation(Mob* caster)
|
||||
|
||||
uint16 Mob::GetSkillByItemType(int ItemType)
|
||||
{
|
||||
switch (ItemType)
|
||||
{
|
||||
case ItemType1HSlash:
|
||||
return Skill1HSlashing;
|
||||
case ItemType2HSlash:
|
||||
return Skill2HSlashing;
|
||||
case ItemType1HPiercing:
|
||||
switch (ItemType) {
|
||||
case EQEmu::item::ItemType1HSlash:
|
||||
return Skill1HSlashing;
|
||||
case EQEmu::item::ItemType2HSlash:
|
||||
return Skill2HSlashing;
|
||||
case EQEmu::item::ItemType1HPiercing:
|
||||
return Skill1HPiercing;
|
||||
case EQEmu::item::ItemType1HBlunt:
|
||||
return Skill1HBlunt;
|
||||
case EQEmu::item::ItemType2HBlunt:
|
||||
return Skill2HBlunt;
|
||||
case EQEmu::item::ItemType2HPiercing:
|
||||
if (IsClient() && CastToClient()->ClientVersion() < EQEmu::versions::ClientVersion::RoF2)
|
||||
return Skill1HPiercing;
|
||||
case ItemType1HBlunt:
|
||||
return Skill1HBlunt;
|
||||
case ItemType2HBlunt:
|
||||
return Skill2HBlunt;
|
||||
case ItemType2HPiercing:
|
||||
if (IsClient() && CastToClient()->ClientVersion() < EQEmu::versions::ClientVersion::RoF2)
|
||||
return Skill1HPiercing;
|
||||
else
|
||||
return Skill2HPiercing;
|
||||
case ItemTypeBow:
|
||||
return SkillArchery;
|
||||
case ItemTypeLargeThrowing:
|
||||
case ItemTypeSmallThrowing:
|
||||
return SkillThrowing;
|
||||
case ItemTypeMartial:
|
||||
return SkillHandtoHand;
|
||||
default:
|
||||
return SkillHandtoHand;
|
||||
else
|
||||
return Skill2HPiercing;
|
||||
case EQEmu::item::ItemTypeBow:
|
||||
return SkillArchery;
|
||||
case EQEmu::item::ItemTypeLargeThrowing:
|
||||
case EQEmu::item::ItemTypeSmallThrowing:
|
||||
return SkillThrowing;
|
||||
case EQEmu::item::ItemTypeMartial:
|
||||
return SkillHandtoHand;
|
||||
default:
|
||||
return SkillHandtoHand;
|
||||
}
|
||||
return SkillHandtoHand;
|
||||
}
|
||||
|
||||
uint8 Mob::GetItemTypeBySkill(SkillUseTypes skill)
|
||||
{
|
||||
switch (skill)
|
||||
{
|
||||
case SkillThrowing:
|
||||
return ItemTypeSmallThrowing;
|
||||
case SkillArchery:
|
||||
return ItemTypeArrow;
|
||||
case Skill1HSlashing:
|
||||
return ItemType1HSlash;
|
||||
case Skill2HSlashing:
|
||||
return ItemType2HSlash;
|
||||
case Skill1HPiercing:
|
||||
return ItemType1HPiercing;
|
||||
case Skill2HPiercing: // watch for undesired client behavior
|
||||
return ItemType2HPiercing;
|
||||
case Skill1HBlunt:
|
||||
return ItemType1HBlunt;
|
||||
case Skill2HBlunt:
|
||||
return ItemType2HBlunt;
|
||||
case SkillHandtoHand:
|
||||
return ItemTypeMartial;
|
||||
default:
|
||||
return ItemTypeMartial;
|
||||
switch (skill) {
|
||||
case SkillThrowing:
|
||||
return EQEmu::item::ItemTypeSmallThrowing;
|
||||
case SkillArchery:
|
||||
return EQEmu::item::ItemTypeArrow;
|
||||
case Skill1HSlashing:
|
||||
return EQEmu::item::ItemType1HSlash;
|
||||
case Skill2HSlashing:
|
||||
return EQEmu::item::ItemType2HSlash;
|
||||
case Skill1HPiercing:
|
||||
return EQEmu::item::ItemType1HPiercing;
|
||||
case Skill2HPiercing: // watch for undesired client behavior
|
||||
return EQEmu::item::ItemType2HPiercing;
|
||||
case Skill1HBlunt:
|
||||
return EQEmu::item::ItemType1HBlunt;
|
||||
case Skill2HBlunt:
|
||||
return EQEmu::item::ItemType2HBlunt;
|
||||
case SkillHandtoHand:
|
||||
return EQEmu::item::ItemTypeMartial;
|
||||
default:
|
||||
return EQEmu::item::ItemTypeMartial;
|
||||
}
|
||||
return ItemTypeMartial;
|
||||
}
|
||||
|
||||
|
||||
@@ -5631,7 +5627,7 @@ int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot)
|
||||
|
||||
bool Mob::CanClassEquipItem(uint32 item_id)
|
||||
{
|
||||
const Item_Struct* itm = nullptr;
|
||||
const EQEmu::Item_Struct* itm = nullptr;
|
||||
itm = database.GetItem(item_id);
|
||||
|
||||
if (!itm)
|
||||
|
||||
Reference in New Issue
Block a user