Show
Ignore:
Timestamp:
11/21/08 08:47:55 (17 years ago)
Author:
yumileroy
Message:

*DB script table stucture change. Source Mangos. Also fix some bugs. Hopefully this rev will make program usable again.

Original author: megamage
Date: 2008-11-20 10:43:20-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/ScriptMgr.h

    r149 r260  
    2525class WorldObject; 
    2626 
    27 #define MAX_SCRIPTS         1000                            //72 bytes each (approx 71kb) 
     27#define MAX_SCRIPTS         5000                            //72 bytes each (approx 351kb) 
    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 {} 
     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    {} 
    3939 
    40 std::string Name; 
     40    std::string Name; 
    4141 
    42 // Quest/gossip 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 *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*_GO, Quest const*, uint32 ); 
    58 bool (*pReceiveEmote        )(Player*, Creature*, uint32 ); 
    59 bool (*pItemUse             )(Player*, Item*, SpellCastTargets const& ); 
     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& ); 
    6060 
    61 CreatureAI* (*GetAI)(Creature*); 
    62 InstanceData* (*GetInstanceData)(Map*); 
     61    CreatureAI* (*GetAI)(Creature*); 
     62    InstanceData* (*GetInstanceData)(Map*); 
     63 
     64    void RegisterSelf(); 
    6365}; 
    64  
    65 extern int nrscripts; 
    66 extern Script *m_scripts[MAX_SCRIPTS]; 
    6766 
    6867//Generic scripting text function