Wise
30-07-14, 09:43 PM
This isn't my work but I did modify it slightly. Found it on another forum, can't remember where.
This patch allows all races to have totem models. Without it races that don't have a Shaman class (eg: Human) have a white box for a totem. Humans, Night Elves, and Gnomes use the Dwarf Model. Undead and Blood Elf use the Orc Model. The original patch used the Orc model for the Alliance races which I thought was a bit goofy. You can use this with an all races all classes patch or when adding totems to a class other than Shaman. Tested good on a fresh build today, enjoy.
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f5b72b8..d81a9f1 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -16664,6 +16664,80 @@ uint32 Unit::GetModelForTotem(PlayerTotemType totemType)
case SUMMON_TYPE_TOTEM_AIR: // air
return 30756;
}
+ } break;
+ case RACE_HUMAN:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
+ break;
+ }
+ case RACE_BLOODELF:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30758;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30757;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30759;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30756;
+ }
+ break;
+ }
+ case RACE_NIGHTELF:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
+ break;
+ }
+ case RACE_UNDEAD_PLAYER:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30758;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30757;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30759;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30756;
+ }
+ break;
+ }
+ case RACE_GNOME:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
break;
}
case RACE_DWARF:
@@ -16726,6 +16800,21 @@ uint32 Unit::GetModelForTotem(PlayerTotemType totemType)
}
break;
}
+ default: // One standard for other races.
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 4589;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 4588;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 4587;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 4590;
+ }
+ break;
+ }
}
return 0;
}
This patch allows all races to have totem models. Without it races that don't have a Shaman class (eg: Human) have a white box for a totem. Humans, Night Elves, and Gnomes use the Dwarf Model. Undead and Blood Elf use the Orc Model. The original patch used the Orc model for the Alliance races which I thought was a bit goofy. You can use this with an all races all classes patch or when adding totems to a class other than Shaman. Tested good on a fresh build today, enjoy.
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index f5b72b8..d81a9f1 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -16664,6 +16664,80 @@ uint32 Unit::GetModelForTotem(PlayerTotemType totemType)
case SUMMON_TYPE_TOTEM_AIR: // air
return 30756;
}
+ } break;
+ case RACE_HUMAN:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
+ break;
+ }
+ case RACE_BLOODELF:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30758;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30757;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30759;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30756;
+ }
+ break;
+ }
+ case RACE_NIGHTELF:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
+ break;
+ }
+ case RACE_UNDEAD_PLAYER:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30758;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30757;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30759;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30756;
+ }
+ break;
+ }
+ case RACE_GNOME:
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 30754;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 30753;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 30755;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 30736;
+ }
break;
}
case RACE_DWARF:
@@ -16726,6 +16800,21 @@ uint32 Unit::GetModelForTotem(PlayerTotemType totemType)
}
break;
}
+ default: // One standard for other races.
+ {
+ switch (totemType)
+ {
+ case SUMMON_TYPE_TOTEM_FIRE: // fire
+ return 4589;
+ case SUMMON_TYPE_TOTEM_EARTH: // earth
+ return 4588;
+ case SUMMON_TYPE_TOTEM_WATER: // water
+ return 4587;
+ case SUMMON_TYPE_TOTEM_AIR: // air
+ return 4590;
+ }
+ break;
+ }
}
return 0;
}