Trinitycore: Tame Beast should convert target creature into pet rather than creating a new entity

Created on 27 Sep 2018  路  20Comments  路  Source: TrinityCore/TrinityCore

Description:
After some digging into the pet system I just saw that the beast taming procedure is completely wrong. Checking sniffs have confirmed that once you tame a creature the creature itself becomes your pet by simply updating all fields.
Once this happened the pet casts Spell ID: 24592 (Hunter Pet Buffs) to apply all passives for the scalings and on 4.x and newer it also casts Spell ID: 99289 (Energize) to fill up the focus.

Current behaviour:
The core currently despawns the tame target and creates a new creature at its position.

Expected behaviour:
The tame target should not despawn but instead become the new pet directly by converting it including stats.

Packet snipped:

[4] UpdateType: Values
[4] GUID: Full: 0xF150D43400037E33 Type: Vehicle Entry: 54324 (Skitterflame) Low: 228915
[4] UNIT_FIELD_SUMMONEDBY: 35768684/1.188622E-37
[4] UNIT_FIELD_SUMMONEDBY + 1: 100663296/2.407412E-35
[4] UNIT_FIELD_CREATEDBY: 35768684/1.188622E-37
[4] UNIT_FIELD_CREATEDBY + 1: 100663296/2.407412E-35
[4] UNIT_FIELD_TARGET: 0/0
[4] UNIT_FIELD_TARGET + 1: 0/0
[4] UNIT_FIELD_BYTES_0: 33685760/9.551179E-38
[4] UNIT_FIELD_HEALTH: 77490/1.085866E-40
[4] UNIT_FIELD_POWER1: 0/0
[4] UNIT_FIELD_MAXHEALTH: 77490/1.085866E-40
[4] UNIT_FIELD_MAXPOWER1: 0/0
[4] UNIT_FIELD_POWER_REGEN_FLAT_MODIFIER: 0/0
[4] UNIT_FIELD_POWER_REGEN_INTERRUPTED_FLAT_MODIFIER: 0/0
[4] UNIT_FIELD_FACTIONTEMPLATE: 4/5.605194E-45
[4] UNIT_FIELD_FLAGS: 559112/7.834828E-40
[4] UNIT_FIELD_PET_NAME_TIMESTAMP: 1335090065/4.961281E+09
[4] UNIT_FIELD_BYTES_2: 458753/6.428499E-40

Steps to reproduce the problem:

  1. Just tame a pet on retail and then tame one on TC.

Branch(es):
335
(might be master too. gotta discuss some things with @funjoker first)

TC rev. hash/commit:
9ec3724d34d5953fbff2653b1bdce411a6bac96e

Operating system:
Win10 +64

Comp-Core Sub-PetMinion

All 20 comments

Thanks. I felt something was incorrect about it, but I did not know exactly what. There is not supposed to be a "level up" animation when you tame a pet.

Well, this actually can be fixed with the current system right now. There is a ugly hack that is setting the level -1 before returning it to normal again to artifically create this effect.
With that being said, creatures should play this animation ONLY when their level is being synchronized with their owner. That means = target level = hunter level = do nothing.

Sometimes it takes for hunters to abandon and re-take the quest because all three charges are used and creature is not tamed.

@nagrandbugtracker :
I have never seen that specific issue you mention during my 5 years on TC,
when doing the level 10 hunter quests to learn Tame Beast. Then again,
I only play on my own computer (which also runs auth+world+MySQL).

Heh, good luck with this trying to convert Creature object into Pet

@Shauren reinterpret_cast<Pet*>(m_creature) now where's my award

enjoy your crash tho

You should know I have top of the line, state of the art crash detection that catches every seg fault and just ignores it. Ensuring only the best memory corruption.

but does it keep people online?

If there were people on my server in the first place it would.. I'm depressed now

For the sake of everyone's notifications, keep discussion on topic please.

From my point of view it would be an improvement to stop seeing "level up" animation on successful taming when beast level == hunter level.
(Yeah, I know... cosmetic and not as important as things which actually don't work.)

This spells are used for what? Creating the first pet or summoning?

https://woehead.way-of-elendil.fr/?spell=46718 (Pet Boar)
https://woehead.way-of-elendil.fr/?spell=46719 (Pet Carrion)
https://woehead.way-of-elendil.fr/?spell=46720 (Pet Cat)
https://woehead.way-of-elendil.fr/?spell=46721 (Pet Dragonhawk)
https://woehead.way-of-elendil.fr/?spell=64330 (Pet Bear)
https://woehead.way-of-elendil.fr/?spell=64331 (Pet Crab)
https://woehead.way-of-elendil.fr/?spell=64332 (Pet Crocolisk)
https://woehead.way-of-elendil.fr/?spell=64333 (Pet Gorilla)

Looking at the wowhead counterpart of those pages, it seems to be the summon spell for already tamed pets:

Looking back at the difference between taming a beast for a permanent pet, compared to the quest spell, which should only modify the existing creature and return a wild/aggressive beast when dismissed, I am still very uncertain how Blizzard handles beast taming for permanent pets.

Because of the id range, quite possible they're related to Arena Tournament

Fair point. I didn't think that much about the spell IDs at first, but now that you mention it, it looks plausible.

I presume we should look more at low ID spells like these:

Arena Tournament?

And gossip options for https://wow.gamepedia.com/Beastmaster_(arena)

-- tbc
SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 25327 AND 25344;
-- wotlk
SELECT * FROM `broadcast_text` WHERE `ID` BETWEEN 34067 AND 34083;

Now there's no doubt they related to ATR

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daddycaddy picture daddycaddy  路  3Comments

Blasphemous picture Blasphemous  路  3Comments

Rushor picture Rushor  路  3Comments

Rushor picture Rushor  路  3Comments

funjoker picture funjoker  路  3Comments