Core/BattlePets: Implemented battle pet name query packet
Port From (https://github.com/TrinityCore/TrinityCore/commit/8614690e27df8197586cc702760409293f3f6c3d)
This commit is contained in:
@@ -14,31 +14,24 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
using System;
|
||||
|
||||
namespace Framework.Constants
|
||||
{
|
||||
[Flags]
|
||||
public enum BattlePetError
|
||||
{
|
||||
CantHaveMorePetsOfThatType = 3, // You can't have any more pets of that type.
|
||||
CantHaveMorePets = 4, // You can't have any more pets.
|
||||
TooHighLevelToUncage = 7, // This pet is too high level for you to uncage.
|
||||
}
|
||||
|
||||
public enum FlagsControlType
|
||||
{
|
||||
Apply = 1,
|
||||
Remove = 2
|
||||
}
|
||||
|
||||
public enum BattlePetError
|
||||
{
|
||||
CantHaveMorePetsOfThatType = 3,
|
||||
CantHaveMorePets = 4,
|
||||
TooHighLevelToUncage = 7,
|
||||
|
||||
// TODO: find correct values if possible and needed (also wrong order)
|
||||
DuplicateConvertedPet,
|
||||
NeedToUnlock,
|
||||
BadParam,
|
||||
LockedPetAlreadyExists,
|
||||
Ok,
|
||||
Uncapturable,
|
||||
CantInvalidCharacterGuid
|
||||
}
|
||||
|
||||
// taken from BattlePetState.db2 - it seems to store some initial values for battle pets
|
||||
// there are only values used in BattlePetSpeciesState.db2 and BattlePetBreedState.db2
|
||||
// TODO: expand this enum if needed
|
||||
|
||||
@@ -151,10 +151,10 @@ namespace Framework.Database
|
||||
PrepareStatement(LoginStatements.REP_ACCOUNT_TOYS, "REPLACE INTO battlenet_account_toys (accountId, itemId, isFavourite, hasFanfare) VALUES (?, ?, ?, ?)");
|
||||
|
||||
// Battle Pets
|
||||
PrepareStatement(LoginStatements.SEL_BATTLE_PETS, "SELECT bp.guid, bp.species, bp.breed, bp.displayId, bp.level, bp.exp, bp.health, bp.quality, bp.flags, bp.name, dn.genitive, dn.dative, dn.accusative, dn.instrumental, dn.prepositional FROM battle_pets bp LEFT JOIN battle_pet_declinedname dn ON bp.guid = dn.guid WHERE bp.battlenetAccountId = ?");
|
||||
PrepareStatement(LoginStatements.INS_BATTLE_PETS, "INSERT INTO battle_pets (guid, battlenetAccountId, species, breed, displayId, level, exp, health, quality, flags, name) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.SEL_BATTLE_PETS, "SELECT bp.guid, bp.species, bp.breed, bp.displayId, bp.level, bp.exp, bp.health, bp.quality, bp.flags, bp.name, bp.nameTimestamp, dn.genitive, dn.dative, dn.accusative, dn.instrumental, dn.prepositional FROM battle_pets bp LEFT JOIN battle_pet_declinedname dn ON bp.guid = dn.guid WHERE bp.battlenetAccountId = ?");
|
||||
PrepareStatement(LoginStatements.INS_BATTLE_PETS, "INSERT INTO battle_pets (guid, battlenetAccountId, species, breed, displayId, level, exp, health, quality, flags, name, nameTimestamp) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.DEL_BATTLE_PETS, "DELETE FROM battle_pets WHERE battlenetAccountId = ? AND guid = ?");
|
||||
PrepareStatement(LoginStatements.UPD_BATTLE_PETS, "UPDATE battle_pets SET level = ?, exp = ?, health = ?, quality = ?, flags = ?, name = ? WHERE battlenetAccountId = ? AND guid = ?");
|
||||
PrepareStatement(LoginStatements.UPD_BATTLE_PETS, "UPDATE battle_pets SET level = ?, exp = ?, health = ?, quality = ?, flags = ?, name = ?, nameTimestamp = ? WHERE battlenetAccountId = ? AND guid = ?");
|
||||
PrepareStatement(LoginStatements.SEL_BATTLE_PET_SLOTS, "SELECT id, battlePetGuid, locked FROM battle_pet_slots WHERE battlenetAccountId = ?");
|
||||
PrepareStatement(LoginStatements.INS_BATTLE_PET_SLOTS, "INSERT INTO battle_pet_slots (id, battlenetAccountId, battlePetGuid, locked) VALUES (?, ?, ?, ?)");
|
||||
PrepareStatement(LoginStatements.DEL_BATTLE_PET_SLOTS, "DELETE FROM battle_pet_slots WHERE battlenetAccountId = ?");
|
||||
|
||||
Reference in New Issue
Block a user