mirror of
https://github.com/EQEmu/Server.git
synced 2026-04-17 10:42:26 +00:00
Fix pet instrument mod issue
This commit is contained in:
parent
8aadc36320
commit
00721f4a96
@ -30,7 +30,7 @@
|
|||||||
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9079
|
#define CURRENT_BINARY_DATABASE_VERSION 9080
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
|
|||||||
@ -333,6 +333,7 @@
|
|||||||
9077|2015_02_12_zone_gravity.sql|SHOW COLUMNS FROM `zone` LIKE 'gravity'|empty|
|
9077|2015_02_12_zone_gravity.sql|SHOW COLUMNS FROM `zone` LIKE 'gravity'|empty|
|
||||||
9078|2015_05_20_BuffInstrumentMod.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'instrument_mod'|empty|
|
9078|2015_05_20_BuffInstrumentMod.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'instrument_mod'|empty|
|
||||||
9079|2015_05_23_BuffDurations.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'ticsremaining'|contains|unsigned|
|
9079|2015_05_23_BuffDurations.sql|SHOW COLUMNS FROM `character_buffs` LIKE 'ticsremaining'|contains|unsigned|
|
||||||
|
9080|2015_05_23_PetBuffInstrumentMod.sql|SHOW COLUMNS FROM `character_pet_buffs` LIKE 'instrument_mod'|empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `character_pet_buffs` ADD COLUMN `instrument_mod` tinyint UNSIGNED DEFAULT 10 NOT NULL;
|
||||||
@ -588,6 +588,7 @@ void NPC::SetPetState(SpellBuff_Struct *pet_buffs, uint32 *items) {
|
|||||||
buffs[i].casterid = 0;
|
buffs[i].casterid = 0;
|
||||||
buffs[i].counters = pet_buffs[i].counters;
|
buffs[i].counters = pet_buffs[i].counters;
|
||||||
buffs[i].numhits = spells[pet_buffs[i].spellid].numhits;
|
buffs[i].numhits = spells[pet_buffs[i].spellid].numhits;
|
||||||
|
buffs[i].instrument_mod = pet_buffs[i].bard_modifier;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
buffs[i].spellid = SPELL_UNKNOWN;
|
buffs[i].spellid = SPELL_UNKNOWN;
|
||||||
|
|||||||
@ -3127,16 +3127,16 @@ void ZoneDatabase::SavePetInfo(Client *client)
|
|||||||
if (query.length() == 0)
|
if (query.length() == 0)
|
||||||
query = StringFormat("INSERT INTO `character_pet_buffs` "
|
query = StringFormat("INSERT INTO `character_pet_buffs` "
|
||||||
"(`char_id`, `pet`, `slot`, `spell_id`, `caster_level`, "
|
"(`char_id`, `pet`, `slot`, `spell_id`, `caster_level`, "
|
||||||
"`ticsremaining`, `counters`) "
|
"`ticsremaining`, `counters`, `instrument_mod`) "
|
||||||
"VALUES (%u, %u, %u, %u, %u, %d, %d)",
|
"VALUES (%u, %u, %u, %u, %u, %d, %d, %u)",
|
||||||
client->CharacterID(), pet, index, petinfo->Buffs[index].spellid,
|
client->CharacterID(), pet, index, petinfo->Buffs[index].spellid,
|
||||||
petinfo->Buffs[index].level, petinfo->Buffs[index].duration,
|
petinfo->Buffs[index].level, petinfo->Buffs[index].duration,
|
||||||
petinfo->Buffs[index].counters);
|
petinfo->Buffs[index].counters, petinfo->Buffs[index].bard_modifier);
|
||||||
else
|
else
|
||||||
query += StringFormat(", (%u, %u, %u, %u, %u, %d, %d)",
|
query += StringFormat(", (%u, %u, %u, %u, %u, %d, %d, %u)",
|
||||||
client->CharacterID(), pet, index, petinfo->Buffs[index].spellid,
|
client->CharacterID(), pet, index, petinfo->Buffs[index].spellid,
|
||||||
petinfo->Buffs[index].level, petinfo->Buffs[index].duration,
|
petinfo->Buffs[index].level, petinfo->Buffs[index].duration,
|
||||||
petinfo->Buffs[index].counters);
|
petinfo->Buffs[index].counters, petinfo->Buffs[index].bard_modifier);
|
||||||
}
|
}
|
||||||
database.QueryDatabase(query);
|
database.QueryDatabase(query);
|
||||||
query.clear();
|
query.clear();
|
||||||
@ -3174,7 +3174,8 @@ void ZoneDatabase::UpdateItemRecastTimestamps(uint32 char_id, uint32 recast_type
|
|||||||
QueryDatabase(query);
|
QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ZoneDatabase::LoadPetInfo(Client *client) {
|
void ZoneDatabase::LoadPetInfo(Client *client)
|
||||||
|
{
|
||||||
|
|
||||||
// Load current pet and suspended pet
|
// Load current pet and suspended pet
|
||||||
PetInfo *petinfo = client->GetPetInfo(0);
|
PetInfo *petinfo = client->GetPetInfo(0);
|
||||||
@ -3185,7 +3186,8 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
|||||||
|
|
||||||
std::string query = StringFormat("SELECT `pet`, `petname`, `petpower`, `spell_id`, "
|
std::string query = StringFormat("SELECT `pet`, `petname`, `petpower`, `spell_id`, "
|
||||||
"`hp`, `mana`, `size` FROM `character_pet_info` "
|
"`hp`, `mana`, `size` FROM `character_pet_info` "
|
||||||
"WHERE `char_id` = %u", client->CharacterID());
|
"WHERE `char_id` = %u",
|
||||||
|
client->CharacterID());
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = database.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
@ -3211,8 +3213,9 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
query = StringFormat("SELECT `pet`, `slot`, `spell_id`, `caster_level`, `castername`, "
|
query = StringFormat("SELECT `pet`, `slot`, `spell_id`, `caster_level`, `castername`, "
|
||||||
"`ticsremaining`, `counters` FROM `character_pet_buffs` "
|
"`ticsremaining`, `counters`, `instrument_mod` FROM `character_pet_buffs` "
|
||||||
"WHERE `char_id` = %u", client->CharacterID());
|
"WHERE `char_id` = %u",
|
||||||
|
client->CharacterID());
|
||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
@ -3240,6 +3243,7 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
|||||||
// The castername field is currently unused
|
// The castername field is currently unused
|
||||||
int32 ticsremaining = atoi(row[5]);
|
int32 ticsremaining = atoi(row[5]);
|
||||||
uint32 counters = atoul(row[6]);
|
uint32 counters = atoul(row[6]);
|
||||||
|
uint8 bard_mod = atoul(row[7]);
|
||||||
|
|
||||||
pi->Buffs[slot_id].spellid = spell_id;
|
pi->Buffs[slot_id].spellid = spell_id;
|
||||||
pi->Buffs[slot_id].level = caster_level;
|
pi->Buffs[slot_id].level = caster_level;
|
||||||
@ -3248,11 +3252,13 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
|||||||
|
|
||||||
pi->Buffs[slot_id].duration = ticsremaining;
|
pi->Buffs[slot_id].duration = ticsremaining;
|
||||||
pi->Buffs[slot_id].counters = counters;
|
pi->Buffs[slot_id].counters = counters;
|
||||||
|
pi->Buffs[slot_id].bard_modifier = bard_mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
query = StringFormat("SELECT `pet`, `slot`, `item_id` "
|
query = StringFormat("SELECT `pet`, `slot`, `item_id` "
|
||||||
"FROM `character_pet_inventory` "
|
"FROM `character_pet_inventory` "
|
||||||
"WHERE `char_id`=%u",client->CharacterID());
|
"WHERE `char_id`=%u",
|
||||||
|
client->CharacterID());
|
||||||
results = database.QueryDatabase(query);
|
results = database.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
@ -3273,7 +3279,6 @@ void ZoneDatabase::LoadPetInfo(Client *client) {
|
|||||||
|
|
||||||
pi->Items[slot] = atoul(row[2]);
|
pi->Items[slot] = atoul(row[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ZoneDatabase::GetFactionData(FactionMods* fm, uint32 class_mod, uint32 race_mod, uint32 deity_mod, int32 faction_id) {
|
bool ZoneDatabase::GetFactionData(FactionMods* fm, uint32 class_mod, uint32 race_mod, uint32 deity_mod, int32 faction_id) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user