mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Give pets 30 buff because that's what they got
This commit is contained in:
+4
-4
@@ -1709,8 +1709,8 @@ bool Bot::LoadPet()
|
||||
|
||||
NPC *pet_inst = GetPet()->CastToNPC();
|
||||
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT];
|
||||
memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * BUFF_COUNT));
|
||||
SpellBuff_Struct pet_buffs[PET_BUFF_COUNT];
|
||||
memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * PET_BUFF_COUNT));
|
||||
if (!botdb.LoadPetBuffs(GetBotID(), pet_buffs))
|
||||
bot_owner->Message(13, "%s for %s's pet", BotDatabase::fail::LoadPetBuffs(), GetCleanName());
|
||||
|
||||
@@ -1741,11 +1741,11 @@ bool Bot::SavePet()
|
||||
return false;
|
||||
|
||||
char* pet_name = new char[64];
|
||||
SpellBuff_Struct pet_buffs[BUFF_COUNT];
|
||||
SpellBuff_Struct pet_buffs[PET_BUFF_COUNT];
|
||||
uint32 pet_items[EQEmu::legacy::EQUIPMENT_SIZE];
|
||||
|
||||
memset(pet_name, 0, 64);
|
||||
memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * BUFF_COUNT));
|
||||
memset(pet_buffs, 0, (sizeof(SpellBuff_Struct) * PET_BUFF_COUNT));
|
||||
memset(pet_items, 0, (sizeof(uint32) * EQEmu::legacy::EQUIPMENT_SIZE));
|
||||
|
||||
pet_inst->GetPetState(pet_buffs, pet_items, pet_name);
|
||||
|
||||
@@ -1472,7 +1472,7 @@ bool BotDatabase::LoadPetBuffs(const uint32 bot_id, SpellBuff_Struct* pet_buffs)
|
||||
return true;
|
||||
|
||||
int buff_index = 0;
|
||||
for (auto row = results.begin(); row != results.end() && buff_index < BUFF_COUNT; ++row) {
|
||||
for (auto row = results.begin(); row != results.end() && buff_index < PET_BUFF_COUNT; ++row) {
|
||||
pet_buffs[buff_index].spellid = atoi(row[0]);
|
||||
pet_buffs[buff_index].level = atoi(row[1]);
|
||||
pet_buffs[buff_index].duration = atoi(row[2]);
|
||||
@@ -1509,7 +1509,7 @@ bool BotDatabase::SavePetBuffs(const uint32 bot_id, const SpellBuff_Struct* pet_
|
||||
if (!saved_pet_index)
|
||||
return true;
|
||||
|
||||
for (int buff_index = 0; buff_index < BUFF_COUNT; ++buff_index) {
|
||||
for (int buff_index = 0; buff_index < PET_BUFF_COUNT; ++buff_index) {
|
||||
if (!pet_buffs[buff_index].spellid || pet_buffs[buff_index].spellid == SPELL_UNKNOWN)
|
||||
continue;
|
||||
|
||||
|
||||
+2
-2
@@ -5368,8 +5368,8 @@ void Mob::SendPetBuffsToClient()
|
||||
|
||||
int MaxSlots = GetMaxTotalSlots();
|
||||
|
||||
if(MaxSlots > BUFF_COUNT)
|
||||
MaxSlots = BUFF_COUNT;
|
||||
if(MaxSlots > PET_BUFF_COUNT)
|
||||
MaxSlots = PET_BUFF_COUNT;
|
||||
|
||||
for(int buffslot = 0; buffslot < MaxSlots; buffslot++)
|
||||
{
|
||||
|
||||
+2
-1
@@ -3178,7 +3178,8 @@ void ZoneDatabase::SavePetInfo(Client *client)
|
||||
query.clear();
|
||||
|
||||
// pet buffs!
|
||||
for (int index = 0; index < RuleI(Spells, MaxTotalSlotsPET); index++) {
|
||||
int max_slots = RuleI(Spells, MaxTotalSlotsPET);
|
||||
for (int index = 0; index < max_slots; index++) {
|
||||
if (petinfo->Buffs[index].spellid == SPELL_UNKNOWN || petinfo->Buffs[index].spellid == 0)
|
||||
continue;
|
||||
if (query.length() == 0)
|
||||
|
||||
+1
-1
@@ -125,7 +125,7 @@ struct PetInfo {
|
||||
uint32 HP;
|
||||
uint32 Mana;
|
||||
float size;
|
||||
SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||
SpellBuff_Struct Buffs[PET_BUFF_COUNT];
|
||||
uint32 Items[EQEmu::legacy::EQUIPMENT_SIZE];
|
||||
char Name[64];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user