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

Delete possessed AI only on creature delete.

Original author: gvcoman
Date: 2008-11-16 14:38:02-05:00

Files:
1 modified

Legend:

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

    r267 r272  
    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     uint32  ScriptID; 
     208    char const* ScriptName; 
    209209    uint32 GetRandomValidModelId() const; 
    210210    uint32 GetFirstValidModelId() const; 
    211  
    212     // helpers 
     211     
    213212    SkillType GetRequiredLootSkill() const 
    214213    { 
     
    220219            return SKILL_SKINNING;                          // normal case 
    221220    } 
    222  
     221     
    223222    bool isTameable() const 
    224223    { 
     
    427426        bool canSwim() const { return GetCreatureInfo()->InhabitType & INHABIT_WATER; } 
    428427        bool canFly()  const { return GetCreatureInfo()->InhabitType & INHABIT_AIR; } 
    429         bool isAggressive() const { return m_isAggressive; } 
    430         void SetAggressive(bool agg) { m_isAggressive = agg; } 
    431428        ///// TODO RENAME THIS!!!!! 
    432429        bool isCanTrainingOf(Player* player, bool msg) const; 
     
    461458        bool AIM_Initialize(); 
    462459        void InitPossessedAI(); 
    463         void DeletePossessedAI(); 
     460        void DisablePossessedAI(); 
    464461 
    465462        void AI_SendMoveToPacket(float x, float y, float z, uint32 time, uint32 MovementFlags, uint8 type); 
     
    502499        CreatureInfo const *GetCreatureInfo() const { return m_creatureInfo; } 
    503500        CreatureDataAddon const* GetCreatureAddon() const; 
    504  
    505         std::string GetScriptName(); 
    506         uint32 GetScriptId(); 
     501        char const* GetScriptName() const; 
    507502 
    508503        void prepareGossipMenu( Player *pPlayer, uint32 gossipid = 0 ); 
     
    530525        // overwrite WorldObject function for proper name localization 
    531526        const char* GetNameForLocaleIdx(int32 locale_idx) const; 
    532  
     527     
    533528        void setDeathState(DeathState s);                   // overwrite virtual Unit::setDeathState 
    534529 
     
    558553        bool canSeeOrDetect(Unit const* u, bool detect, bool inVisibleList) const; 
    559554        bool IsWithinSightDist(Unit const* u) const; 
    560         bool canStartAttack(Unit const* u) const; 
    561555        float GetAttackDistance(Unit const* pl) const; 
    562556 
    563         Unit* SelectNearestTarget(float dist = 0) const; 
    564557        void CallAssistence(); 
    565558        void SetNoCallAssistence(bool val) { m_AlreadyCallAssistence = val; } 
     
    641634        bool m_isPet;                                       // set only in Pet::Pet 
    642635        bool m_isTotem;                                     // set only in Totem::Totem 
    643         bool m_isAggressive; 
    644636        void RegenerateMana(); 
    645637        void RegenerateHealth();