diff options
| author | megamage <none@none> | 2009-03-20 14:01:46 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-03-20 14:01:46 -0600 |
| commit | 8f627853dfaab8bfecd24bfd96ad02c6503d517e (patch) | |
| tree | ab518e88d6bfd462e50998541cbcc1575134ce66 /src/game/Pet.cpp | |
| parent | 7cd9a01954f6905dfb0e6a113b5799cc2442a39e (diff) | |
*More work on summon system.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
| -rw-r--r-- | src/game/Pet.cpp | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp index d7721070e63..af3725c626c 100644 --- a/src/game/Pet.cpp +++ b/src/game/Pet.cpp @@ -44,19 +44,15 @@ Creature(), m_petType(type), m_removed(false), m_happinessTimer(7500), m_duratio m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_auraRaidUpdateMask(0), m_loading(false), m_declinedname(NULL) { - m_isPet = true; + m_summonMask |= SUMMON_MASK_PET; m_name = "Pet"; m_regenTimer = 4000; // pets always have a charminfo, even if they are not actually charmed - CharmInfo* charmInfo = InitCharmInfo(); + InitCharmInfo(); if(type == POSSESSED_PET) // always passive SetReactState(REACT_PASSIVE); - else if(type == GUARDIAN_PET) // always aggressive - SetReactState(REACT_AGGRESSIVE); - - //m_isActive = true; } Pet::~Pet() @@ -930,41 +926,6 @@ bool Pet::InitStatsForLevel(uint32 petlevel) } break; } - case GUARDIAN_PET: - SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0); - SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000); - - switch(GetEntry()) - { - case 1964: //force of nature - SetCreateHealth(30 + 30*petlevel); - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 2.5f - (petlevel / 2))); - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 2.5f + (petlevel / 2))); - break; - case 15352: //earth elemental 36213 - SetCreateHealth(100 + 120*petlevel); - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4))); - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4))); - break; - case 15438: //fire elemental - SetCreateHealth(40*petlevel); - SetCreateMana(28 + 10*petlevel); - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel * 4 - petlevel)); - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel * 4 + petlevel)); - break; - default: - SetCreateMana(28 + 10*petlevel); - SetCreateHealth(28 + 30*petlevel); - - // FIXME: this is wrong formula, possible each guardian pet have own damage formula - //these formula may not be correct; however, it is designed to be close to what it should be - //this makes dps 0.5 of pets level - SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4))); - //damage range is then petlevel / 2 - SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4))); - break; - } - break; default: sLog.outError("Pet have incorrect type (%u) for levelup.", getPetType()); break; |
