mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Changes to how valid light sources are critiqued
This commit is contained in:
+14
-16
@@ -97,7 +97,7 @@ Bot::Bot(NPCType npcTypeData, Client* botOwner) : NPC(&npcTypeData, nullptr, glm
|
||||
|
||||
strcpy(this->name, this->GetCleanName());
|
||||
|
||||
active_light = spell_light = equip_light = innate_light = NOT_USED;
|
||||
memset(&m_Light, 0, sizeof(LightProfile_Struct));
|
||||
}
|
||||
|
||||
// This constructor is used when the bot is loaded out of the database
|
||||
@@ -213,8 +213,6 @@ Bot::Bot(uint32 botID, uint32 botOwnerCharacterID, uint32 botSpellsID, double to
|
||||
if(cur_mana > max_mana)
|
||||
cur_mana = max_mana;
|
||||
cur_end = max_end;
|
||||
|
||||
active_light = spell_light = equip_light = innate_light = NOT_USED;
|
||||
}
|
||||
|
||||
Bot::~Bot() {
|
||||
@@ -4121,8 +4119,8 @@ void Bot::Spawn(Client* botCharacterOwner, std::string* errorMessage) {
|
||||
// Level the bot to the same level as the bot owner
|
||||
//this->SetLevel(botCharacterOwner->GetLevel());
|
||||
|
||||
UpdateEquipLightValue();
|
||||
UpdateActiveLightValue();
|
||||
UpdateEquipmentLight();
|
||||
UpdateActiveLight();
|
||||
|
||||
entity_list.AddBot(this, true, true);
|
||||
|
||||
@@ -4187,7 +4185,7 @@ void Bot::RemoveBotItemBySlot(uint32 slotID, std::string *errorMessage) {
|
||||
*errorMessage = std::string(results.ErrorMessage());
|
||||
|
||||
m_inv.DeleteItem(slotID);
|
||||
UpdateEquipLightValue();
|
||||
UpdateEquipmentLight();
|
||||
}
|
||||
|
||||
// Retrieves all the inventory records from the database for this bot.
|
||||
@@ -4249,7 +4247,7 @@ void Bot::GetBotItems(std::string* errorMessage, Inventory &inv) {
|
||||
|
||||
}
|
||||
|
||||
UpdateEquipLightValue();
|
||||
UpdateEquipmentLight();
|
||||
}
|
||||
|
||||
// Returns the inventory record for this bot from the database for the specified equipment slot.
|
||||
@@ -4375,8 +4373,8 @@ void Bot::FillSpawnStruct(NewSpawn_Struct* ns, Mob* ForWho) {
|
||||
ns->spawn.size = 0;
|
||||
ns->spawn.NPC = 0; // 0=player,1=npc,2=pc corpse,3=npc corpse
|
||||
|
||||
UpdateActiveLightValue();
|
||||
ns->spawn.light = active_light;
|
||||
UpdateActiveLight();
|
||||
ns->spawn.light = m_Light.Type.Active;
|
||||
|
||||
ns->spawn.helm = helmtexture; //0xFF;
|
||||
ns->spawn.equip_chest2 = texture; //0xFF;
|
||||
@@ -5088,9 +5086,9 @@ void Bot::BotAddEquipItem(int slot, uint32 id) {
|
||||
SendWearChange(materialFromSlot);
|
||||
}
|
||||
|
||||
UpdateEquipLightValue();
|
||||
if (UpdateActiveLightValue())
|
||||
SendAppearancePacket(AT_Light, GetActiveLightValue());
|
||||
UpdateEquipmentLight();
|
||||
if (UpdateActiveLight())
|
||||
SendAppearancePacket(AT_Light, GetActiveLightType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5106,9 +5104,9 @@ void Bot::BotRemoveEquipItem(int slot) {
|
||||
SendWearChange(MaterialArms);
|
||||
}
|
||||
|
||||
UpdateEquipLightValue();
|
||||
if (UpdateActiveLightValue())
|
||||
SendAppearancePacket(AT_Light, GetActiveLightValue());
|
||||
UpdateEquipmentLight();
|
||||
if (UpdateActiveLight())
|
||||
SendAppearancePacket(AT_Light, GetActiveLightType());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8407,7 +8405,7 @@ void Bot::EquipBot(std::string* errorMessage) {
|
||||
}
|
||||
}
|
||||
|
||||
UpdateEquipLightValue();
|
||||
UpdateEquipmentLight();
|
||||
}
|
||||
|
||||
//// This method is meant to be called by zone or client methods to clean up objects when a client camps, goes LD, zones out or something like that.
|
||||
|
||||
Reference in New Issue
Block a user