mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 10:37:02 +00:00
50 plus cmangos updates implemented (to c12832)
Implemented over 50 updates from the cmangos Cata repo, up to and including c12832 Improve random movement The core will now work with the creature_template update that was applied to the database yesterday.
This commit is contained in:
parent
12f8fbf37d
commit
e4d1bdfc74
80 changed files with 3164 additions and 2965 deletions
|
|
@ -180,7 +180,7 @@ bool Pet::LoadPetFromDB(Player* owner, uint32 petentry, uint32 petnumber, bool c
|
|||
|
||||
// reget for sure use real creature info selected for Pet at load/creating
|
||||
CreatureInfo const* cinfo = GetCreatureInfo();
|
||||
if (cinfo->type == CREATURE_TYPE_CRITTER)
|
||||
if (cinfo->CreatureType == CREATURE_TYPE_CRITTER)
|
||||
{
|
||||
AIM_Initialize();
|
||||
pos.GetMap()->Add((Creature*)this);
|
||||
|
|
@ -817,7 +817,7 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (cinfo->type == CREATURE_TYPE_CRITTER)
|
||||
if (cinfo->CreatureType == CREATURE_TYPE_CRITTER)
|
||||
{
|
||||
setPetType(MINI_PET);
|
||||
return true;
|
||||
|
|
@ -830,12 +830,12 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
|
|||
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, sObjectMgr.GetXPForPetLevel(creature->getLevel()));
|
||||
SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
|
||||
if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family))
|
||||
if (CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->Family))
|
||||
SetName(cFamily->Name[sWorld.GetDefaultDbcLocale()]);
|
||||
else
|
||||
SetName(creature->GetNameForLocaleIdx(sObjectMgr.GetDBCLocaleIndex()));
|
||||
|
||||
if (cinfo->type == CREATURE_TYPE_BEAST)
|
||||
if (cinfo->CreatureType == CREATURE_TYPE_BEAST)
|
||||
{
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 1, CLASS_WARRIOR);
|
||||
SetByteValue(UNIT_FIELD_BYTES_0, 2, GENDER_NONE);
|
||||
|
|
@ -889,7 +889,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
|
|||
|
||||
SetLevel(petlevel);
|
||||
|
||||
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
|
||||
SetMeleeDamageSchool(SpellSchools(cinfo->DamageSchool));
|
||||
|
||||
SetModifierValue(UNIT_MOD_ARMOR, BASE_VALUE, float(petlevel * 50));
|
||||
|
||||
|
|
@ -899,7 +899,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
|
|||
|
||||
SetFloatValue(UNIT_MOD_CAST_SPEED, 1.0);
|
||||
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->family);
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cinfo->Family);
|
||||
if (cFamily && cFamily->minScale > 0.0f && getPetType() == HUNTER_PET)
|
||||
{
|
||||
float Scale;
|
||||
|
|
@ -919,12 +919,12 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
|
|||
|
||||
if (getPetType() != HUNTER_PET)
|
||||
{
|
||||
createResistance[SPELL_SCHOOL_HOLY] = cinfo->resistance1;
|
||||
createResistance[SPELL_SCHOOL_FIRE] = cinfo->resistance2;
|
||||
createResistance[SPELL_SCHOOL_NATURE] = cinfo->resistance3;
|
||||
createResistance[SPELL_SCHOOL_FROST] = cinfo->resistance4;
|
||||
createResistance[SPELL_SCHOOL_SHADOW] = cinfo->resistance5;
|
||||
createResistance[SPELL_SCHOOL_ARCANE] = cinfo->resistance6;
|
||||
createResistance[SPELL_SCHOOL_HOLY] = cinfo->ResistanceHoly;
|
||||
createResistance[SPELL_SCHOOL_FIRE] = cinfo->ResistanceFire;
|
||||
createResistance[SPELL_SCHOOL_NATURE] = cinfo->ResistanceNature;
|
||||
createResistance[SPELL_SCHOOL_FROST] = cinfo->ResistanceFrost;
|
||||
createResistance[SPELL_SCHOOL_SHADOW] = cinfo->ResistanceShadow;
|
||||
createResistance[SPELL_SCHOOL_ARCANE] = cinfo->ResistanceArcane;
|
||||
}
|
||||
|
||||
switch (getPetType())
|
||||
|
|
@ -985,8 +985,8 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
|
|||
sLog.outErrorDb("Summoned pet (Entry: %u) not have pet stats data in DB", cinfo->Entry);
|
||||
|
||||
// remove elite bonuses included in DB values
|
||||
SetCreateHealth(uint32(((float(cinfo->maxhealth) / cinfo->maxlevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
SetCreateMana(uint32(((float(cinfo->maxmana) / cinfo->maxlevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
SetCreateHealth(uint32(((float(cinfo->MaxLevelHealth) / cinfo->MaxLevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
SetCreateMana(uint32(((float(cinfo->MaxLevelMana) / cinfo->MaxLevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
|
||||
SetCreateStat(STAT_STRENGTH, 22);
|
||||
SetCreateStat(STAT_AGILITY, 22);
|
||||
|
|
@ -1024,7 +1024,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel, Unit* owner)
|
|||
sLog.outErrorDb("Hunter pet levelstats missing in DB");
|
||||
|
||||
// remove elite bonuses included in DB values
|
||||
SetCreateHealth(uint32(((float(cinfo->maxhealth) / cinfo->maxlevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
SetCreateHealth(uint32(((float(cinfo->MaxLevelHealth) / cinfo->MaxLevel) / (1 + 2 * cinfo->Rank)) * petlevel));
|
||||
|
||||
SetCreateStat(STAT_STRENGTH, 22);
|
||||
SetCreateStat(STAT_AGILITY, 22);
|
||||
|
|
@ -1074,7 +1074,7 @@ bool Pet::HaveInDiet(ItemPrototype const* item) const
|
|||
if (!cInfo)
|
||||
return false;
|
||||
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cInfo->family);
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cInfo->Family);
|
||||
if (!cFamily)
|
||||
return false;
|
||||
|
||||
|
|
@ -1563,7 +1563,7 @@ void Pet::InitLevelupSpellsForLevel()
|
|||
{
|
||||
uint32 level = getLevel();
|
||||
|
||||
if (PetLevelupSpellSet const* levelupSpells = GetCreatureInfo()->family ? sSpellMgr.GetPetLevelupSpellList(GetCreatureInfo()->family) : NULL)
|
||||
if (PetLevelupSpellSet const* levelupSpells = GetCreatureInfo()->Family ? sSpellMgr.GetPetLevelupSpellList(GetCreatureInfo()->Family) : NULL)
|
||||
{
|
||||
// PetLevelupSpellSet ordered by levels, process in reversed order
|
||||
for (PetLevelupSpellSet::const_reverse_iterator itr = levelupSpells->rbegin(); itr != levelupSpells->rend(); ++itr)
|
||||
|
|
@ -1702,7 +1702,7 @@ bool Pet::resetTalents(bool no_cost)
|
|||
if (!ci)
|
||||
return false;
|
||||
// Check pet talent type
|
||||
CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->family);
|
||||
CreatureFamilyEntry const* pet_family = sCreatureFamilyStore.LookupEntry(ci->Family);
|
||||
if (!pet_family || pet_family->petTalentType < 0)
|
||||
return false;
|
||||
|
||||
|
|
@ -1961,9 +1961,9 @@ bool Pet::IsPermanentPetFor(Player* owner)
|
|||
// oddly enough, Mage's Water Elemental is still treated as temporary pet with Glyph of Eternal Water
|
||||
// i.e. does not unsummon at mounting, gets dismissed at teleport etc.
|
||||
case CLASS_WARLOCK:
|
||||
return GetCreatureInfo()->type == CREATURE_TYPE_DEMON;
|
||||
return GetCreatureInfo()->CreatureType == CREATURE_TYPE_DEMON;
|
||||
case CLASS_DEATH_KNIGHT:
|
||||
return GetCreatureInfo()->type == CREATURE_TYPE_UNDEAD;
|
||||
return GetCreatureInfo()->CreatureType == CREATURE_TYPE_UNDEAD;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2012,7 +2012,7 @@ void Pet::LearnPetPassives()
|
|||
if (!cInfo)
|
||||
return;
|
||||
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cInfo->family);
|
||||
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(cInfo->Family);
|
||||
if (!cFamily)
|
||||
return;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue