Forum > Serverside Modding

[SOLVED] [QUESTION:WotlK] Some trouble with resources

(1/1)

Medhi2703:
Hello everyone.
First, i'm sorry for my bad english(current&technics).
It's my first post and i have a problem. Haha.

I come here today because i have little problem.

I work actually on new Form for a new class.
It's simple, i work on Citizen class.
With this class, i create 3 form (like druid form)
I copy the line of the Catform on SpellShapeshiftForm.dbc to my new form (Light Fighter) with no morph.
And, i copy the line in spell.dbc for the new spell. I change the column 111 to new ID of my Shapeshift.
The form is ok but one thing don't work. The form don't change the mana to energy. :/

So i come here, if anyone have an idea for my problem.
Thanks for reading.

PS: I can upload my DBC file and some screen, if you want more information.

XxXGenesisXxX:
You need to add a new case to the forms and make it change to whatever resource you would prefer. You would also have to edit it in the handler and probably as a shared define as well.


--- Code: ---    switch (form)
    {
        case FORM_GHOUL:
        case FORM_CAT:
        {
            if (getPowerType() != POWER_ENERGY)
                setPowerType(POWER_ENERGY);
            break;
        }
        case FORM_BEAR:
        {
            if (getPowerType() != POWER_RAGE)
                setPowerType(POWER_RAGE);
            break;
        }
        default:                                            // 0, for example
        {
            ChrClassesEntry const* cEntry = sChrClassesStore.LookupEntry(getClass());
            if (cEntry && cEntry->PowerType < MAX_POWERS && uint32(getPowerType()) != cEntry->PowerType)
                setPowerType(Powers(cEntry->PowerType));
            break;
        }
    }
--- End code ---

Player.cpp - Line 21210

Medhi2703:
Thanks for you reply.
I fixed it with : Player.cpp, SpellAuraEffects.cpp, Unit.h and StatSystem.cpp
I would do an example tomorrow. :)

Navigation

[0] Message Index

Go to full version