mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Pre-purposed clean-up
This commit is contained in:
+11
-11
@@ -4395,24 +4395,24 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
item = inst->GetItem();
|
||||
if (item != 0)
|
||||
{
|
||||
ns->spawn.equipment[i].material = item->Material;
|
||||
ns->spawn.equipment[i].elitematerial = item->EliteMaterial;
|
||||
ns->spawn.equipment[i].heroforgemodel = item->HerosForgeModel;
|
||||
ns->spawn.equipment[i].Material = item->Material;
|
||||
ns->spawn.equipment[i].EliteMaterial = item->EliteMaterial;
|
||||
ns->spawn.equipment[i].HeroForgeModel = item->HerosForgeModel;
|
||||
if (armor_tint[i])
|
||||
{
|
||||
ns->spawn.colors[i].color = armor_tint[i];
|
||||
ns->spawn.colors[i].Color = armor_tint[i];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
ns->spawn.colors[i].color = item->Color;
|
||||
ns->spawn.colors[i].Color = item->Color;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (armor_tint[i])
|
||||
{
|
||||
ns->spawn.colors[i].color = armor_tint[i];
|
||||
ns->spawn.colors[i].Color = armor_tint[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4426,9 +4426,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
{
|
||||
if(strlen(item->IDFile) > 2)
|
||||
{
|
||||
ns->spawn.equipment[MaterialPrimary].material = atoi(&item->IDFile[2]);
|
||||
ns->spawn.equipment[MaterialPrimary].Material = atoi(&item->IDFile[2]);
|
||||
}
|
||||
ns->spawn.colors[MaterialPrimary].color = GetEquipmentColor(MaterialPrimary);
|
||||
ns->spawn.colors[MaterialPrimary].Color = GetEquipmentColor(MaterialPrimary);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4440,9 +4440,9 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
{
|
||||
if(strlen(item->IDFile) > 2)
|
||||
{
|
||||
ns->spawn.equipment[MaterialSecondary].material = atoi(&item->IDFile[2]);
|
||||
ns->spawn.equipment[MaterialSecondary].Material = atoi(&item->IDFile[2]);
|
||||
}
|
||||
ns->spawn.colors[MaterialSecondary].color = GetEquipmentColor(MaterialSecondary);
|
||||
ns->spawn.colors[MaterialSecondary].Color = GetEquipmentColor(MaterialSecondary);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5061,7 +5061,7 @@ void Bot::SendBotArcheryWearChange(uint8 material_slot, uint32 material, uint32
|
||||
|
||||
wc->spawn_id = GetID();
|
||||
wc->material = material;
|
||||
wc->color.color = color;
|
||||
wc->color.Color = color;
|
||||
wc->wear_slot_id = material_slot;
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
|
||||
+3
-3
@@ -3039,7 +3039,7 @@ void Client::Tell_StringID(uint32 string_id, const char *who, const char *messag
|
||||
|
||||
void Client::SetTint(int16 in_slot, uint32 color) {
|
||||
Color_Struct new_color;
|
||||
new_color.color = color;
|
||||
new_color.Color = color;
|
||||
SetTint(in_slot, new_color);
|
||||
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color);
|
||||
}
|
||||
@@ -3050,8 +3050,8 @@ void Client::SetTint(int16 in_slot, Color_Struct& color) {
|
||||
uint8 matslot = Inventory::CalcMaterialFromSlot(in_slot);
|
||||
if (matslot != _MaterialInvalid)
|
||||
{
|
||||
m_pp.item_tint[matslot].color = color.color;
|
||||
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.color);
|
||||
m_pp.item_tint[matslot].Color = color.Color;
|
||||
database.SaveCharacterMaterialColor(this->CharacterID(), in_slot, color.Color);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1306,9 +1306,9 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
/* Set item material tint */
|
||||
for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_END; i++)
|
||||
{
|
||||
if (m_pp.item_tint[i].rgb.use_tint == 1 || m_pp.item_tint[i].rgb.use_tint == 255)
|
||||
if (m_pp.item_tint[i].RGB.UseTint == 1 || m_pp.item_tint[i].RGB.UseTint == 255)
|
||||
{
|
||||
m_pp.item_tint[i].rgb.use_tint = 0xFF;
|
||||
m_pp.item_tint[i].RGB.UseTint = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -7020,7 +7020,7 @@ void Client::Undye() {
|
||||
database.SaveInventory(CharacterID(), inst, slot2);
|
||||
}
|
||||
|
||||
m_pp.item_tint[cur_slot].color = 0;
|
||||
m_pp.item_tint[cur_slot].Color = 0;
|
||||
SendWearChange(cur_slot);
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -113,15 +113,15 @@ Corpse* Corpse::LoadCharacterCorpseEntity(uint32 in_dbid, uint32 in_charid, std:
|
||||
pc->Lock();
|
||||
|
||||
/* Load Item Tints */
|
||||
pc->item_tint[0].color = pcs->item_tint[0].color;
|
||||
pc->item_tint[1].color = pcs->item_tint[1].color;
|
||||
pc->item_tint[2].color = pcs->item_tint[2].color;
|
||||
pc->item_tint[3].color = pcs->item_tint[3].color;
|
||||
pc->item_tint[4].color = pcs->item_tint[4].color;
|
||||
pc->item_tint[5].color = pcs->item_tint[5].color;
|
||||
pc->item_tint[6].color = pcs->item_tint[6].color;
|
||||
pc->item_tint[7].color = pcs->item_tint[7].color;
|
||||
pc->item_tint[8].color = pcs->item_tint[8].color;
|
||||
pc->item_tint[0].Color = pcs->item_tint[0].Color;
|
||||
pc->item_tint[1].Color = pcs->item_tint[1].Color;
|
||||
pc->item_tint[2].Color = pcs->item_tint[2].Color;
|
||||
pc->item_tint[3].Color = pcs->item_tint[3].Color;
|
||||
pc->item_tint[4].Color = pcs->item_tint[4].Color;
|
||||
pc->item_tint[5].Color = pcs->item_tint[5].Color;
|
||||
pc->item_tint[6].Color = pcs->item_tint[6].Color;
|
||||
pc->item_tint[7].Color = pcs->item_tint[7].Color;
|
||||
pc->item_tint[8].Color = pcs->item_tint[8].Color;
|
||||
|
||||
/* Load Physical Appearance */
|
||||
pc->haircolor = pcs->haircolor;
|
||||
@@ -1413,8 +1413,8 @@ uint32 Corpse::GetEquipmentColor(uint8 material_slot) const {
|
||||
|
||||
item = database.GetItem(GetEquipment(material_slot));
|
||||
if(item != NO_ITEM) {
|
||||
return item_tint[material_slot].rgb.use_tint ?
|
||||
item_tint[material_slot].color :
|
||||
return item_tint[material_slot].RGB.UseTint ?
|
||||
item_tint[material_slot].Color :
|
||||
item->Color;
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -1984,9 +1984,9 @@ void Client::QSSwapItemAuditor(MoveItem_Struct* move_in, bool postaction_call) {
|
||||
void Client::DyeArmor(DyeStruct* dye){
|
||||
int16 slot=0;
|
||||
for (int i = EmuConstants::MATERIAL_BEGIN; i <= EmuConstants::MATERIAL_TINT_END; i++) {
|
||||
if (m_pp.item_tint[i].rgb.blue != dye->dye[i].rgb.blue ||
|
||||
m_pp.item_tint[i].rgb.red != dye->dye[i].rgb.red ||
|
||||
m_pp.item_tint[i].rgb.green != dye->dye[i].rgb.green
|
||||
if (m_pp.item_tint[i].RGB.Blue != dye->dye[i].RGB.Blue ||
|
||||
m_pp.item_tint[i].RGB.Red != dye->dye[i].RGB.Red ||
|
||||
m_pp.item_tint[i].RGB.Green != dye->dye[i].RGB.Green
|
||||
) {
|
||||
slot = m_inv.HasItem(32557, 1, invWherePersonal);
|
||||
if (slot != INVALID_INDEX){
|
||||
@@ -1994,18 +1994,18 @@ void Client::DyeArmor(DyeStruct* dye){
|
||||
uint8 slot2=SlotConvert(i);
|
||||
ItemInst* inst = this->m_inv.GetItem(slot2);
|
||||
if(inst){
|
||||
uint32 armor_color = ((uint32)dye->dye[i].rgb.red << 16) | ((uint32)dye->dye[i].rgb.green << 8) | ((uint32)dye->dye[i].rgb.blue);
|
||||
uint32 armor_color = ((uint32)dye->dye[i].RGB.Red << 16) | ((uint32)dye->dye[i].RGB.Green << 8) | ((uint32)dye->dye[i].RGB.Blue);
|
||||
inst->SetColor(armor_color);
|
||||
database.SaveCharacterMaterialColor(this->CharacterID(), i, armor_color);
|
||||
database.SaveInventory(CharacterID(),inst,slot2);
|
||||
if(dye->dye[i].rgb.use_tint)
|
||||
m_pp.item_tint[i].rgb.use_tint = 0xFF;
|
||||
if(dye->dye[i].RGB.UseTint)
|
||||
m_pp.item_tint[i].RGB.UseTint = 0xFF;
|
||||
else
|
||||
m_pp.item_tint[i].rgb.use_tint=0x00;
|
||||
m_pp.item_tint[i].RGB.UseTint=0x00;
|
||||
}
|
||||
m_pp.item_tint[i].rgb.blue=dye->dye[i].rgb.blue;
|
||||
m_pp.item_tint[i].rgb.red=dye->dye[i].rgb.red;
|
||||
m_pp.item_tint[i].rgb.green=dye->dye[i].rgb.green;
|
||||
m_pp.item_tint[i].RGB.Blue=dye->dye[i].RGB.Blue;
|
||||
m_pp.item_tint[i].RGB.Red=dye->dye[i].RGB.Red;
|
||||
m_pp.item_tint[i].RGB.Green=dye->dye[i].RGB.Green;
|
||||
SendWearChange(i);
|
||||
}
|
||||
else{
|
||||
@@ -2420,7 +2420,7 @@ uint32 Client::GetEquipmentColor(uint8 material_slot) const
|
||||
|
||||
const Item_Struct *item = database.GetItem(GetEquipment(material_slot));
|
||||
if(item != nullptr)
|
||||
return ((m_pp.item_tint[material_slot].rgb.use_tint) ? m_pp.item_tint[material_slot].color : item->Color);
|
||||
return ((m_pp.item_tint[material_slot].RGB.UseTint) ? m_pp.item_tint[material_slot].Color : item->Color);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
+9
-9
@@ -961,10 +961,10 @@ void Mob::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho)
|
||||
// Only Player Races Wear Armor
|
||||
if (Mob::IsPlayerRace(race) || i > 6)
|
||||
{
|
||||
ns->spawn.equipment[i].material = GetEquipmentMaterial(i);
|
||||
ns->spawn.equipment[i].elitematerial = IsEliteMaterialItem(i);
|
||||
ns->spawn.equipment[i].heroforgemodel = GetHerosForgeModel(i);
|
||||
ns->spawn.colors[i].color = GetEquipmentColor(i);
|
||||
ns->spawn.equipment[i].Material = GetEquipmentMaterial(i);
|
||||
ns->spawn.equipment[i].EliteMaterial = IsEliteMaterialItem(i);
|
||||
ns->spawn.equipment[i].HeroForgeModel = GetHerosForgeModel(i);
|
||||
ns->spawn.colors[i].Color = GetEquipmentColor(i);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2562,7 +2562,7 @@ void Mob::SendWearChange(uint8 material_slot)
|
||||
wc->material = GetEquipmentMaterial(material_slot);
|
||||
wc->elite_material = IsEliteMaterialItem(material_slot);
|
||||
wc->hero_forge_model = GetHerosForgeModel(material_slot);
|
||||
wc->color.color = GetEquipmentColor(material_slot);
|
||||
wc->color.Color = GetEquipmentColor(material_slot);
|
||||
wc->wear_slot_id = material_slot;
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
@@ -2577,9 +2577,9 @@ void Mob::SendTextureWC(uint8 slot, uint16 texture, uint32 hero_forge_model, uin
|
||||
wc->spawn_id = this->GetID();
|
||||
wc->material = texture;
|
||||
if (this->IsClient())
|
||||
wc->color.color = GetEquipmentColor(slot);
|
||||
wc->color.Color = GetEquipmentColor(slot);
|
||||
else
|
||||
wc->color.color = this->GetArmorTint(slot);
|
||||
wc->color.Color = this->GetArmorTint(slot);
|
||||
wc->wear_slot_id = slot;
|
||||
|
||||
wc->unknown06 = unknown06;
|
||||
@@ -2607,7 +2607,7 @@ void Mob::SetSlotTint(uint8 material_slot, uint8 red_tint, uint8 green_tint, uin
|
||||
wc->spawn_id = this->GetID();
|
||||
wc->material = GetEquipmentMaterial(material_slot);
|
||||
wc->hero_forge_model = GetHerosForgeModel(material_slot);
|
||||
wc->color.color = color;
|
||||
wc->color.Color = color;
|
||||
wc->wear_slot_id = material_slot;
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
@@ -2624,7 +2624,7 @@ void Mob::WearChange(uint8 material_slot, uint16 texture, uint32 color, uint32 h
|
||||
wc->spawn_id = this->GetID();
|
||||
wc->material = texture;
|
||||
wc->hero_forge_model = hero_forge_model;
|
||||
wc->color.color = color;
|
||||
wc->color.Color = color;
|
||||
wc->wear_slot_id = material_slot;
|
||||
|
||||
entity_list.QueueClients(this, outapp);
|
||||
|
||||
+25
-25
@@ -1167,10 +1167,10 @@ bool ZoneDatabase::LoadCharacterMaterialColor(uint32 character_id, PlayerProfile
|
||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||
r = 0;
|
||||
i = atoi(row[r]); /* Slot */ r++;
|
||||
pp->item_tint[i].rgb.blue = atoi(row[r]); r++;
|
||||
pp->item_tint[i].rgb.green = atoi(row[r]); r++;
|
||||
pp->item_tint[i].rgb.red = atoi(row[r]); r++;
|
||||
pp->item_tint[i].rgb.use_tint = atoi(row[r]);
|
||||
pp->item_tint[i].RGB.Blue = atoi(row[r]); r++;
|
||||
pp->item_tint[i].RGB.Green = atoi(row[r]); r++;
|
||||
pp->item_tint[i].RGB.Red = atoi(row[r]); r++;
|
||||
pp->item_tint[i].RGB.UseTint = atoi(row[r]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -3546,9 +3546,9 @@ uint32 ZoneDatabase::UpdateCharacterCorpse(uint32 db_id, uint32 char_id, const c
|
||||
dbpc->plat, dbpc->haircolor, dbpc->beardcolor, dbpc->eyecolor1,
|
||||
dbpc->eyecolor2, dbpc->hairstyle, dbpc->face, dbpc->beard,
|
||||
dbpc->drakkin_heritage, dbpc->drakkin_tattoo, dbpc->drakkin_details,
|
||||
dbpc->item_tint[0].color, dbpc->item_tint[1].color, dbpc->item_tint[2].color,
|
||||
dbpc->item_tint[3].color, dbpc->item_tint[4].color, dbpc->item_tint[5].color,
|
||||
dbpc->item_tint[6].color, dbpc->item_tint[7].color, dbpc->item_tint[8].color,
|
||||
dbpc->item_tint[0].Color, dbpc->item_tint[1].Color, dbpc->item_tint[2].Color,
|
||||
dbpc->item_tint[3].Color, dbpc->item_tint[4].Color, dbpc->item_tint[5].Color,
|
||||
dbpc->item_tint[6].Color, dbpc->item_tint[7].Color, dbpc->item_tint[8].Color,
|
||||
db_id);
|
||||
auto results = QueryDatabase(query);
|
||||
|
||||
@@ -3639,15 +3639,15 @@ uint32 ZoneDatabase::SaveCharacterCorpse(uint32 charid, const char* charname, ui
|
||||
dbpc->drakkin_heritage,
|
||||
dbpc->drakkin_tattoo,
|
||||
dbpc->drakkin_details,
|
||||
dbpc->item_tint[0].color,
|
||||
dbpc->item_tint[1].color,
|
||||
dbpc->item_tint[2].color,
|
||||
dbpc->item_tint[3].color,
|
||||
dbpc->item_tint[4].color,
|
||||
dbpc->item_tint[5].color,
|
||||
dbpc->item_tint[6].color,
|
||||
dbpc->item_tint[7].color,
|
||||
dbpc->item_tint[8].color
|
||||
dbpc->item_tint[0].Color,
|
||||
dbpc->item_tint[1].Color,
|
||||
dbpc->item_tint[2].Color,
|
||||
dbpc->item_tint[3].Color,
|
||||
dbpc->item_tint[4].Color,
|
||||
dbpc->item_tint[5].Color,
|
||||
dbpc->item_tint[6].Color,
|
||||
dbpc->item_tint[7].Color,
|
||||
dbpc->item_tint[8].Color
|
||||
);
|
||||
auto results = QueryDatabase(query);
|
||||
uint32 last_insert_id = results.LastInsertedID();
|
||||
@@ -3819,15 +3819,15 @@ bool ZoneDatabase::LoadCharacterCorpseData(uint32 corpse_id, PlayerCorpse_Struct
|
||||
pcs->drakkin_heritage = atoul(row[i++]); // drakkin_heritage,
|
||||
pcs->drakkin_tattoo = atoul(row[i++]); // drakkin_tattoo,
|
||||
pcs->drakkin_details = atoul(row[i++]); // drakkin_details,
|
||||
pcs->item_tint[0].color = atoul(row[i++]); // wc_1,
|
||||
pcs->item_tint[1].color = atoul(row[i++]); // wc_2,
|
||||
pcs->item_tint[2].color = atoul(row[i++]); // wc_3,
|
||||
pcs->item_tint[3].color = atoul(row[i++]); // wc_4,
|
||||
pcs->item_tint[4].color = atoul(row[i++]); // wc_5,
|
||||
pcs->item_tint[5].color = atoul(row[i++]); // wc_6,
|
||||
pcs->item_tint[6].color = atoul(row[i++]); // wc_7,
|
||||
pcs->item_tint[7].color = atoul(row[i++]); // wc_8,
|
||||
pcs->item_tint[8].color = atoul(row[i++]); // wc_9
|
||||
pcs->item_tint[0].Color = atoul(row[i++]); // wc_1,
|
||||
pcs->item_tint[1].Color = atoul(row[i++]); // wc_2,
|
||||
pcs->item_tint[2].Color = atoul(row[i++]); // wc_3,
|
||||
pcs->item_tint[3].Color = atoul(row[i++]); // wc_4,
|
||||
pcs->item_tint[4].Color = atoul(row[i++]); // wc_5,
|
||||
pcs->item_tint[5].Color = atoul(row[i++]); // wc_6,
|
||||
pcs->item_tint[6].Color = atoul(row[i++]); // wc_7,
|
||||
pcs->item_tint[7].Color = atoul(row[i++]); // wc_8,
|
||||
pcs->item_tint[8].Color = atoul(row[i++]); // wc_9
|
||||
}
|
||||
query = StringFormat(
|
||||
"SELECT \n"
|
||||
|
||||
Reference in New Issue
Block a user