Jump to content

Druid Forms - cosmetics


Auntie Mangos

Recommended Posts

youre contraditory in your post, if you say white tauren is returning a black cat, the patch is not "fine", its bugged

About improvements, ill try to do it.. and at least i know that one of the skins are not transforming perfectly, so any news about its functionality, as your post, is useful.

tks.

Link to comment
Share on other sites

  • Replies 55
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...

I was sure i replyed here a couple of days ago, must have lagged tough.

Anyway, implementing SpellShapeshiftForm.dbc for druid forms is the proper way to do it. Adding a hack for it as a temp solution it's just stupid.

I've seen that yad02 have made some research on this.

Entry Point : SpellShapeshiftForm.dbc (sorry for french names...)

5,3,,,"Forme d’ours",,,,,,,,,,,,,,0xFF01FE,728,1,496,2500,2281,0,,,0,0,0,0,0,0,0,0x0,

In : CreatureDisplayInfo.dbc

Alliance Display : 2281 ==>

2281,213,3022,0,1.0,255,"DruidBearSkinRed","","","",1,0,0,0,0x0,0,

All 213 are DruidBear (I suppose Alliance for all - not tested)==>

23950,213,0,0,2.0,255,"DruidBearSkin","","","",1,0,0,0,0x0,0,

29413,213,0,0,1.0,255,"DruidBearSkinPurple","","","",1,0,0,0,0x0,0,

29414,213,0,0,1.0,255,"DruidBearSkinBlack","","","",1,0,0,0,0x0,0,

29415,213,0,0,1.0,255,"DruidBearSkinBlue","","","",1,0,0,0,0x0,0,

29416,213,0,0,1.0,255,"DruidBearSkinWhite","","","",1,0,0,0,0x0,0,

29417,213,0,0,1.0,255,"DruidBearSkinRed","","","",1,0,0,0,0x0,0,

29438,213,0,0,1.0,255,"DruidBearSkinBlack","","","",1,0,0,0,0x0,0,

29440,213,0,0,1.0,255,"DruidBearSkinPurple","","","",1,0,0,0,0x0,0,

count(DruidTaurenBearSkin) == 9

Sound id (DBCStructure.h) another record : 3022 ==>

2289,214,3022,0,1.20000004768,255,"DruidTaurenBearSkinBrown","","","",1,0,0,0,0x0,0,

All 214 are DruidBear (I suppose Horde : "Tauren" for all - not tested)==>

29418,214,0,0,1.20000004768,255,"DruidTaurenBearSkinBlack","","","",1,0,0,0,0x0,0,

29419,214,0,0,1.20000004768,255,"DruidTaurenBearSkinSilver","","","",1,0,0,0,0x0,0,

29420,214,0,0,1.20000004768,255,"DruidTaurenBearSkinYellow","","","",1,0,0,0,0x0,0,

29421,214,0,0,1.20000004768,255,"DruidTaurenBearSkinWhite","","","",1,0,0,0,0x0,0,

count(DruidTaurenBearSkin) == 5

Not tested for all Druid ShapeshiftForm... seams to be exactly the same thing as this for cat form

EDIT1 :

Interesting topic here : http://forums.worldofwarcraft.com/thread.html?topicId=17631614423&sid=1

EDIT2 :

I think thenecromancer issue is the best issue... (just verify displayid in case...)

"hardcode" displayid (Horde & Alliance) is faster than to find displayid from dbc with "my" idea to find both

(use displayid_A to find displayid_H from SpellShapeshiftForm.dbc to CreatureDisplayInfo.dbc)

In any case I don't see how bear and cat skin are defined. No way in DBC... (in my opinion)

The interesting thing is that i didn't find the above values in SpellShapeshiftForm.dbc. Yad02, please pm me your dbc editor if you can.

If anybody want's to work on this, here's a lead.

struct SpellShapeshiftEntry
{
   uint32 ID;                                              // 0
   //uint32 buttonPosition;                                // 1 unused
   //char*  Name[16];                                      // 2-17 unused
   //uint32 NameFlags;                                     // 18 unused
   uint32 flags1;                                          // 19
   int32  creatureType;                                    // 20 <=0 humanoid, other normal creature types
   //uint32 unk1;                                          // 21 unused
   uint32 attackSpeed;                                     // 22
   uint32 modelID;                                       // 23 unused, alliance modelid (where horde case?)
   //uint32 unk2;                                          // 24 unused
   //uint32 unk3;                                          // 25 unused
   //uint32 unk4;                                          // 26 unused
   //uint32 unk5;                                          // 27 unused
   //uint32 unk6;                                          // 28 unused
   //uint32 unk7;                                          // 29 unused
   //uint32 unk8;                                          // 30 unused
   //uint32 unk9;                                          // 31 unused
   //uint32 unk10;                                         // 32 unused
   //uint32 unk11;                                         // 33 unused
   //uint32 unk12;                                         // 34 unused
};

Link to comment
Share on other sites

I use neo2003 tool

(dbc to csv) http://www.wowguru.com/ui/229/dbc-to-csv-converter/

However I already looked for a better issue than hardcode id

all fail when you attempt to find the good Horde model

maybe take modelid_H in creature_template database is the best way

EDIT 11/12/09 (I don't want bump this post)

I have a doubt about it's really a neo2003 tool...

Link to comment
Share on other sites

  • 2 weeks later...

lol the code int he first post still works fine for me

mangos revision 9020

took a while to manually write it in but it works fine. decided to actually save my copies of my patch files this time so i dont have to redo it... now if i can find a way t make my cpp files compare with the original mangos one and extract a patch that shows only the difference, that would be awesome.

Link to comment
Share on other sites

  • 2 weeks later...

looks interesting.

it seems that the 2nd field in CreatureDisplayInfo is something like the ModelGroup and when a shapeshift spell has an horde model it's then in the ((alliances' ModelGroup ) +1)

but unluckily the different colors can't be extracted without string comparision

so it seems that we realy need to hardcode those ids :(

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

for 9439

test this - maybe it work

diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index e180c3d..7c9ac7f 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -2968,7 +2968,9 @@ void Aura::HandleAuraModShapeshift(bool apply, bool Real)
        return;
    }

-    if (ssEntry->modelID_A)
+    modelid = m_target->GetModelForForm(form);
+
+    if (!modelid && ssEntry->modelID_A)
    {
        // i will asume that creatures will always take the defined model from the dbc
        // since no field in creature_templates describes wether an alliance or
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 943d73b..b9ef8f1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -13522,6 +13522,206 @@ void Unit::StopAttackFaction(uint32 faction_id)
    CallForAllControlledUnits(StopAttackFactionHelper(faction_id),false,true,true);
}

+uint32 Unit::GetModelForForm(ShapeshiftForm form)
+{
+    switch(form)
+    {
+        case FORM_CAT:
+            // Based on Hair color
+            if (getRace() == RACE_NIGHTELF)
+            {
+                uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
+                switch (hairColor)
+                {
+                    case 7: // Violet
+                    case 8: 
+                        return 29405;
+                    case 3: // Light Blue
+                        return 29406;
+                    case 0: // Green
+                    case 1: // Light Green
+                    case 2: // Dark Green
+                        return 29407;
+                    case 4: // White
+                        return 29408;
+                    default: // original - Dark Blue
+                        return 892;
+                }
+            }
+            // Based on Skin color
+            else if (getRace() == RACE_TAUREN)
+            {
+                uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
+                // Male
+                if (getGender() == GENDER_MALE)
+                {
+                    switch(skinColor)
+                    {
+                        case 12: // White
+                        case 13:
+                        case 14:
+                        case 18: // Completly White
+                            return 29409;
+                        case 9: // Light Brown
+                        case 10:
+                        case 11:
+                            return 29410;
+                        case 6: // Brown 
+                        case 7:
+                        case 8:
+                            return 29411;
+                        case 0: // Dark
+                        case 1:
+                        case 2:
+                        case 3: // Dark Grey
+                        case 4:
+                        case 5:
+                            return 29412;
+                        default: // original - Grey
+                            return 8571;
+                    }
+                }
+                // Female
+                else switch (skinColor)
+                {
+                    case 10: // White
+                        return 29409;
+                    case 6: // Light Brown
+                    case 7:
+                        return 29410;
+                    case 4: // Brown
+                    case 5:
+                        return 29411;
+                    case 0: // Dark
+                    case 1:
+                    case 2:
+                    case 3:
+                        return 29412;
+                    default: // original - Grey
+                        return 8571;
+                }
+            }
+            else if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 892;
+            else
+                return 8571;
+        case FORM_DIREBEAR:
+        case FORM_BEAR:
+            // Based on Hair color
+            if (getRace() == RACE_NIGHTELF)
+            {
+                uint8 hairColor = GetByteValue(PLAYER_BYTES, 3);
+                switch (hairColor)
+                {
+                    case 0: // Green
+                    case 1: // Light Green
+                    case 2: // Dark Green
+                        return 29413; // 29415?
+                    case 6: // Dark Blue
+                        return 29414;
+                    case 4: // White
+                        return 29416;
+                    case 3: // Light Blue
+                        return 29417;
+                    default: // original - Violet
+                        return 2281;
+                }
+            }
+            // Based on Skin color
+            else if (getRace() == RACE_TAUREN)
+            {
+                uint8 skinColor = GetByteValue(PLAYER_BYTES, 0);
+                // Male
+                if (getGender() == GENDER_MALE)
+                {
+                    switch (skinColor)
+                    {
+                        case 0: // Dark (Black)
+                        case 1:
+                        case 2:
+                            return 29418;
+                        case 3: // White
+                        case 4:
+                        case 5:
+                        case 12:
+                        case 13:
+                        case 14:
+                            return 29419;
+                        case 9: // Light Brown/Grey
+                        case 10:
+                        case 11:
+                        case 15:
+                        case 16:
+                        case 17:
+                            return 29420;
+                        case 18: // Completly White
+                            return 29421;
+                        default: // original - Brown
+                            return 2289;
+                    }
+                }
+                // Female
+                else switch (skinColor)
+                {
+                    case 0: // Dark (Black)
+                    case 1:
+                        return 29418;
+                    case 2: // White
+                    case 3:
+                        return 29419;
+                    case 6: // Light Brown/Grey
+                    case 7:
+                    case 8:
+                    case 9:
+                        return 29420;
+                    case 10: // Completly White
+                        return 29421;
+                    default: // original - Brown
+                        return 2289;
+                }
+            }
+            else if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 2281;
+            else
+                return 2289;
+        case FORM_TRAVEL:
+            return 632;
+        case FORM_AQUA:
+            if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 2428;
+            else
+                return 2428;
+        case FORM_GHOUL:
+            return 24994;
+        case FORM_CREATUREBEAR:
+            return 902;
+        case FORM_GHOSTWOLF:
+            return 4613;
+        case FORM_FLIGHT:
+            if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 20857;
+            else
+                return 20872;
+        case FORM_MOONKIN:
+            if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 15374;
+            else
+                return 15375;
+        case FORM_FLIGHT_EPIC:
+            if(Player::TeamForRace(getRace())==ALLIANCE)
+                return 21243;
+            else
+                return 21244;
+        case FORM_METAMORPHOSIS:
+            return 25277;
+        case FORM_TREE:
+            return 864;
+        case FORM_SPIRITOFREDEMPTION:
+            return 16031;
+    }
+    return 0;
+}
+
void Unit::CleanupDeletedAuras()
{
    // really delete auras "deleted" while processing its ApplyModify code
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 158903a..1377bc2 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -1784,6 +1784,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
        PetAuraSet m_petAuras;
        void AddPetAura(PetAura const* petSpell);
        void RemovePetAura(PetAura const* petSpell);
+        uint32 GetModelForForm(ShapeshiftForm form);

        // Movement info
        MovementInfo m_movementInfo;

well sorry, i can't know author of this patch. i'm not an author

Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use