mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot
This commit is contained in:
+1
-1
@@ -4747,7 +4747,7 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts, int speci
|
||||
// For now, SPECATK_QUAD means innate DW when Combat:UseLiveCombatRounds is true
|
||||
if ((GetSpecialAbility(SPECATK_INNATE_DW) ||
|
||||
(RuleB(Combat, UseLiveCombatRounds) && GetSpecialAbility(SPECATK_QUAD))) ||
|
||||
GetEquipment(EQEmu::legacy::MaterialSecondary) != 0) {
|
||||
GetEquipment(EQEmu::textures::TextureSecondary) != 0) {
|
||||
if (CheckDualWield()) {
|
||||
Attack(target, EQEmu::legacy::SlotSecondary, false, false, false, opts, special);
|
||||
if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack()){
|
||||
|
||||
+13
-13
@@ -2956,7 +2956,7 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
const ItemInst* inst = 0;
|
||||
uint32 spawnedbotid = 0;
|
||||
spawnedbotid = this->GetBotID();
|
||||
for (int i = 0; i < EQEmu::legacy::MaterialPrimary; i++) {
|
||||
for (int i = 0; i < EQEmu::textures::TexturePrimary; i++) {
|
||||
inst = GetBotItem(i);
|
||||
if (inst) {
|
||||
item = inst->GetItem();
|
||||
@@ -2980,9 +2980,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
item = inst->GetItem();
|
||||
if(item) {
|
||||
if(strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment[EQEmu::legacy::MaterialPrimary].Material = atoi(&item->IDFile[2]);
|
||||
ns->spawn.equipment[EQEmu::textures::TexturePrimary].Material = atoi(&item->IDFile[2]);
|
||||
|
||||
ns->spawn.colors[EQEmu::legacy::MaterialPrimary].Color = GetEquipmentColor(EQEmu::legacy::MaterialPrimary);
|
||||
ns->spawn.colors[EQEmu::textures::TexturePrimary].Color = GetEquipmentColor(EQEmu::textures::TexturePrimary);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2991,9 +2991,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
item = inst->GetItem();
|
||||
if(item) {
|
||||
if(strlen(item->IDFile) > 2)
|
||||
ns->spawn.equipment[EQEmu::legacy::MaterialSecondary].Material = atoi(&item->IDFile[2]);
|
||||
ns->spawn.equipment[EQEmu::textures::TextureSecondary].Material = atoi(&item->IDFile[2]);
|
||||
|
||||
ns->spawn.colors[EQEmu::legacy::MaterialSecondary].Color = GetEquipmentColor(EQEmu::legacy::MaterialSecondary);
|
||||
ns->spawn.colors[EQEmu::textures::TextureSecondary].Color = GetEquipmentColor(EQEmu::textures::TextureSecondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3237,7 +3237,7 @@ void Bot::BotAddEquipItem(int slot, uint32 id) {
|
||||
if(slot > 0 && id > 0) {
|
||||
uint8 materialFromSlot = Inventory::CalcMaterialFromSlot(slot);
|
||||
|
||||
if (materialFromSlot != EQEmu::legacy::MaterialInvalid) {
|
||||
if (materialFromSlot != EQEmu::textures::TextureInvalid) {
|
||||
equipment[slot] = id; // npc has more than just material slots. Valid material should mean valid inventory index
|
||||
SendWearChange(materialFromSlot);
|
||||
}
|
||||
@@ -3253,11 +3253,11 @@ void Bot::BotRemoveEquipItem(int slot) {
|
||||
if(slot > 0) {
|
||||
uint8 materialFromSlot = Inventory::CalcMaterialFromSlot(slot);
|
||||
|
||||
if (materialFromSlot != EQEmu::legacy::MaterialInvalid) {
|
||||
if (materialFromSlot != EQEmu::textures::TextureInvalid) {
|
||||
equipment[slot] = 0; // npc has more than just material slots. Valid material should mean valid inventory index
|
||||
SendWearChange(materialFromSlot);
|
||||
if (materialFromSlot == EQEmu::legacy::MaterialChest)
|
||||
SendWearChange(EQEmu::legacy::MaterialArms);
|
||||
if (materialFromSlot == EQEmu::textures::TextureChest)
|
||||
SendWearChange(EQEmu::textures::TextureArms);
|
||||
}
|
||||
|
||||
UpdateEquipmentLight();
|
||||
@@ -4781,7 +4781,7 @@ int Bot::GetHandToHandDamage(void) {
|
||||
// everyone uses this in the revamp!
|
||||
int skill = GetSkill(EQEmu::skills::SkillHandtoHand);
|
||||
int epic = 0;
|
||||
if (CastToNPC()->GetEquipment(EQEmu::legacy::MaterialHands) == 10652 && GetLevel() > 46)
|
||||
if (CastToNPC()->GetEquipment(EQEmu::textures::TextureHands) == 10652 && GetLevel() > 46)
|
||||
epic = 280;
|
||||
if (epic > skill)
|
||||
skill = epic;
|
||||
@@ -4803,7 +4803,7 @@ int Bot::GetHandToHandDamage(void) {
|
||||
9, 9, 9, 9, 9, 10, 10, 10, 10, 10, // 31-40
|
||||
10, 11, 11, 11, 11, 11, 11, 12, 12}; // 41-49
|
||||
if (GetClass() == MONK) {
|
||||
if (CastToNPC()->GetEquipment(EQEmu::legacy::MaterialHands) == 10652 && GetLevel() > 50)
|
||||
if (CastToNPC()->GetEquipment(EQEmu::textures::TextureHands) == 10652 && GetLevel() > 50)
|
||||
return 9;
|
||||
if (level > 62)
|
||||
return 15;
|
||||
@@ -8415,7 +8415,7 @@ bool Bot::DyeArmor(int16 slot_id, uint32 rgb, bool all_flag, bool save_flag)
|
||||
if (slot_id != INVALID_INDEX)
|
||||
return false;
|
||||
|
||||
for (uint8 i = 0; i < EQEmu::legacy::MaterialPrimary; ++i) {
|
||||
for (uint8 i = 0; i < EQEmu::textures::TexturePrimary; ++i) {
|
||||
uint8 inv_slot = Inventory::CalcSlotFromMaterial(i);
|
||||
ItemInst* inst = m_inv.GetItem(inv_slot);
|
||||
if (!inst)
|
||||
@@ -8427,7 +8427,7 @@ bool Bot::DyeArmor(int16 slot_id, uint32 rgb, bool all_flag, bool save_flag)
|
||||
}
|
||||
else {
|
||||
uint8 mat_slot = Inventory::CalcMaterialFromSlot(slot_id);
|
||||
if (mat_slot == EQEmu::legacy::MaterialInvalid || mat_slot >= EQEmu::legacy::MaterialPrimary)
|
||||
if (mat_slot == EQEmu::textures::TextureInvalid || mat_slot >= EQEmu::textures::TexturePrimary)
|
||||
return false;
|
||||
|
||||
ItemInst* inst = m_inv.GetItem(slot_id);
|
||||
|
||||
@@ -4358,7 +4358,7 @@ void bot_subcommand_bot_dye_armor(Client *c, const Seperator *sep)
|
||||
// TODO: Trouble-shoot model update issue
|
||||
|
||||
const std::string msg_matslot = StringFormat("mat_slot: %c(All), %i(Head), %i(Chest), %i(Arms), %i(Wrists), %i(Hands), %i(Legs), %i(Feet)",
|
||||
'*', EQEmu::legacy::MaterialHead, EQEmu::legacy::MaterialChest, EQEmu::legacy::MaterialArms, EQEmu::legacy::MaterialWrist, EQEmu::legacy::MaterialHands, EQEmu::legacy::MaterialLegs, EQEmu::legacy::MaterialFeet);
|
||||
'*', EQEmu::textures::TextureHead, EQEmu::textures::TextureChest, EQEmu::textures::TextureArms, EQEmu::textures::TextureWrist, EQEmu::textures::TextureHands, EQEmu::textures::TextureLegs, EQEmu::textures::TextureFeet);
|
||||
|
||||
if (helper_command_alias_fail(c, "bot_subcommand_bot_dye_armor", sep->arg[0], "botdyearmor"))
|
||||
return;
|
||||
@@ -4369,7 +4369,7 @@ void bot_subcommand_bot_dye_armor(Client *c, const Seperator *sep)
|
||||
}
|
||||
const int ab_mask = ActionableBots::ABM_NoFilter;
|
||||
|
||||
uint8 material_slot = EQEmu::legacy::MaterialInvalid;
|
||||
uint8 material_slot = EQEmu::textures::TextureInvalid;
|
||||
int16 slot_id = INVALID_INDEX;
|
||||
|
||||
bool dye_all = (sep->arg[1][0] == '*');
|
||||
@@ -4377,7 +4377,7 @@ void bot_subcommand_bot_dye_armor(Client *c, const Seperator *sep)
|
||||
material_slot = atoi(sep->arg[1]);
|
||||
slot_id = Inventory::CalcSlotFromMaterial(material_slot);
|
||||
|
||||
if (!sep->IsNumber(1) || slot_id == INVALID_INDEX || material_slot > EQEmu::legacy::MaterialFeet) {
|
||||
if (!sep->IsNumber(1) || slot_id == INVALID_INDEX || material_slot > EQEmu::textures::TextureFeet) {
|
||||
c->Message(m_fail, "Valid [mat_slot]s for this command are:");
|
||||
c->Message(m_fail, msg_matslot.c_str());
|
||||
return;
|
||||
|
||||
+21
-21
@@ -2730,7 +2730,7 @@ void Client::SetMaterial(int16 in_slot, uint32 item_id) {
|
||||
if (item && item->IsClassCommon())
|
||||
{
|
||||
uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot);
|
||||
if (matslot != EQEmu::legacy::MaterialInvalid)
|
||||
if (matslot != EQEmu::textures::TextureInvalid)
|
||||
{
|
||||
m_pp.item_material[matslot] = GetEquipmentMaterial(matslot);
|
||||
}
|
||||
@@ -3072,7 +3072,7 @@ void Client::SetTint(int16 in_slot, uint32 color) {
|
||||
void Client::SetTint(int16 in_slot, Color_Struct& color) {
|
||||
|
||||
uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot);
|
||||
if (matslot != EQEmu::legacy::MaterialInvalid)
|
||||
if (matslot != EQEmu::textures::TextureInvalid)
|
||||
{
|
||||
m_pp.item_tint[matslot].Color = color.Color;
|
||||
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.Color);
|
||||
@@ -3151,25 +3151,25 @@ uint8 Client::SlotConvert(uint8 slot,bool bracer){
|
||||
if(bracer)
|
||||
return EQEmu::legacy::SlotWrist2;
|
||||
switch(slot) {
|
||||
case EQEmu::legacy::MaterialHead:
|
||||
case EQEmu::textures::TextureHead:
|
||||
slot2 = EQEmu::legacy::SlotHead;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialChest:
|
||||
case EQEmu::textures::TextureChest:
|
||||
slot2 = EQEmu::legacy::SlotChest;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialArms:
|
||||
case EQEmu::textures::TextureArms:
|
||||
slot2 = EQEmu::legacy::SlotArms;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialWrist:
|
||||
case EQEmu::textures::TextureWrist:
|
||||
slot2 = EQEmu::legacy::SlotWrist1;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialHands:
|
||||
case EQEmu::textures::TextureHands:
|
||||
slot2 = EQEmu::legacy::SlotHands;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialLegs:
|
||||
case EQEmu::textures::TextureLegs:
|
||||
slot2 = EQEmu::legacy::SlotLegs;
|
||||
break;
|
||||
case EQEmu::legacy::MaterialFeet:
|
||||
case EQEmu::textures::TextureFeet:
|
||||
slot2 = EQEmu::legacy::SlotFeet;
|
||||
break;
|
||||
}
|
||||
@@ -3180,25 +3180,25 @@ uint8 Client::SlotConvert2(uint8 slot){
|
||||
uint8 slot2 = 0; // same as above...
|
||||
switch(slot){
|
||||
case EQEmu::legacy::SlotHead:
|
||||
slot2 = EQEmu::legacy::MaterialHead;
|
||||
slot2 = EQEmu::textures::TextureHead;
|
||||
break;
|
||||
case EQEmu::legacy::SlotChest:
|
||||
slot2 = EQEmu::legacy::MaterialChest;
|
||||
slot2 = EQEmu::textures::TextureChest;
|
||||
break;
|
||||
case EQEmu::legacy::SlotArms:
|
||||
slot2 = EQEmu::legacy::MaterialArms;
|
||||
slot2 = EQEmu::textures::TextureArms;
|
||||
break;
|
||||
case EQEmu::legacy::SlotWrist1:
|
||||
slot2 = EQEmu::legacy::MaterialWrist;
|
||||
slot2 = EQEmu::textures::TextureWrist;
|
||||
break;
|
||||
case EQEmu::legacy::SlotHands:
|
||||
slot2 = EQEmu::legacy::MaterialHands;
|
||||
slot2 = EQEmu::textures::TextureHands;
|
||||
break;
|
||||
case EQEmu::legacy::SlotLegs:
|
||||
slot2 = EQEmu::legacy::MaterialLegs;
|
||||
slot2 = EQEmu::textures::TextureLegs;
|
||||
break;
|
||||
case EQEmu::legacy::SlotFeet:
|
||||
slot2 = EQEmu::legacy::MaterialFeet;
|
||||
slot2 = EQEmu::textures::TextureFeet;
|
||||
break;
|
||||
}
|
||||
return slot2;
|
||||
@@ -6271,8 +6271,8 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
made_npc->Corrup = GetCorrup();
|
||||
made_npc->PhR = GetPhR();
|
||||
// looks
|
||||
made_npc->texture = GetEquipmentMaterial(EQEmu::legacy::MaterialChest);
|
||||
made_npc->helmtexture = GetEquipmentMaterial(EQEmu::legacy::MaterialHead);
|
||||
made_npc->texture = GetEquipmentMaterial(EQEmu::textures::TextureChest);
|
||||
made_npc->helmtexture = GetEquipmentMaterial(EQEmu::textures::TextureHead);
|
||||
made_npc->haircolor = GetHairColor();
|
||||
made_npc->beardcolor = GetBeardColor();
|
||||
made_npc->eyecolor1 = GetEyeColor1();
|
||||
@@ -6283,9 +6283,9 @@ void Client::Doppelganger(uint16 spell_id, Mob *target, const char *name_overrid
|
||||
made_npc->drakkin_heritage = GetDrakkinHeritage();
|
||||
made_npc->drakkin_tattoo = GetDrakkinTattoo();
|
||||
made_npc->drakkin_details = GetDrakkinDetails();
|
||||
made_npc->d_melee_texture1 = GetEquipmentMaterial(EQEmu::legacy::MaterialPrimary);
|
||||
made_npc->d_melee_texture2 = GetEquipmentMaterial(EQEmu::legacy::MaterialSecondary);
|
||||
for (int i = EQEmu::legacy::MATERIAL_BEGIN; i <= EQEmu::legacy::MATERIAL_END; i++) {
|
||||
made_npc->d_melee_texture1 = GetEquipmentMaterial(EQEmu::textures::TexturePrimary);
|
||||
made_npc->d_melee_texture2 = GetEquipmentMaterial(EQEmu::textures::TextureSecondary);
|
||||
for (int i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTexture; i++) {
|
||||
made_npc->armor_tint[i] = GetEquipmentColor(i);
|
||||
}
|
||||
made_npc->loottable_id = 0;
|
||||
|
||||
@@ -1313,7 +1313,7 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
/* Set item material tint */
|
||||
for (int i = EQEmu::legacy::MATERIAL_BEGIN; i <= EQEmu::legacy::MATERIAL_END; i++)
|
||||
for (int i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTexture; i++)
|
||||
{
|
||||
if (m_pp.item_tint[i].RGB.UseTint == 1 || m_pp.item_tint[i].RGB.UseTint == 255)
|
||||
{
|
||||
@@ -3078,7 +3078,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
|
||||
CalcBonuses();
|
||||
|
||||
if (mat != EQEmu::legacy::MaterialInvalid)
|
||||
if (mat != EQEmu::textures::TextureInvalid)
|
||||
{
|
||||
SendWearChange(mat); // Visible item augged while equipped. Send WC in case ornamentation changed.
|
||||
}
|
||||
@@ -3143,7 +3143,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
|
||||
CalcBonuses();
|
||||
|
||||
if (mat != EQEmu::legacy::MaterialInvalid)
|
||||
if (mat != EQEmu::textures::TextureInvalid)
|
||||
{
|
||||
SendWearChange(mat); // Visible item augged while equipped. Send WC in case ornamentation changed.
|
||||
}
|
||||
@@ -3198,7 +3198,7 @@ void Client::Handle_OP_AugmentItem(const EQApplicationPacket *app)
|
||||
|
||||
CalcBonuses();
|
||||
|
||||
if (mat != EQEmu::legacy::MaterialInvalid)
|
||||
if (mat != EQEmu::textures::TextureInvalid)
|
||||
{
|
||||
SendWearChange(mat);
|
||||
}
|
||||
|
||||
+3
-3
@@ -2416,14 +2416,14 @@ void command_texture(Client *c, const Seperator *sep)
|
||||
// Player Races Wear Armor, so Wearchange is sent instead
|
||||
int i;
|
||||
if (!c->GetTarget())
|
||||
for (i = EQEmu::legacy::MATERIAL_BEGIN; i <= EQEmu::legacy::MATERIAL_TINT_END; i++)
|
||||
for (i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTintableTexture; i++)
|
||||
{
|
||||
c->SendTextureWC(i, texture);
|
||||
}
|
||||
else if ((c->GetTarget()->GetRace() > 0 && c->GetTarget()->GetRace() <= 12) ||
|
||||
c->GetTarget()->GetRace() == 128 || c->GetTarget()->GetRace() == 130 ||
|
||||
c->GetTarget()->GetRace() == 330 || c->GetTarget()->GetRace() == 522) {
|
||||
for (i = EQEmu::legacy::MATERIAL_BEGIN; i <= EQEmu::legacy::MATERIAL_TINT_END; i++)
|
||||
for (i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTintableTexture; i++)
|
||||
{
|
||||
c->GetTarget()->SendTextureWC(i, texture);
|
||||
}
|
||||
@@ -7119,7 +7119,7 @@ void command_path(Client *c, const Seperator *sep)
|
||||
}
|
||||
|
||||
void Client::Undye() {
|
||||
for (int cur_slot = EQEmu::legacy::MATERIAL_BEGIN; cur_slot <= EQEmu::legacy::MATERIAL_END; cur_slot++) {
|
||||
for (int cur_slot = EQEmu::textures::TextureBegin; cur_slot <= EQEmu::textures::LastTexture; cur_slot++) {
|
||||
uint8 slot2=SlotConvert(cur_slot);
|
||||
ItemInst* inst = m_inv.GetItem(slot2);
|
||||
|
||||
|
||||
+3
-3
@@ -746,7 +746,7 @@ void Corpse::RemoveItem(ServerLootItem_Struct* item_data)
|
||||
itemlist.erase(iter);
|
||||
|
||||
uint8 material = Inventory::CalcMaterialFromSlot(sitem->equip_slot); // autos to unsigned char
|
||||
if (material != EQEmu::legacy::MaterialInvalid)
|
||||
if (material != EQEmu::textures::TextureInvalid)
|
||||
SendWearChange(material);
|
||||
|
||||
UpdateEquipmentLight();
|
||||
@@ -1400,7 +1400,7 @@ void Corpse::Spawn() {
|
||||
uint32 Corpse::GetEquipment(uint8 material_slot) const {
|
||||
int16 invslot;
|
||||
|
||||
if (material_slot > EQEmu::legacy::MATERIAL_END) {
|
||||
if (material_slot > EQEmu::textures::LastTexture) {
|
||||
return NO_ITEM;
|
||||
}
|
||||
|
||||
@@ -1414,7 +1414,7 @@ uint32 Corpse::GetEquipment(uint8 material_slot) const {
|
||||
uint32 Corpse::GetEquipmentColor(uint8 material_slot) const {
|
||||
const EQEmu::ItemBase *item;
|
||||
|
||||
if (material_slot > EQEmu::legacy::MATERIAL_END) {
|
||||
if (material_slot > EQEmu::textures::LastTexture) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -1019,7 +1019,7 @@ bool Client::AutoPutLootInInventory(ItemInst& inst, bool try_worn, bool try_curs
|
||||
//send worn to everyone...
|
||||
PutLootInInventory(i, inst);
|
||||
uint8 worn_slot_material = Inventory::CalcMaterialFromSlot(i);
|
||||
if (worn_slot_material != EQEmu::legacy::MaterialInvalid) {
|
||||
if (worn_slot_material != EQEmu::textures::TextureInvalid) {
|
||||
SendWearChange(worn_slot_material);
|
||||
}
|
||||
|
||||
@@ -1792,7 +1792,7 @@ bool Client::SwapItem(MoveItem_Struct* move_in) {
|
||||
}
|
||||
|
||||
int matslot = SlotConvert2(dst_slot_id);
|
||||
if (dst_slot_id <= EQEmu::legacy::EQUIPMENT_END && matslot != EQEmu::legacy::MaterialHead) { // think this is to allow the client to update with /showhelm
|
||||
if (dst_slot_id <= EQEmu::legacy::EQUIPMENT_END && matslot != EQEmu::textures::TextureHead) { // think this is to allow the client to update with /showhelm
|
||||
SendWearChange(matslot);
|
||||
}
|
||||
|
||||
@@ -2021,7 +2021,7 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) {
|
||||
|
||||
void Client::DyeArmor(DyeStruct* dye){
|
||||
int16 slot=0;
|
||||
for (int i = EQEmu::legacy::MATERIAL_BEGIN; i <= EQEmu::legacy::MATERIAL_TINT_END; i++) {
|
||||
for (int i = EQEmu::textures::TextureBegin; i <= EQEmu::textures::LastTintableTexture; i++) {
|
||||
if ((m_pp.item_tint[i].Color & 0x00FFFFFF) != (dye->dye[i].Color & 0x00FFFFFF)) {
|
||||
slot = m_inv.HasItem(32557, 1, invWherePersonal);
|
||||
if (slot != INVALID_INDEX){
|
||||
@@ -2593,7 +2593,7 @@ uint32 Client::GetEquipment(uint8 material_slot) const
|
||||
int16 invslot;
|
||||
const ItemInst *item;
|
||||
|
||||
if(material_slot > EQEmu::legacy::MATERIAL_END)
|
||||
if(material_slot > EQEmu::textures::LastTexture)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -2631,7 +2631,7 @@ int32 Client::GetEquipmentMaterial(uint8 material_slot)
|
||||
|
||||
uint32 Client::GetEquipmentColor(uint8 material_slot) const
|
||||
{
|
||||
if (material_slot > EQEmu::legacy::MATERIAL_END)
|
||||
if (material_slot > EQEmu::textures::LastTexture)
|
||||
return 0;
|
||||
|
||||
const EQEmu::ItemBase *item = database.GetItem(GetEquipment(material_slot));
|
||||
|
||||
+9
-9
@@ -331,7 +331,7 @@ void NPC::AddLootDrop(const EQEmu::ItemBase *item2, ItemList* itemlist, int16 ch
|
||||
if (item2->Proc.Effect != 0)
|
||||
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
||||
|
||||
eslot = EQEmu::legacy::MaterialPrimary;
|
||||
eslot = EQEmu::textures::TexturePrimary;
|
||||
if (item2->Damage > 0)
|
||||
SendAddPlayerState(PlayerState::PrimaryWeaponEquipped);
|
||||
if (item2->IsType2HWeapon())
|
||||
@@ -344,30 +344,30 @@ void NPC::AddLootDrop(const EQEmu::ItemBase *item2, ItemList* itemlist, int16 ch
|
||||
if (item2->Proc.Effect!=0)
|
||||
CastToMob()->AddProcToWeapon(item2->Proc.Effect, true);
|
||||
|
||||
eslot = EQEmu::legacy::MaterialSecondary;
|
||||
eslot = EQEmu::textures::TextureSecondary;
|
||||
if (item2->Damage > 0)
|
||||
SendAddPlayerState(PlayerState::SecondaryWeaponEquipped);
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotHead) {
|
||||
eslot = EQEmu::legacy::MaterialHead;
|
||||
eslot = EQEmu::textures::TextureHead;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotChest) {
|
||||
eslot = EQEmu::legacy::MaterialChest;
|
||||
eslot = EQEmu::textures::TextureChest;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotArms) {
|
||||
eslot = EQEmu::legacy::MaterialArms;
|
||||
eslot = EQEmu::textures::TextureArms;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotWrist1 || foundslot == EQEmu::legacy::SlotWrist2) {
|
||||
eslot = EQEmu::legacy::MaterialWrist;
|
||||
eslot = EQEmu::textures::TextureWrist;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotHands) {
|
||||
eslot = EQEmu::legacy::MaterialHands;
|
||||
eslot = EQEmu::textures::TextureHands;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotLegs) {
|
||||
eslot = EQEmu::legacy::MaterialLegs;
|
||||
eslot = EQEmu::textures::TextureLegs;
|
||||
}
|
||||
else if (foundslot == EQEmu::legacy::SlotFeet) {
|
||||
eslot = EQEmu::legacy::MaterialFeet;
|
||||
eslot = EQEmu::textures::TextureFeet;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+13
-13
@@ -1809,19 +1809,19 @@ luabind::scope lua_register_material() {
|
||||
return luabind::class_<Materials>("Material")
|
||||
.enum_("constants")
|
||||
[
|
||||
luabind::value("Head", static_cast<int>(EQEmu::legacy::MaterialHead)),
|
||||
luabind::value("Chest", static_cast<int>(EQEmu::legacy::MaterialChest)),
|
||||
luabind::value("Arms", static_cast<int>(EQEmu::legacy::MaterialArms)),
|
||||
luabind::value("Bracer", static_cast<int>(EQEmu::legacy::MaterialWrist)), // deprecated
|
||||
luabind::value("Wrist", static_cast<int>(EQEmu::legacy::MaterialWrist)),
|
||||
luabind::value("Hands", static_cast<int>(EQEmu::legacy::MaterialHands)),
|
||||
luabind::value("Legs", static_cast<int>(EQEmu::legacy::MaterialLegs)),
|
||||
luabind::value("Feet", static_cast<int>(EQEmu::legacy::MaterialFeet)),
|
||||
luabind::value("Primary", static_cast<int>(EQEmu::legacy::MaterialPrimary)),
|
||||
luabind::value("Secondary", static_cast<int>(EQEmu::legacy::MaterialSecondary)),
|
||||
luabind::value("Max", static_cast<int>(EQEmu::legacy::MaterialCount)), // deprecated
|
||||
luabind::value("Count", static_cast<int>(EQEmu::legacy::MaterialCount)),
|
||||
luabind::value("Invalid", static_cast<int>(EQEmu::legacy::MaterialInvalid))
|
||||
luabind::value("Head", static_cast<int>(EQEmu::textures::TextureHead)),
|
||||
luabind::value("Chest", static_cast<int>(EQEmu::textures::TextureChest)),
|
||||
luabind::value("Arms", static_cast<int>(EQEmu::textures::TextureArms)),
|
||||
luabind::value("Bracer", static_cast<int>(EQEmu::textures::TextureWrist)), // deprecated
|
||||
luabind::value("Wrist", static_cast<int>(EQEmu::textures::TextureWrist)),
|
||||
luabind::value("Hands", static_cast<int>(EQEmu::textures::TextureHands)),
|
||||
luabind::value("Legs", static_cast<int>(EQEmu::textures::TextureLegs)),
|
||||
luabind::value("Feet", static_cast<int>(EQEmu::textures::TextureFeet)),
|
||||
luabind::value("Primary", static_cast<int>(EQEmu::textures::TexturePrimary)),
|
||||
luabind::value("Secondary", static_cast<int>(EQEmu::textures::TextureSecondary)),
|
||||
luabind::value("Max", static_cast<int>(EQEmu::textures::TextureCount)), // deprecated
|
||||
luabind::value("Count", static_cast<int>(EQEmu::textures::TextureCount)),
|
||||
luabind::value("Invalid", static_cast<int>(EQEmu::textures::TextureInvalid))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -5046,12 +5046,12 @@ void Merc::ScaleStats(int scalepercent, bool setmax) {
|
||||
void Merc::UpdateMercAppearance() {
|
||||
// Copied from Bot Code:
|
||||
uint32 itemID = NO_ITEM;
|
||||
uint8 materialFromSlot = EQEmu::legacy::MaterialInvalid;
|
||||
uint8 materialFromSlot = EQEmu::textures::TextureInvalid;
|
||||
for (int i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::EQUIPMENT_END; ++i) {
|
||||
itemID = equipment[i];
|
||||
if(itemID != NO_ITEM) {
|
||||
materialFromSlot = Inventory::CalcMaterialFromSlot(i);
|
||||
if (materialFromSlot != EQEmu::legacy::MaterialInvalid)
|
||||
if (materialFromSlot != EQEmu::textures::TextureInvalid)
|
||||
this->SendWearChange(materialFromSlot);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -73,7 +73,7 @@ Mob::Mob(const char* in_name,
|
||||
uint32 in_drakkin_heritage,
|
||||
uint32 in_drakkin_tattoo,
|
||||
uint32 in_drakkin_details,
|
||||
uint32 in_armor_tint[EQEmu::legacy::MaterialCount],
|
||||
uint32 in_armor_tint[EQEmu::textures::TextureCount],
|
||||
|
||||
uint8 in_aa_title,
|
||||
uint8 in_see_invis, // see through invis/ivu
|
||||
@@ -278,7 +278,7 @@ Mob::Mob(const char* in_name,
|
||||
RangedProcs[j].level_override = -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < EQEmu::legacy::MaterialCount; i++)
|
||||
for (i = 0; i < EQEmu::textures::TextureCount; i++)
|
||||
{
|
||||
if (in_armor_tint)
|
||||
{
|
||||
@@ -2863,7 +2863,7 @@ int32 Mob::GetEquipmentMaterial(uint8 material_slot) const
|
||||
if (item != 0)
|
||||
{
|
||||
// For primary and secondary we need the model, not the material
|
||||
if (material_slot == EQEmu::legacy::MaterialPrimary || material_slot == EQEmu::legacy::MaterialSecondary)
|
||||
if (material_slot == EQEmu::textures::TexturePrimary || material_slot == EQEmu::textures::TextureSecondary)
|
||||
{
|
||||
if (this->IsClient())
|
||||
{
|
||||
@@ -2907,7 +2907,7 @@ int32 Mob::GetEquipmentMaterial(uint8 material_slot) const
|
||||
int32 Mob::GetHerosForgeModel(uint8 material_slot) const
|
||||
{
|
||||
uint32 HeroModel = 0;
|
||||
if (material_slot >= 0 && material_slot < EQEmu::legacy::MaterialPrimary)
|
||||
if (material_slot >= 0 && material_slot < EQEmu::textures::TexturePrimary)
|
||||
{
|
||||
uint32 ornamentationAugtype = RuleI(Character, OrnamentationAugmentType);
|
||||
const EQEmu::ItemBase *item;
|
||||
|
||||
+3
-3
@@ -113,7 +113,7 @@ public:
|
||||
uint32 in_drakkin_heritage,
|
||||
uint32 in_drakkin_tattoo,
|
||||
uint32 in_drakkin_details,
|
||||
uint32 in_armor_tint[EQEmu::legacy::MaterialCount],
|
||||
uint32 in_armor_tint[EQEmu::textures::TextureCount],
|
||||
uint8 in_aa_title,
|
||||
uint8 in_see_invis, // see through invis
|
||||
uint8 in_see_invis_undead, // see through invis vs. undead
|
||||
@@ -384,7 +384,7 @@ public:
|
||||
inline uint8 GetDrakkinHeritage() const { return drakkin_heritage; }
|
||||
inline uint8 GetDrakkinTattoo() const { return drakkin_tattoo; }
|
||||
inline uint8 GetDrakkinDetails() const { return drakkin_details; }
|
||||
inline uint32 GetArmorTint(uint8 i) const { return armor_tint[(i < EQEmu::legacy::MaterialCount) ? i : 0]; }
|
||||
inline uint32 GetArmorTint(uint8 i) const { return armor_tint[(i < EQEmu::textures::TextureCount) ? i : 0]; }
|
||||
inline uint8 GetClass() const { return class_; }
|
||||
inline uint8 GetLevel() const { return level; }
|
||||
inline uint8 GetOrigLevel() const { return orig_level; }
|
||||
@@ -1248,7 +1248,7 @@ protected:
|
||||
uint32 drakkin_heritage;
|
||||
uint32 drakkin_tattoo;
|
||||
uint32 drakkin_details;
|
||||
uint32 armor_tint[EQEmu::legacy::MaterialCount];
|
||||
uint32 armor_tint[EQEmu::textures::TextureCount];
|
||||
|
||||
uint8 aa_title;
|
||||
|
||||
|
||||
+11
-11
@@ -489,7 +489,7 @@ void NPC::CheckMinMaxLevel(Mob *them)
|
||||
if(themlevel < (*cur)->min_level || themlevel > (*cur)->max_level)
|
||||
{
|
||||
material = Inventory::CalcMaterialFromSlot((*cur)->equip_slot);
|
||||
if (material != EQEmu::legacy::MaterialInvalid)
|
||||
if (material != EQEmu::textures::TextureInvalid)
|
||||
SendWearChange(material);
|
||||
|
||||
cur = itemlist.erase(cur);
|
||||
@@ -1373,7 +1373,7 @@ uint32 ZoneDatabase::NPCSpawnDB(uint8 command, const char* zone, uint32 zone_ver
|
||||
|
||||
int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
||||
{
|
||||
if (material_slot >= EQEmu::legacy::MaterialCount)
|
||||
if (material_slot >= EQEmu::textures::TextureCount)
|
||||
return 0;
|
||||
|
||||
int16 invslot = Inventory::CalcSlotFromMaterial(material_slot);
|
||||
@@ -1384,23 +1384,23 @@ int32 NPC::GetEquipmentMaterial(uint8 material_slot) const
|
||||
{
|
||||
switch(material_slot)
|
||||
{
|
||||
case EQEmu::legacy::MaterialHead:
|
||||
case EQEmu::textures::TextureHead:
|
||||
return helmtexture;
|
||||
case EQEmu::legacy::MaterialChest:
|
||||
case EQEmu::textures::TextureChest:
|
||||
return texture;
|
||||
case EQEmu::legacy::MaterialArms:
|
||||
case EQEmu::textures::TextureArms:
|
||||
return armtexture;
|
||||
case EQEmu::legacy::MaterialWrist:
|
||||
case EQEmu::textures::TextureWrist:
|
||||
return bracertexture;
|
||||
case EQEmu::legacy::MaterialHands:
|
||||
case EQEmu::textures::TextureHands:
|
||||
return handtexture;
|
||||
case EQEmu::legacy::MaterialLegs:
|
||||
case EQEmu::textures::TextureLegs:
|
||||
return legtexture;
|
||||
case EQEmu::legacy::MaterialFeet:
|
||||
case EQEmu::textures::TextureFeet:
|
||||
return feettexture;
|
||||
case EQEmu::legacy::MaterialPrimary:
|
||||
case EQEmu::textures::TexturePrimary:
|
||||
return d_melee_texture1;
|
||||
case EQEmu::legacy::MaterialSecondary:
|
||||
case EQEmu::textures::TextureSecondary:
|
||||
return d_melee_texture2;
|
||||
default:
|
||||
//they have nothing in the slot, and its not a special slot... they get nothing.
|
||||
|
||||
@@ -1435,7 +1435,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
}
|
||||
}
|
||||
|
||||
for (int x = EQEmu::legacy::MATERIAL_BEGIN; x <= EQEmu::legacy::MATERIAL_TINT_END; x++)
|
||||
for (int x = EQEmu::textures::TextureBegin; x <= EQEmu::textures::LastTintableTexture; x++)
|
||||
SendWearChange(x);
|
||||
|
||||
if (caster == this &&
|
||||
@@ -1461,7 +1461,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
);
|
||||
caster->SendAppearancePacket(AT_Size, static_cast<uint32>(caster->GetTarget()->GetSize()));
|
||||
|
||||
for (int x = EQEmu::legacy::MATERIAL_BEGIN; x <= EQEmu::legacy::MATERIAL_TINT_END; x++)
|
||||
for (int x = EQEmu::textures::TextureBegin; x <= EQEmu::textures::LastTintableTexture; x++)
|
||||
caster->SendWearChange(x);
|
||||
}
|
||||
}
|
||||
@@ -3813,7 +3813,7 @@ void Mob::BuffFadeBySlot(int slot, bool iRecalcBonuses)
|
||||
else{
|
||||
SendAppearancePacket(AT_Size, 6);
|
||||
}
|
||||
for (int x = EQEmu::legacy::MATERIAL_BEGIN; x <= EQEmu::legacy::MATERIAL_TINT_END; x++){
|
||||
for (int x = EQEmu::textures::TextureBegin; x <= EQEmu::textures::LastTintableTexture; x++){
|
||||
SendWearChange(x);
|
||||
}
|
||||
break;
|
||||
|
||||
+4
-4
@@ -2092,7 +2092,7 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
||||
else {
|
||||
auto armorTint_row = armortint_results.begin();
|
||||
|
||||
for (int index = EQEmu::legacy::MATERIAL_BEGIN; index <= EQEmu::legacy::MATERIAL_END; index++) {
|
||||
for (int index = EQEmu::textures::TextureBegin; index <= EQEmu::textures::LastTexture; index++) {
|
||||
temp_npctype_data->armor_tint[index] = atoi(armorTint_row[index * 3]) << 16;
|
||||
temp_npctype_data->armor_tint[index] |= atoi(armorTint_row[index * 3 + 1]) << 8;
|
||||
temp_npctype_data->armor_tint[index] |= atoi(armorTint_row[index * 3 + 2]);
|
||||
@@ -2102,7 +2102,7 @@ const NPCType* ZoneDatabase::LoadNPCTypesData(uint32 npc_type_id, bool bulk_load
|
||||
}
|
||||
// Try loading npc_types tint fields if armor tint is 0 or query failed to get results
|
||||
if (armor_tint_id == 0) {
|
||||
for (int index = EQEmu::legacy::MaterialChest; index < EQEmu::legacy::MaterialCount; index++) {
|
||||
for (int index = EQEmu::textures::TextureChest; index < EQEmu::textures::TextureCount; index++) {
|
||||
temp_npctype_data->armor_tint[index] = temp_npctype_data->armor_tint[0];
|
||||
}
|
||||
}
|
||||
@@ -2307,7 +2307,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
tmpNPCType->armor_tint[0] |= (tmpNPCType->armor_tint[0]) ? (0xFF << 24) : 0;
|
||||
|
||||
if (armor_tint_id == 0)
|
||||
for (int index = EQEmu::legacy::MaterialChest; index <= EQEmu::legacy::MATERIAL_END; index++)
|
||||
for (int index = EQEmu::textures::TextureChest; index <= EQEmu::textures::LastTexture; index++)
|
||||
tmpNPCType->armor_tint[index] = tmpNPCType->armor_tint[0];
|
||||
else if (tmpNPCType->armor_tint[0] == 0) {
|
||||
std::string armorTint_query = StringFormat("SELECT red1h, grn1h, blu1h, "
|
||||
@@ -2327,7 +2327,7 @@ const NPCType* ZoneDatabase::GetMercType(uint32 id, uint16 raceid, uint32 client
|
||||
else {
|
||||
auto armorTint_row = results.begin();
|
||||
|
||||
for (int index = EQEmu::legacy::MATERIAL_BEGIN; index <= EQEmu::legacy::MATERIAL_END; index++) {
|
||||
for (int index = EQEmu::textures::TextureBegin; index <= EQEmu::textures::LastTexture; index++) {
|
||||
tmpNPCType->armor_tint[index] = atoi(armorTint_row[index * 3]) << 16;
|
||||
tmpNPCType->armor_tint[index] |= atoi(armorTint_row[index * 3 + 1]) << 8;
|
||||
tmpNPCType->armor_tint[index] |= atoi(armorTint_row[index * 3 + 2]);
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ struct NPCType
|
||||
uint32 drakkin_heritage;
|
||||
uint32 drakkin_tattoo;
|
||||
uint32 drakkin_details;
|
||||
uint32 armor_tint[EQEmu::legacy::MaterialCount];
|
||||
uint32 armor_tint[EQEmu::textures::TextureCount];
|
||||
uint32 min_dmg;
|
||||
uint32 max_dmg;
|
||||
int16 attack_count;
|
||||
|
||||
Reference in New Issue
Block a user