Show
Ignore:
Timestamp:
11/22/08 00:36:22 (17 years ago)
Author:
yumileroy
Message:

Merged commit 269 (5f0e38da128a).

Original author: gvcoman
Date: 2008-11-21 14:34:05-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Creature.h

    r272 r279  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    206206    uint32  MechanicImmuneMask; 
    207207    uint32  flags_extra; 
    208     char const* ScriptName; 
     208    uint32  ScriptID; 
    209209    uint32 GetRandomValidModelId() const; 
    210210    uint32 GetFirstValidModelId() const; 
    211      
     211 
     212    // helpers 
    212213    SkillType GetRequiredLootSkill() const 
    213214    { 
     
    219220            return SKILL_SKINNING;                          // normal case 
    220221    } 
    221      
     222 
    222223    bool isTameable() const 
    223224    { 
     
    426427        bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; } 
    427428        bool canFly()  const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; } 
     429        bool isAggressive() const { return m_isAggressive; } 
     430        void SetAggressive(bool agg) { m_isAggressive = agg; } 
    428431        ///// TODO RENAME THIS!!!!! 
    429432        bool isCanTrainingOf(Player* player, bool msg) const; 
     
    499502        CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; } 
    500503        CreatureDataAddon const* GetCreatureAddon() const; 
    501         char const* GetScriptName() const; 
     504 
     505        std::string GetScriptName(); 
     506        uint32 GetScriptId(); 
    502507 
    503508        void prepareGossipMenu( Player *pPlayer, uint32 gossipid = 0 ); 
     
    525530        // overwrite WorldObject function for proper name localization 
    526531        const char* GetNameForLocaleIdx(int32 locale_idx) const; 
    527      
     532 
    528533        void setDeathState(DeathState s);                   // overwrite virtual Unit::setDeathState 
    529534 
     
    553558        bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList) const; 
    554559        bool IsWithinSightDist(Unit const* u) const; 
     560        bool canStartAttack(Unit const* u) const; 
    555561        float GetAttackDistance(Unit const* pl) const; 
    556562 
     563        Unit* SelectNearestTarget(float dist = 0) const; 
    557564        void CallAssistence(); 
    558565        void SetNoCallAssistence(bool val) { m_AlreadyCallAssistence = val; } 
     
    634641        bool m_isPet;                                       // set only in Pet::Pet 
    635642        bool m_isTotem;                                     // set only in Totem::Totem 
     643        bool m_isAggressive; 
    636644        void RegenerateMana(); 
    637645        void RegenerateHealth();