mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-19 08:32:25 +00:00
Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot
This commit is contained in:
parent
a38417bf54
commit
ea8f81feec
@ -1,5 +1,8 @@
|
||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||
-------------------------------------------------------
|
||||
== 05/31/2016 ==
|
||||
Uleat: Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot
|
||||
|
||||
== 05/28/2016 ==
|
||||
Uleat: Merged client_version and inventory_version into emu_versions files
|
||||
|
||||
|
||||
@ -68,6 +68,7 @@ SET(common_sources
|
||||
struct_strategy.cpp
|
||||
tcp_connection.cpp
|
||||
tcp_server.cpp
|
||||
textures.cpp
|
||||
timeoutmgr.cpp
|
||||
timer.cpp
|
||||
unix.cpp
|
||||
@ -199,6 +200,7 @@ SET(common_headers
|
||||
tcp_basic_server.h
|
||||
tcp_connection.h
|
||||
tcp_server.h
|
||||
textures.h
|
||||
timeoutmgr.h
|
||||
timer.h
|
||||
types.h
|
||||
|
||||
@ -186,7 +186,7 @@ namespace Convert {
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
||||
/*510*/ uint32 Items[EQEmu::textures::TextureCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@ -227,9 +227,9 @@ namespace Convert {
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
||||
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::TextureCount];
|
||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
@ -1416,7 +1416,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||
/* Run Material Color Convert */
|
||||
first_entry = 0; rquery = "";
|
||||
for (i = 0; i < EQEmu::legacy::MaterialCount; i++){
|
||||
for (i = 0; i < EQEmu::textures::TextureCount; i++){
|
||||
if (pp->item_tint[i].color > 0){
|
||||
if (first_entry != 1){
|
||||
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
||||
|
||||
@ -163,20 +163,6 @@ namespace EQEmu
|
||||
SlotCount
|
||||
};
|
||||
|
||||
enum MaterialSlots : uint8 {
|
||||
MaterialHead = 0,
|
||||
MaterialChest,
|
||||
MaterialArms,
|
||||
MaterialWrist,
|
||||
MaterialHands,
|
||||
MaterialLegs, // 5
|
||||
MaterialFeet,
|
||||
MaterialPrimary,
|
||||
MaterialSecondary,
|
||||
MaterialCount,
|
||||
MaterialInvalid = 255
|
||||
};
|
||||
|
||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||
static const uint16 TYPE_POSSESSIONS_SIZE = SlotCount;
|
||||
static const uint16 TYPE_BANK_SIZE = 24;
|
||||
@ -251,11 +237,6 @@ namespace EQEmu
|
||||
static const int16 CORPSE_BEGIN = 22;
|
||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||
|
||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
||||
static const int16 MATERIAL_END = MaterialSecondary;
|
||||
static const int16 MATERIAL_TINT_END = MaterialFeet;
|
||||
static const int16 MATERIAL_SIZE = MaterialCount;
|
||||
|
||||
// items
|
||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||
static const uint16 ITEM_COMMON_SIZE = 6;//RoF::consts::ITEM_COMMON_SIZE;
|
||||
|
||||
@ -26,6 +26,7 @@
|
||||
#include <time.h>
|
||||
#include "../common/version.h"
|
||||
#include "emu_constants.h"
|
||||
#include "textures.h"
|
||||
|
||||
|
||||
static const uint32 BUFF_COUNT = 25;
|
||||
@ -293,7 +294,7 @@ struct Spawn_Struct {
|
||||
/*0000*/ EquipStruct equip_primary; // Equipment: Main visual
|
||||
/*0000*/ EquipStruct equip_secondary; // Equipment: Off visual
|
||||
} equip;
|
||||
/*0000*/ EquipStruct equipment[EQEmu::legacy::MaterialCount];
|
||||
/*0000*/ EquipStruct equipment[EQEmu::textures::TextureCount];
|
||||
};
|
||||
/*0233*/ float runspeed; // Speed when running
|
||||
/*0036*/ uint8 afk; // 0=no, 1=afk
|
||||
@ -339,7 +340,7 @@ union
|
||||
/*0376*/ Color_Struct color_primary; // Color of primary item
|
||||
/*0380*/ Color_Struct color_secondary; // Color of secondary item
|
||||
} equipment_colors;
|
||||
/*0348*/ Color_Struct colors[EQEmu::legacy::MaterialCount]; // Array elements correspond to struct equipment_colors above
|
||||
/*0348*/ Color_Struct colors[EQEmu::textures::TextureCount]; // Array elements correspond to struct equipment_colors above
|
||||
};
|
||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||
/*0385*/
|
||||
@ -881,7 +882,7 @@ struct SuspendedMinion_Struct
|
||||
/*002*/ uint32 HP;
|
||||
/*006*/ uint32 Mana;
|
||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
/*510*/ uint32 Items[EQEmu::legacy::MaterialCount];
|
||||
/*510*/ uint32 Items[EQEmu::textures::TextureCount];
|
||||
/*546*/ char Name[64];
|
||||
/*610*/
|
||||
};
|
||||
@ -989,9 +990,9 @@ struct PlayerProfile_Struct
|
||||
/*0304*/ uint8 ability_time_minutes;
|
||||
/*0305*/ uint8 ability_time_hours; //place holder
|
||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||
/*0312*/ uint32 item_material[EQEmu::legacy::MaterialCount]; // Item texture/material of worn/held items
|
||||
/*0312*/ uint32 item_material[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
|
||||
/*0348*/ uint8 unknown0348[44];
|
||||
/*0392*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount];
|
||||
/*0392*/ Color_Struct item_tint[EQEmu::textures::TextureCount];
|
||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||
/*2352*/ char servername[32]; // length probably not right
|
||||
@ -2145,7 +2146,7 @@ struct Illusion_Struct { //size: 256 - SoF
|
||||
/*092*/ uint32 drakkin_heritage; //
|
||||
/*096*/ uint32 drakkin_tattoo; //
|
||||
/*100*/ uint32 drakkin_details; //
|
||||
/*104*/ uint32 armor_tint[EQEmu::legacy::MaterialCount]; //
|
||||
/*104*/ uint32 armor_tint[EQEmu::textures::TextureCount]; //
|
||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||
/*142*/ uint8 unknown138[114]; //
|
||||
@ -3432,7 +3433,7 @@ struct DyeStruct
|
||||
struct Color_Struct secondary; // or this
|
||||
}
|
||||
dyes;
|
||||
struct Color_Struct dye[EQEmu::legacy::MaterialCount];
|
||||
struct Color_Struct dye[EQEmu::textures::TextureCount];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ struct ExtendedProfile_Struct {
|
||||
uint16 old_pet_hp; /* Not Used */
|
||||
uint16 old_pet_mana; /* Not Used */
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||
uint32 pet_items[EQEmu::legacy::MaterialCount]; /* Not Used */
|
||||
uint32 pet_items[EQEmu::textures::TextureCount]; /* Not Used */
|
||||
char merc_name[64]; /* Used */
|
||||
|
||||
uint32 aa_effects; /* Used */
|
||||
|
||||
@ -852,23 +852,23 @@ int16 Inventory::CalcSlotFromMaterial(uint8 material)
|
||||
{
|
||||
switch (material)
|
||||
{
|
||||
case EQEmu::legacy::MaterialHead:
|
||||
case EQEmu::textures::TextureHead:
|
||||
return EQEmu::legacy::SlotHead;
|
||||
case EQEmu::legacy::MaterialChest:
|
||||
case EQEmu::textures::TextureChest:
|
||||
return EQEmu::legacy::SlotChest;
|
||||
case EQEmu::legacy::MaterialArms:
|
||||
case EQEmu::textures::TextureArms:
|
||||
return EQEmu::legacy::SlotArms;
|
||||
case EQEmu::legacy::MaterialWrist:
|
||||
case EQEmu::textures::TextureWrist:
|
||||
return EQEmu::legacy::SlotWrist1; // there's 2 bracers, only one bracer material
|
||||
case EQEmu::legacy::MaterialHands:
|
||||
case EQEmu::textures::TextureHands:
|
||||
return EQEmu::legacy::SlotHands;
|
||||
case EQEmu::legacy::MaterialLegs:
|
||||
case EQEmu::textures::TextureLegs:
|
||||
return EQEmu::legacy::SlotLegs;
|
||||
case EQEmu::legacy::MaterialFeet:
|
||||
case EQEmu::textures::TextureFeet:
|
||||
return EQEmu::legacy::SlotFeet;
|
||||
case EQEmu::legacy::MaterialPrimary:
|
||||
case EQEmu::textures::TexturePrimary:
|
||||
return EQEmu::legacy::SlotPrimary;
|
||||
case EQEmu::legacy::MaterialSecondary:
|
||||
case EQEmu::textures::TextureSecondary:
|
||||
return EQEmu::legacy::SlotSecondary;
|
||||
default:
|
||||
return INVALID_INDEX;
|
||||
@ -880,26 +880,26 @@ uint8 Inventory::CalcMaterialFromSlot(int16 equipslot)
|
||||
switch (equipslot)
|
||||
{
|
||||
case EQEmu::legacy::SlotHead:
|
||||
return EQEmu::legacy::MaterialHead;
|
||||
return EQEmu::textures::TextureHead;
|
||||
case EQEmu::legacy::SlotChest:
|
||||
return EQEmu::legacy::MaterialChest;
|
||||
return EQEmu::textures::TextureChest;
|
||||
case EQEmu::legacy::SlotArms:
|
||||
return EQEmu::legacy::MaterialArms;
|
||||
return EQEmu::textures::TextureArms;
|
||||
case EQEmu::legacy::SlotWrist1:
|
||||
//case SLOT_BRACER02: // non-live behavior
|
||||
return EQEmu::legacy::MaterialWrist;
|
||||
return EQEmu::textures::TextureWrist;
|
||||
case EQEmu::legacy::SlotHands:
|
||||
return EQEmu::legacy::MaterialHands;
|
||||
return EQEmu::textures::TextureHands;
|
||||
case EQEmu::legacy::SlotLegs:
|
||||
return EQEmu::legacy::MaterialLegs;
|
||||
return EQEmu::textures::TextureLegs;
|
||||
case EQEmu::legacy::SlotFeet:
|
||||
return EQEmu::legacy::MaterialFeet;
|
||||
return EQEmu::textures::TextureFeet;
|
||||
case EQEmu::legacy::SlotPrimary:
|
||||
return EQEmu::legacy::MaterialPrimary;
|
||||
return EQEmu::textures::TexturePrimary;
|
||||
case EQEmu::legacy::SlotSecondary:
|
||||
return EQEmu::legacy::MaterialSecondary;
|
||||
return EQEmu::textures::TextureSecondary;
|
||||
default:
|
||||
return EQEmu::legacy::MaterialInvalid;
|
||||
return EQEmu::textures::TextureInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -3046,7 +3046,7 @@ namespace RoF
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@ -4110,13 +4110,13 @@ namespace RoF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TexturePrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TextureSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
@ -3139,7 +3139,7 @@ namespace RoF2
|
||||
eq_cse->Gender = emu_cse->Gender;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@ -4333,13 +4333,13 @@ namespace RoF2
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TexturePrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TextureSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
@ -1105,11 +1105,11 @@ union
|
||||
/*00184*/ EquipStruct equipment[22]; // Total Slots
|
||||
};
|
||||
/*00624*/ uint32 equip2_count; // Seen 9
|
||||
/*00628*/ EquipStruct equipment2[EQEmu::legacy::MaterialCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00628*/ EquipStruct equipment2[EQEmu::textures::TextureCount]; // Appears to be Visible slots, but all 0s
|
||||
/*00808*/ uint32 tint_count; // Seen 9
|
||||
/*00812*/ Color_Struct item_tint[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00812*/ Color_Struct item_tint[EQEmu::textures::TextureCount]; // RR GG BB 00
|
||||
/*00848*/ uint32 tint_count2; // Seen 9
|
||||
/*00852*/ Color_Struct item_tint2[EQEmu::legacy::MaterialCount]; // RR GG BB 00
|
||||
/*00852*/ Color_Struct item_tint2[EQEmu::textures::TextureCount]; // RR GG BB 00
|
||||
/*00888*/ uint8 haircolor; // Player hair color
|
||||
/*00889*/ uint8 beardcolor; // Player beard color
|
||||
/*00890*/ uint32 unknown_rof5; //
|
||||
|
||||
@ -1993,7 +1993,7 @@ namespace SoD
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@ -2773,11 +2773,11 @@ namespace SoD
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TexturePrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TextureSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
}
|
||||
|
||||
@ -1649,7 +1649,7 @@ namespace SoF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
|
||||
@ -1223,14 +1223,14 @@ namespace Titanium
|
||||
if (eq->Race[char_index] > 473)
|
||||
eq->Race[char_index] = 1;
|
||||
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = emu_cse->Equip[index].Color.Color;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = emu_cse->BeardColor;
|
||||
eq->HairStyle[char_index] = emu_cse->HairStyle;
|
||||
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
eq->Equip[char_index][index] = emu_cse->Equip[index].Material;
|
||||
}
|
||||
|
||||
@ -1260,14 +1260,14 @@ namespace Titanium
|
||||
for (; char_index < 10; ++char_index) {
|
||||
eq->Race[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
eq->CS_Colors[char_index][index].Color = 0;
|
||||
}
|
||||
|
||||
eq->BeardColor[char_index] = 0;
|
||||
eq->HairStyle[char_index] = 0;
|
||||
|
||||
for (int index = 0; index < EQEmu::legacy::MaterialCount; ++index) {
|
||||
for (int index = 0; index < EQEmu::textures::TextureCount; ++index) {
|
||||
eq->Equip[char_index][index] = 0;
|
||||
}
|
||||
|
||||
|
||||
@ -2290,7 +2290,7 @@ namespace UF
|
||||
eq_cse->HairColor = emu_cse->HairColor;
|
||||
eq_cse->Face = emu_cse->Face;
|
||||
|
||||
for (int equip_index = 0; equip_index < EQEmu::legacy::MaterialCount; equip_index++) {
|
||||
for (int equip_index = 0; equip_index < EQEmu::textures::TextureCount; equip_index++) {
|
||||
eq_cse->Equip[equip_index].Material = emu_cse->Equip[equip_index].Material;
|
||||
eq_cse->Equip[equip_index].Unknown1 = emu_cse->Equip[equip_index].Unknown1;
|
||||
eq_cse->Equip[equip_index].EliteMaterial = emu_cse->Equip[equip_index].EliteMaterial;
|
||||
@ -3070,19 +3070,19 @@ namespace UF
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[EQEmu::legacy::MaterialPrimary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::textures::TexturePrimary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialPrimary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TexturePrimary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
if (emu->equipment[EQEmu::legacy::MaterialSecondary].Material > 99999) {
|
||||
if (emu->equipment[EQEmu::textures::TextureSecondary].Material > 99999) {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 63);
|
||||
} else {
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::legacy::MaterialSecondary].Material);
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, emu->equipment[EQEmu::textures::TextureSecondary].Material);
|
||||
}
|
||||
|
||||
VARSTRUCT_ENCODE_TYPE(uint32, Buffer, 0);
|
||||
|
||||
109
common/textures.cpp
Normal file
109
common/textures.cpp
Normal file
@ -0,0 +1,109 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "textures.h"
|
||||
//#include "inventory_slot.h"
|
||||
|
||||
#include <memory> // temp
|
||||
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(int equipment_slot)
|
||||
//{
|
||||
// switch (equipment_slot) {
|
||||
// case inventory::PossessionsHead:
|
||||
// return textures::TextureHead;
|
||||
// case inventory::PossessionsChest:
|
||||
// return textures::TextureChest;
|
||||
// case inventory::PossessionsArms:
|
||||
// return textures::TextureArms;
|
||||
// case inventory::PossessionsWrist1:
|
||||
// return textures::TextureWrist;
|
||||
// case inventory::PossessionsHands:
|
||||
// return textures::TextureHands;
|
||||
// case inventory::PossessionsLegs:
|
||||
// return textures::TextureLegs;
|
||||
// case inventory::PossessionsFeet:
|
||||
// return textures::TextureFeet;
|
||||
// case inventory::PossessionsPrimary:
|
||||
// return textures::TexturePrimary;
|
||||
// case inventory::PossessionsSecondary:
|
||||
// return textures::TextureSecondary;
|
||||
// default:
|
||||
// return textures::TextureInvalid;
|
||||
// }
|
||||
//}
|
||||
|
||||
//int EQEmu::textures::ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot)
|
||||
//{
|
||||
// if (equipment_slot.Type() != inventory::InvTypePossessions || equipment_slot.Bag() != inventory::InvBagInvalid || equipment_slot.Aug() != inventory::InvAugInvalid)
|
||||
// return textures::TextureInvalid;
|
||||
//
|
||||
// return ConvertEquipmentSlotToTextureSlot(equipment_slot.Slot());
|
||||
//}
|
||||
|
||||
//EQEmu::InventorySlot EQEmu::textures::ConvertTextureSlotToEquipmentSlot(int texture_slot)
|
||||
//{
|
||||
// switch (texture_slot) {
|
||||
// case textures::TextureHead:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHead);
|
||||
// case textures::TextureChest:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsChest);
|
||||
// case textures::TextureArms:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsArms);
|
||||
// case textures::TextureWrist:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsWrist1);
|
||||
// case textures::TextureHands:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsHands);
|
||||
// case textures::TextureLegs:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsLegs);
|
||||
// case textures::TextureFeet:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsFeet);
|
||||
// case textures::TexturePrimary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsPrimary);
|
||||
// case textures::TextureSecondary:
|
||||
// return EQEmu::InventorySlot(inventory::InvTypePossessions, inventory::PossessionsSecondary);
|
||||
// default:
|
||||
// return EQEmu::InventorySlot();
|
||||
// }
|
||||
//}
|
||||
|
||||
struct EQEmu::TextureProfile
|
||||
{
|
||||
union {
|
||||
struct {
|
||||
uint32 Head;
|
||||
uint32 Chest;
|
||||
uint32 Arms;
|
||||
uint32 Wrist;
|
||||
uint32 Hands;
|
||||
uint32 Legs;
|
||||
uint32 Feet;
|
||||
uint32 Primary;
|
||||
uint32 Secondary;
|
||||
};
|
||||
uint32 Texture[textures::TextureCount];
|
||||
};
|
||||
|
||||
TextureProfile();
|
||||
};
|
||||
|
||||
EQEmu::TextureProfile::TextureProfile()
|
||||
{
|
||||
memset(&Texture, 0, (sizeof(uint32) * textures::TextureCount));
|
||||
}
|
||||
61
common/textures.h
Normal file
61
common/textures.h
Normal file
@ -0,0 +1,61 @@
|
||||
/* EQEMu: Everquest Server Emulator
|
||||
|
||||
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; version 2 of the License.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||
are required to give you total support for your newly bought product;
|
||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef COMMON_TEXTURES_H
|
||||
#define COMMON_TEXTURES_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
namespace EQEmu
|
||||
{
|
||||
//class InventorySlot;
|
||||
|
||||
namespace textures {
|
||||
//enum : int { TextureInvalid = -1, TextureBegin };
|
||||
enum : uint8 { TextureInvalid = -1, TextureBegin };
|
||||
|
||||
//enum TextureSlot : int {
|
||||
enum TextureSlot : uint8 {
|
||||
TextureHead = TextureBegin,
|
||||
TextureChest,
|
||||
TextureArms,
|
||||
TextureWrist,
|
||||
TextureHands,
|
||||
TextureLegs,
|
||||
TextureFeet,
|
||||
TexturePrimary,
|
||||
TextureSecondary,
|
||||
TextureCount
|
||||
};
|
||||
|
||||
const int LastTexture = TextureSecondary;
|
||||
const int LastTintableTexture = TextureFeet;
|
||||
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(int equipment_slot);
|
||||
//extern int ConvertEquipmentSlotToTextureSlot(const InventorySlot &equipment_slot);
|
||||
//extern InventorySlot ConvertTextureSlotToEquipmentSlot(int texture_slot);
|
||||
|
||||
} /*textures*/
|
||||
|
||||
struct TextureProfile;
|
||||
|
||||
} /*EQEmu*/
|
||||
|
||||
#endif /*COMMON_TEXTURES_H*/
|
||||
@ -117,7 +117,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
|
||||
cse->Gender = (uint8)atoi(row[2]);
|
||||
cse->Face = (uint8)atoi(row[15]);
|
||||
|
||||
for (uint32 matslot = 0; matslot < EQEmu::legacy::MaterialCount; matslot++) { // Processed below
|
||||
for (uint32 matslot = 0; matslot < EQEmu::textures::TextureCount; matslot++) { // Processed below
|
||||
cse->Equip[matslot].Material = 0;
|
||||
cse->Equip[matslot].Unknown1 = 0;
|
||||
cse->Equip[matslot].EliteMaterial = 0;
|
||||
@ -249,7 +249,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
|
||||
const ItemInst* inst = nullptr;
|
||||
int16 invslot = 0;
|
||||
|
||||
for (uint32 matslot = 0; matslot < EQEmu::legacy::MaterialCount; matslot++) {
|
||||
for (uint32 matslot = 0; matslot < EQEmu::textures::TextureCount; matslot++) {
|
||||
invslot = Inventory::CalcSlotFromMaterial(matslot);
|
||||
if (invslot == INVALID_INDEX) { continue; }
|
||||
inst = inv.GetItem(invslot);
|
||||
@ -270,7 +270,7 @@ void WorldDatabase::GetCharSelectInfo(uint32 accountID, EQApplicationPacket **ou
|
||||
cse->Equip[matslot].Material = idfile;
|
||||
}
|
||||
}
|
||||
if (matslot == EQEmu::legacy::MaterialPrimary) {
|
||||
if (matslot == EQEmu::textures::TexturePrimary) {
|
||||
cse->PrimaryIDFile = idfile;
|
||||
}
|
||||
else {
|
||||
|
||||
@ -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()){
|
||||
|
||||
26
zone/bot.cpp
26
zone/bot.cpp
@ -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;
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -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));
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@ -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))
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
22
zone/npc.cpp
22
zone/npc.cpp
@ -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;
|
||||
|
||||
@ -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]);
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user