37 Commits
Author SHA1 Message Date
Meji a1f673d1ca Core/BattlePets: Move BattlePet stuff from SpellMgr to BattlePetMgr (#27986) 2022-06-09 13:58:54 +02:00
Meji 98c72f33ac Core/Items: Fix weapon transmogrification (#27962) 2022-06-08 13:25:49 +02:00
Meji 74645553be Core/Objects: Units possessing another ones must use the detection of the latter (#26702)
* Core/Objects: Units with invisibility auras can see units that cannot detect them

* Core/Objects: A unit that possess another one, uses the detection of the latter

* GCC: Avoid ambiguous 'else'

Closes #23528

(cherry picked from commit ad4bc7cc1f3d3f541219e9077238743c73130108)
2022-03-12 01:17:00 +01:00
Meji 8ee432b1f0 Core/Spells: PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW applies only with invisibility type INVISIBILITY_GENERAL (0) (#26701)
* Core/Spells: PLAYER_FIELD_BYTE2_INVISIBILITY_GLOW applies only with invisibility type INVISIBILITY_GENERAL (0)

* Use enum

(cherry picked from commit 47a4d58a982d5c22fbcdd07cac9dae5fd1bc52e4)
2022-03-11 18:45:58 +01:00
Meji 23d77ecb81 Core/Spells: Fixed spell effect 43 (SPELL_EFFECT_TELEPORT_UNITS_FACE_CASTER) (#25945)
(cherry picked from commit 28353e920b531b7dd221ac926049f5a68b75e7ec)
2022-03-06 01:38:14 +01:00
Meji 966430dc44 Core/BattlePets: Implemented CMSG_BATTLE_PET_UPDATE_NOTIFY (#27724) 2022-02-13 19:18:18 +01:00
Meji 27cba3f523 Core/Scripts: Added script hook to execute actions after completing an achievement (#27718) 2022-02-08 23:23:05 +01:00
Meji fa3cba3a00 Core/BattlePets: Delete declined names of non-account battle pets when deleting character permanently (#27706) 2022-02-06 21:46:28 +01:00
Meji ddc71206de Core/Spells: Implemented spell effect 225 (SPELL_EFFECT_GRANT_BATTLEPET_LEVEL) (#27506) 2022-01-07 22:14:07 +01:00
Meji 9354b4ac8e Core/Spells: Implemented battle pet experience related spell effects and auras (#27488)
* Spell effect 286 (SPELL_EFFECT_GRANT_BATTLEPET_EXPERIENCE)
* Aura type 420 (SPELL_AURA_MOD_BATTLE_PET_XP_PCT)
2021-12-30 20:38:29 +01:00
Meji 924182f692 Core/BattlePets: Misc fixes (#27446)
* Added script for "Summon Battle Pet" spell (118301).
* Set the saved display of the battle pet when summoning it.
* If a summon has SummonPropertiesFlags::SummonFromBattlePetJournal it will remove NpcFlag UNIT_NPC_FLAG_WILD_BATTLE_PET (Wild battle pets).
* When a creature is summoned with SummonTitle::Companion, it will check to see if it has SummonPropertiesFlags::SummonFromBattlePetJournal before updating the battle pet's update fields. (If you have a summoned battle pet and summon a creature with that SummonTitle, it will incorrectly update the battle pet's update fields with the summoned battle pet's data).
* Implemented SummonPropertiesFlags::UseCreatureLevel. If a summon has this flag, it will use the owner's level (If the summon doesn't have SummonProperties it will always use the selected level).
2021-12-25 15:27:58 +01:00
Meji c4fee8c5cf Core/Spells: Implemented spell effect 204 (SPELL_EFFECT_CHANGE_BATTLEPET_QUALITY) (#27425) 2021-12-19 13:27:27 +01:00
Meji 2ea9663c21 DB/Spawns: Added Alliance Battle Pet trainer spawns
Closes #27359
2021-12-18 00:51:11 +01:00
Meji 6374145060 DB/Spawns: Added Horde Battle Pet trainer spawns
Closes #27346
2021-12-18 00:51:10 +01:00
Meji 5f53e85c65 DB/Trainers: Added Battle Pet trainers data
Closes #27327
2021-12-18 00:51:10 +01:00
Meji 446997cdf2 Core/BattlePets: Misc fixes
* The battle pet's experience and level will now be reflected in the player's UpdateFields
* Despawn summoned battle pet when it is caged
2021-12-17 14:23:43 +01:00
Meji 1a84641549 Core/BattlePets: Added default cooldown to revive battle pets (#27383)
* Added SpellHistory function to retrieve remaining category cooldown
* Changed SpellHistory::ModifySpellCooldown to allow adjusting only regular spell cooldown without touching category
2021-12-12 18:35:15 +01:00
Meji 0a8f79ad5a Core/BattlePets: Improvements when enabling battle pets (#27367) 2021-12-10 20:17:21 +01:00
MejiandShauren 198d18bef5 Core/SAI: Fixed crash when using SMART_TARGET_CLOSEST_* in areatrigger smart script (#27336)
Co-authored-by: Shauren <[email protected]>
2021-12-04 20:40:06 +01:00
Meji 0d0f9784a9 Core/Conditions: Added CONDITION_SOURCE_TYPE_TRAINER_SPELL (#27321) 2021-12-04 14:42:54 +01:00
Meji b02f382ed7 Core/Trainers: Implemented learning battle pets from trainers (#27312) 2021-11-25 20:56:37 +01:00
MejiandShauren 93c668ac50 Core/BattlePets: Implemented BattlePetSpeciesFlags::NotAccountWide (#27303)
Co-authored-by: Shauren <[email protected]>
2021-11-25 20:55:12 +01:00
MejiandShauren 8614690e27 Core/BattlePets: Implemented battle pet name query packet (#27294)
Co-authored-by: Shauren <[email protected]>
2021-11-20 19:06:14 +01:00
MejiandShauren 895367e69f Core/BattlePets: Journal lock improvements (#27178)
Co-authored-by: Shauren <[email protected]>
2021-11-19 15:37:21 +01:00
Meji 12cc779ab0 Core/BattlePets: BattlePetError enum class (#27286) 2021-11-19 14:01:22 +01:00
Meji a832435b97 Core/Spells: Implemented SummonPropertiesFlags: UseSummonerFaction & IgnoreSummonerPhase (#27273) 2021-11-16 11:51:05 +01:00
MejiandShauren ebc52afa0a Core/BattlePets: Don't permanently learn battle pet summoning spells (#27201)
Co-authored-by: Shauren <[email protected]>
2021-11-08 22:29:53 +01:00
Meji 7c15ec00c7 Core/BattlePets: Fixes when adding pets (#27076)
* Add pet when learning it for the first time (summon spell not known).
* Removed code that adds battle pet if its summon spell is known (Learn cageable pet -> Cage pet -> Log out -> Log in -> Pet is added).
* When uncaging check that the species has a summon spell before trying to learn it.
2021-10-17 00:11:48 +02:00
Meji 11cc5c0d3b Core/BattlePets: Misc fixes (#27057)
* Rename WorldPackets::BattlePet::BattlePet::CollarID to WorldPackets::BattlePet::BattlePet::DisplayID
* Use the DisplayID field to store the model of the battle pet. If the species has BattlePetSpeciesFlags::RandomDisplay, nothing is stored. Otherwise a random model is chosen from those available
* Stored DisplayID in ITEM_MODIFIER_BATTLE_PET_DISPLAY_ID when caging the battle pet (previously the CreatureID was being stored)
* Modified SendPlaySpellVisual function to allow sending Target and TargetPosition at the same time
* Added SpellVisual when uncaging
2021-10-16 12:15:03 +02:00
Meji 82b3a409db Core/BattlePets: Store declined names (#27025) 2021-10-16 00:48:54 +02:00
Meji bedc050357 Core/Vendors: Support for vendors with empty inventory list (#26895) 2021-10-03 21:50:21 +02:00
Meji 0cfd14d2a0 Core/BattlePets: Misc fixes (#26990)
* Define BattlePetBreedQuality enum class.
* Check the quality of the battle pet species in battle_pet_quality table to avoid invalid values.
* Set CurrentBattlePetBreedQuality and WildBattlePetLevel update fields with the data of the summoned battle pet.
* Added function to calculate the WildBattlePetLevel of wild battle pets according to their spawn zone.
2021-10-03 21:20:45 +02:00
Meji 5c287929b2 Core/Gossip: Update GossipOptionIcon enum (#26906) 2021-10-03 16:24:07 +02:00
Meji de4eaa0de9 Core/BattlePets: Misc fixes (#26964)
* Define BattlePetSpeciesFlags enum class.
* Define BattlePetDbFlags enum class.
* Added check to prevent the pet from being caged if its species has flag BattlePetSpeciesFlags::NotTradable.
* Added check to prevent the pet from being caged if it's in battle pet slots.
* Added check to prevent the pet from being caged if its health is below maximum health.
* Only add pet if the species has flag BattlePetSpeciesFlags::WellKnown.
* Added function to check flag BattlePetSpeciesFlags::LegacyAccountUnique to avoid learning copies of unique pets.
* Implemented CMSG_BATTLE_PET_CLEAR_FANFARE.
2021-09-29 22:26:25 +02:00
Meji 0a83f74876 Core/Achievements: Update CriteriaType enum (#26856) 2021-09-08 22:07:01 +02:00
Meji bca465a569 Core/Achievements: Several criteria fixes (#26839) 2021-08-20 09:41:13 +02:00
Meji 72f99531b7 Core/Players: Update the location of the cinematic camera only if there is an active cinematic (#26215) 2021-03-15 00:06:26 +01:00