mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-10 15:00:25 +00:00
Updates to fix taunt button on PET UI to match live behavior.
This commit is contained in:
+8
-6
@@ -3788,13 +3788,14 @@ void ZoneDatabase::SavePetInfo(Client *client)
|
||||
continue;
|
||||
|
||||
query = StringFormat("INSERT INTO `character_pet_info` "
|
||||
"(`char_id`, `pet`, `petname`, `petpower`, `spell_id`, `hp`, `mana`, `size`) "
|
||||
"VALUES (%u, %u, '%s', %i, %u, %u, %u, %f) "
|
||||
"(`char_id`, `pet`, `petname`, `petpower`, `spell_id`, `hp`, `mana`, `size`, `taunting`) "
|
||||
"VALUES (%u, %u, '%s', %i, %u, %u, %u, %f, %u) "
|
||||
"ON DUPLICATE KEY UPDATE `petname` = '%s', `petpower` = %i, `spell_id` = %u, "
|
||||
"`hp` = %u, `mana` = %u, `size` = %f",
|
||||
"`hp` = %u, `mana` = %u, `size` = %f, `taunting` = %u",
|
||||
client->CharacterID(), pet, petinfo->Name, petinfo->petpower, petinfo->SpellID,
|
||||
petinfo->HP, petinfo->Mana, petinfo->size, // and now the ON DUPLICATE ENTRIES
|
||||
petinfo->Name, petinfo->petpower, petinfo->SpellID, petinfo->HP, petinfo->Mana, petinfo->size);
|
||||
petinfo->HP, petinfo->Mana, petinfo->size, (petinfo->taunting) ? 1 : 0,
|
||||
// and now the ON DUPLICATE ENTRIES
|
||||
petinfo->Name, petinfo->petpower, petinfo->SpellID, petinfo->HP, petinfo->Mana, petinfo->size, (petinfo->taunting) ? 1 : 0);
|
||||
results = database.QueryDatabase(query);
|
||||
if (!results.Success())
|
||||
return;
|
||||
@@ -3866,7 +3867,7 @@ void ZoneDatabase::LoadPetInfo(Client *client)
|
||||
memset(suspended, 0, sizeof(PetInfo));
|
||||
|
||||
std::string query = StringFormat("SELECT `pet`, `petname`, `petpower`, `spell_id`, "
|
||||
"`hp`, `mana`, `size` FROM `character_pet_info` "
|
||||
"`hp`, `mana`, `size` , `taunting` FROM `character_pet_info` "
|
||||
"WHERE `char_id` = %u",
|
||||
client->CharacterID());
|
||||
auto results = database.QueryDatabase(query);
|
||||
@@ -3891,6 +3892,7 @@ void ZoneDatabase::LoadPetInfo(Client *client)
|
||||
pi->HP = atoul(row[4]);
|
||||
pi->Mana = atoul(row[5]);
|
||||
pi->size = atof(row[6]);
|
||||
pi->taunting = (bool) atoi(row[7]);
|
||||
}
|
||||
|
||||
query = StringFormat("SELECT `pet`, `slot`, `spell_id`, `caster_level`, `castername`, "
|
||||
|
||||
Reference in New Issue
Block a user