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/bindings/scripts/ScriptMgr.h

    r260 r272  
    2525class WorldObject; 
    2626 
    27 #define MAX_SCRIPTS         5000                            //72 bytes each (approx 351kb) 
     27#define MAX_SCRIPTS         1000                            //72 bytes each (approx 71kb) 
    2828#define VISIBLE_RANGE       (166.0f)                        //MAX visible range (size of grid) 
    2929#define DEFAULT_TEXT        "<Trinity Script Text Entry Missing!>" 
     
    3232{ 
    3333    Script() : 
    34         pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), 
    35         pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), 
    36         pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), 
    37         pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) 
    38     {} 
     34pGossipHello(NULL), pQuestAccept(NULL), pGossipSelect(NULL), pGossipSelectWithCode(NULL), 
     35pQuestSelect(NULL), pQuestComplete(NULL), pNPCDialogStatus(NULL), pGODialogStatus(NULL), pChooseReward(NULL), 
     36pItemHello(NULL), pGOHello(NULL), pAreaTrigger(NULL), pItemQuestAccept(NULL), pGOQuestAccept(NULL), 
     37pGOChooseReward(NULL),pReceiveEmote(NULL),pItemUse(NULL), GetAI(NULL), GetInstanceData(NULL) 
     38{} 
    3939 
    40     std::string Name; 
     40std::string Name; 
    4141 
    42     //Methods to be scripted 
    43     bool (*pGossipHello         )(Player*, Creature*); 
    44     bool (*pQuestAccept         )(Player*, Creature*, Quest const* ); 
    45     bool (*pGossipSelect        )(Player*, Creature*, uint32 , uint32 ); 
    46     bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); 
    47     bool (*pQuestSelect         )(Player*, Creature*, Quest const* ); 
    48     bool (*pQuestComplete       )(Player*, Creature*, Quest const* ); 
    49     uint32 (*pNPCDialogStatus   )(Player*, Creature* ); 
    50     uint32 (*pGODialogStatus    )(Player*, GameObject * _GO ); 
    51     bool (*pChooseReward        )(Player*, Creature*, Quest const*, uint32 ); 
    52     bool (*pItemHello           )(Player*, Item*, Quest const* ); 
    53     bool (*pGOHello             )(Player*, GameObject* ); 
    54     bool (*pAreaTrigger         )(Player*, AreaTriggerEntry* ); 
    55     bool (*pItemQuestAccept     )(Player*, Item *, Quest const* ); 
    56     bool (*pGOQuestAccept       )(Player*, GameObject*, Quest const* ); 
    57     bool (*pGOChooseReward      )(Player*, GameObject*, Quest const*, uint32 ); 
    58     bool (*pReceiveEmote        )(Player*, Creature*, uint32 ); 
    59     bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& ); 
     42// Quest/gossip Methods to be scripted 
     43bool (*pGossipHello         )(Player*, Creature*); 
     44bool (*pQuestAccept         )(Player*, Creature*, Quest const* ); 
     45bool (*pGossipSelect        )(Player*, Creature*, uint32 , uint32 ); 
     46bool (*pGossipSelectWithCode)(Player*, Creature*, uint32 , uint32 , const char* ); 
     47bool (*pQuestSelect         )(Player*, Creature*, Quest const* ); 
     48bool (*pQuestComplete       )(Player*, Creature*, Quest const* ); 
     49uint32 (*pNPCDialogStatus   )(Player*, Creature* ); 
     50uint32 (*pGODialogStatus    )(Player *player, GameObject * _GO ); 
     51bool (*pChooseReward        )(Player*, Creature*, Quest const*, uint32 ); 
     52bool (*pItemHello           )(Player*, Item*, Quest const* ); 
     53bool (*pGOHello             )(Player*, GameObject* ); 
     54bool (*pAreaTrigger         )(Player*, AreaTriggerEntry* ); 
     55bool (*pItemQuestAccept     )(Player*, Item *, Quest const* ); 
     56bool (*pGOQuestAccept       )(Player*, GameObject*, Quest const* ); 
     57bool (*pGOChooseReward      )(Player*, GameObject*_GO, Quest const*, uint32 ); 
     58bool (*pReceiveEmote        )(Player*, Creature*, uint32 ); 
     59bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& ); 
    6060 
    61     CreatureAI* (*GetAI)(Creature*); 
    62     InstanceData* (*GetInstanceData)(Map*); 
     61CreatureAI* (*GetAI)(Creature*); 
     62InstanceData* (*GetInstanceData)(Map*); 
     63}; 
    6364 
    64     void RegisterSelf(); 
    65 }; 
     65extern int nrscripts; 
     66extern Script *m_scripts[MAX_SCRIPTS]; 
    6667 
    6768//Generic scripting text function