cmangos / issues

This repository is used as a centralized point for all issues regarding CMaNGOS.
179 stars 47 forks source link

New Hunters #1775

Closed D33rhunt3r closed 5 years ago

D33rhunt3r commented 5 years ago

Current behavior: Seems to have the same problems as #1174, and include: After completing the quest string to get Summon pet. you finish by seeing the pet trainer in my case "Ganaar" the pet trainer in the Exodar, to receive "Revive pet" and "Feed Pet". But after talking to the Pet Training you do not get either spell.

Expected behavior: When finishing the pet quest and speaking with the "Pet Trainer" you should receive 2 spells, Feed Pet and Revive Pet Steps to reproduce:

  1. level a new hunter to 10th
  2. Start Pet Quest and Finish
  3. See Pet Trainer at the final step. check Beast Master Line of Spells for Revive Pet and Feed Pet

Client version: 3.3.5 WOTLK Commit hash: I've updated the server as of 11/23/18 not sure how to get the commit hash

b08fa044ac453c2569668d4b9d2384ea95df4fe1

Database version: WoTLKDB v1.1 'The Warsong' for CMaNGOS-WOTLK 13965

3c101da2de04ba2975c241f3990c2198cce42fb8

Operating system: Windows 10, and windows 7 pro.

adellaci commented 5 years ago

@D33rhunt3r Go to directory that you "git pull" CMaNGOS and enter this command git rev-parse HEAD and do the same for the database

I will create a hunter and confirm

D33rhunt3r commented 5 years ago

Server Hash: b08fa044ac453c2569668d4b9d2384ea95df4fe1 DB Hash: 3c101da2de04ba2975c241f3990c2198cce42fb8

Thanks, I'll keep this in mind for the next time.

adellaci commented 5 years ago

Confirmed. Failed to learn spells Revive Pet (id# 982) and Feed Pet (id# 6991) after being trainer to tame pet

Had to issue command ".learn 982" & ".learn 6991" to get the two spells

killerwife commented 5 years ago

Spell ID 1579 has to be learned upon quest completion. Please check if that is added in DB. Maybe check against other quests and tbc-db.

adellaci commented 5 years ago

@killerwife Spell ID is in the database and listed as "Tame Beast". When we complete the pet quest we get tame beast. call pet, & dismiss pet, but we did not receive Revive Pet & Feed Pet

killerwife commented 5 years ago

Different spell ID 5300. I believe a different quest awards that.

adellaci commented 5 years ago

spell ID 5300 is Beast Training according to DB

adellaci commented 5 years ago

@killerwife I researched it out for the Night Elf. The quest starts in Shadowglen at the Hunter Trainer, 'The Hunter's Path' quest=6071. Which send you the Dolanaar to see the Hunter Trainer there, who give you 'Taming the Beast' quest=6063. Upon completion you get quest 'Taming the Beast' quest=6101, Upon completion you get quest 'Taming the Beast' quest=6102. Upon completion you get 'Training the Beast' quest=6103 From here you have to go the Darnassus to the Hunter trainer to complete. The hunter trainer says;

"A fledgling $C. I see. Yes. I can bestow you with the skills you need to train and guide your pet. Not only will you be able to teach your pet new abilities, you will now be able to feed your pet, as well as revive it, should it fall in battle.$B$BRemember, $N, always respect the balance and live in awe of nature around you. Now, go forth. We shall speak again, at a later date."

Upon completion you are given spells 'Revive Pet' id=982 & 'Feed Pet' id 6991. These are the two spells we are not receiving currently.

I will check the other races and report those back to you.

AnonXS commented 5 years ago

unbenannt

unbenannt

unbenannt

Looks fine to me, as the spells are learned by spell = 5300.

adellaci commented 5 years ago

It looks fine but if you do the quest line you do not receive spells 928 & 6991. I also went out and tamed an animal just to see if it is then that you get the spells, still no spells.

Just finished the Dwarf Hunter line, same result

AnonXS commented 5 years ago

I guess it is "spell targeting" related, so the questgiver is just not able to successfully perform the spell that learns these spells on the player on successull quest turn in.

so probably missing relations as the spells dont hit the player which would learn him the spells.

unbenannt

killerwife commented 5 years ago

Quest ID? The final one that should give it, but doesn't give it.

AnonXS commented 5 years ago

6102 and 6103 both grant spells due to questgiver casting a spell on player.

.go c id 4146 .go c id 3601 are the questgivers

adellaci commented 5 years ago

@killerwife , @AnonXS

killerwife, & AnonXS, i should have payed more attention to what you was saying, I understand better now. Quest giver has to cast spell 5300 in order to give you spells 982 & 6991. I don't understand the relationships between the tables very much, but with each problem i am researching and learning.

So the real point. Spell 5300 has 0 in field 'Targets', and i believe it should be 256. If at the end of the quest line for all the races that can be hunters use the same spell then it should fix all of them. Agree?

adellaci commented 5 years ago

I have tested it on Night Elf Hunter and it works for them

killerwife commented 5 years ago

All quests use spell 5300, so the issue is not with the spell itself.

adellaci commented 5 years ago

@killerwife

Then changing field 'Tartgets' in spell_template(5300) to 256 will correct it for all races

killerwife commented 5 years ago

I'm afraid thats not the correct solution here. Need to figure out why it works for them and not the other.

adellaci commented 5 years ago

Okay I've made this change to the Database "UPDATE spell_template SET Targets=256 WHERE Id=5300 ". I'll go back and verify that is works for all races now.

adellaci commented 5 years ago

I've tested the following and they now work. Nigh Elf Hunter Dwarf Hunter Draenei Hunter

Have to got test Horde side

adellaci commented 5 years ago

@killerwife

I've tested the following and now they work. Orc Hunter Tauren Hunter Troll Hunter That should be all of them.

It appears that because the 'Targets' was set to 0 those spells were not being casted upon the player. This should go to 'wotlk-db' and a check on Burning Crusades & Classic.

Dramacydal commented 5 years ago

@adellaci changing spell template is hack. The core issues should be fixed. There are dozens of spells that use same targeting mechanics

adellaci commented 5 years ago

@Dramacydal @killerwife @AnonXS If you look a the previous quest for all the races, the quest giver upon completion casts 1579 which gives you Tame Beast, Call Pet, & Dismiss Pet. that entry has 256 in the 'Targets' field. So if the change will need to be made on the other spell too.

This example is from the Night Elf Hunter. hunter_quest_template.txt hunter_spell_template.txt

Guess have to research other quest that cast spells to give a play a spell(s).

killerwife commented 5 years ago

@Dramacydal is right. This is meant to work without Targets field alteration. There are 48 spells like this in WOTLK, in TBC there are just 10, so I think blizzard did a change here in the background.

I am gonna look at how this works.

adellaci commented 5 years ago

@killerwife That what is the intent on the 'Targets' field. The only information I find in the Database fields description is

Targets Determines the default targets for some effects. Seems to be connected to TARGET_NONE.

Querying the database for 256 in that field almost 500 hit returned

killerwife commented 5 years ago

It is connected, but SPELL_EFFECT_LEARN_SPELL works implicitly even without it. Or at least its supposed to. Some target types draw from target flags upon fill, but not all of them and some even ignore them. Its quite complex.

adellaci commented 5 years ago

so in the case of this situation it should be an ignore field when casting?

killerwife commented 5 years ago

No, in this case it should work with and without it. In this case, without it.

adellaci commented 5 years ago

Thank you for taking the time to explain

killerwife commented 5 years ago

The bug is here:

    Unit* Spell::GetUnitTarget(SpellEffectIndex effIdx)
    {
        Unit* target = m_targets.getUnitTarget();
        if (effIdx != EFFECT_INDEX_0 && !IsUnitTargetTarget(m_spellInfo->EffectImplicitTargetA[EFFECT_INDEX_0])) // eff index 0 always need to supply correct target or from client
        target = m_caster->GetTarget();

        return target;
    }
adellaci commented 5 years ago

@killerwife Updated and tested, works correctly now. Thank you.