Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Racial - Worgen and Goblin #3

Open
NiganNi opened this issue Mar 3, 2022 · 13 comments
Open

Racial - Worgen and Goblin #3

NiganNi opened this issue Mar 3, 2022 · 13 comments
Labels
enhancement New feature or request

Comments

@NiganNi
Copy link

NiganNi commented Mar 3, 2022

Hello benjymansy123, when I create a worgen or goblin, the server says:

...
Player::addSpell: Non-existed in SpellStore spell #69041 request.
Player::addSpell: Non-existed in SpellStore spell #69042 request.
Player::addSpell: Non-existed in SpellStore spell #69044 request.
Player::addSpell: Non-existed in SpellStore spell #69046 request.
Player::addSpell: Non-existed in SpellStore spell #69070 request.
...

goblinRecialSpell
worgenRecialSpell

Racial - Worgen:
Aberration /Passive 
Altered Form /Passive
Darkflight
Flayer Passive 
Running Wild
Two Forms
Viciousness /Passive
Racial - Goblin:
Best Deals Anywhere /Passive
Better Living Through Chemistry /Passive
Pack Hobgoblin
Rocket Barrage
Rocket Jump
Time is Money /Passive

Adding to the database does not give the desired result.
I assume they are not added to the DBC-files?
What tables should I use in order for them to work correctly?

Also "Two Forms" does not work correctly. Is there a possibility to fix it?
worgenUseTwoForms

@heyitsbench
Copy link
Owner

heyitsbench commented Mar 3, 2022

The racials that are not included aren't included because I do not know how to make them work at this moment. Two Forms is included simply as a testbed, but it too technically doesn't work the way it should in my opinion, even if it did morph to the correct model.

Turning this comment into a checklist/info spot on each racial.

Worgen

  • Aberration
    Adds 1 resistance to Shadow/Nature resistance, don't know if it should be 10 or if it's actually adding 1% like it says in the description, but it's more working than before 09186b0.
  • Darkflight
    Basically done, might have some funky cooldown stuff with other spells, but it otherwise works.
  • Flayer
    Finished with 2699102 and 5e96d55.
  • Running Wild
    Not even close to done. Currently still trying to figure out animation stuff with it, not to mention putting animations together.
  • Two Forms
    I've figured out how to do the spell, I can make it cast on creation a la Cata starting experience, but currently gender specific. Only way to make it gender agnostic (At least from the player's perspective) is to handle it in a core script, since I don't see anything in the DBC handling nor DB handling that considers character gender for it.
  • Viciousness
    Working correctly with 5641b3d.

Goblin

  • Time Is Money
    Mostly handled with 088dd1e. Might need some fine tuning though.
  • Best Deals Anywhere
    Currently doing it in the core is the only option, and there's not a hook for it, so waiting on that or just gonna give up and say it requires a core patch.
  • Better Living Through Chemistry
    Since this one doesn't have a cast time reduction or anything fancy like Flayer, this one is done and was quite easy.
  • Pack Hobgoblin
    Completed with 871f5ce, e21de22, and 260d8b5. SoundID added in ace7920 and 8b7485d.
  • Rocket Barrage
    Visually correct with 96e01a4. Unfortunately, the damage formula is so complex that a script looks to be required, but at least it looks good.
  • Rocket Jump
    Working with e3ab0d6.

@NiganNi
Copy link
Author

NiganNi commented Mar 3, 2022

Thanks for the answer, I think we'll leave it open for anyone who could do it for me or someone else. I have checked the cataclysm tables, but they are different from 3.3.5. I will try to find a solution. in any case, if possible, I will write to this topic. Thank you, friend, for your help.

@heyitsbench
Copy link
Owner

The good thing is I believe some of the racials (Especially the Goblin ones) could possibly be scripted with hooks which would actually turn this into a real module :P

@NiganNi
Copy link
Author

NiganNi commented Mar 6, 2022

I have a cataclysm spell table. It has all the racial spells that I attach, maybe someone will do it faster, since I need time to try to figure it out. It's strange that it has 48 columns, while in 3.3.5 it has 234.

Spell(cataclysm).csv

@heyitsbench
Copy link
Owner

heyitsbench commented Mar 6, 2022

Thank you for providing the table, once I get home today I'll take a look and attach any others of interest. I do believe at least a couple spells are scripted server-side, so those tables won't be able to provide everything needed.

EDIT: Attached all spell DBCs found in a 4.3.4 enUS client.
434SpellData.zip

@heyitsbench
Copy link
Owner

I also want to take a look at the way these spells are handled (if at all) on TC master or the Cata preservation project, so if anyone would be able to throw those in here, it would be greatly appreciated.

@NiganNi
Copy link
Author

NiganNi commented Mar 6, 2022

The master branch uses db2.

Сata preservation, the same 48 columns, but I have them, in Russian.
Spell(The-Cataclysm-Preservation-Project).csv

@heyitsbench
Copy link
Owner

I moreso was asking about how they're scripted either in the DB or the core itself.

@heyitsbench
Copy link
Owner

heyitsbench commented May 9, 2022

Found the following lines of code in Player.cpp of TCPP regarding the Best Deals Anywhere racial:

float Player::GetReputationPriceDiscount(Creature const* creature) const
{
    ChrRacesEntry const* raceEntry = sChrRacesStore.LookupEntry(getRace());
    if (raceEntry->Flags & 0x100)
        return 0.8f;

    FactionTemplateEntry const* vendor_faction = creature->GetFactionTemplateEntry();
    if (!vendor_faction || !vendor_faction->Faction)
        return 1.0f;

    ReputationRank rank = GetReputationRank(vendor_faction->Faction);
    if (rank <= REP_NEUTRAL)
        return 1.0f;

    return 1.0f - 0.05f* (rank - REP_NEUTRAL);
}

Might be able to hijack the price on this line: https://github.com/azerothcore/azerothcore-wotlk/blob/40a5eef152addba3949016938519fa61d9776f82/src/server/game/Entities/Player/Player.cpp#L10525

@heyitsbench heyitsbench added the enhancement New feature or request label May 23, 2022
@heyitsbench
Copy link
Owner

heyitsbench commented Jun 26, 2022

Okay, so I've tested adding that TCPP check into AC something like this
image
And much to my surprise, it actually works perfectly. If anyone knows of any reputations that there aren't supposed to be any discounts for, please let me know so I can test and try and account for them.

Not gonna include this in the .patch file quite yet, as I want this at least to be modulized if possible. Also looking to change the check from just "Are you a goblin" to "Do you have the spell" so that the spell can be given to other races and it would work the same.

heyitsbench added a commit that referenced this issue Jul 29, 2022
Closes #27 until #3 is finished.
@heyitsbench
Copy link
Owner

So if/when I start trying to fix Rocket Barrage's damage calculations, this is the script as seen in TCPP:
image
Need to figure out where the values are coming from, since I can't find them in any DBCs I've looked at, but there it is.

@heyitsbench
Copy link
Owner

heyitsbench commented Sep 12, 2022

So with regards to Best Deals Anywhere, I can replace the condition with something like

if (player->HasSpell(69044))

instead of hardcoding it to Goblins only in case it's wanted on other races. Probably doesn't fit a greater codestyle, but it might work, gonna test soon.

@heyitsbench
Copy link
Owner

heyitsbench commented Sep 12, 2022

It did work, but not entirely as I thought. Just doing

if (HasSpell(69044))

worked, because I didn't have to ask player-> for the check. Also discovered that SpellIcons need to be adjusted to blizzlike values, because the values I grabbed from Wowhead are horribly inaccurate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants