00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00025 #ifndef __OBJECT_H
00026 #define __OBJECT_H
00027
00028 #include <string>
00029 #include "math.h"
00030 #include <algorithm>
00031 #include "stdio.h"
00032 #include "stdlib.h"
00033
00034 #include "Message.h"
00035 #include "cModels.h"
00036 #include "cMagicModels.h"
00037 #include "cItemModels.h"
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067 #define SKILL_AXE 0x01
00068 #define SKILL_BOW 0x02
00069 #define SKILL_CROSSBOW 0x03
00070 #define SKILL_DAGGER 0x04
00071 #define SKILL_MACE 0x05
00072 #define SKILL_MELEE_DEFENSE 0x06
00073 #define SKILL_MISSLE_DEFENSE 0x07
00074 #define SKILL_SPEAR 0x09
00075 #define SKILL_STAFF 0x0A
00076 #define SKILL_SWORD 0x0B
00077 #define SKILL_THROWN_WEAPONS 0x0C
00078 #define SKILL_UNARMED_COMBAT 0x0D
00079 #define SKILL_ARCANE_LORE 0x0E
00080 #define SKILL_MAGIC_DEFENSE 0x0F
00081 #define SKILL_MANA_CONVERSION 0x10
00082 #define SKILL_ITEM_TINKERING 0x12
00083 #define SKILL_ASSESS_PERSON 0x13
00084 #define SKILL_DECEPTION 0x14
00085 #define SKILL_HEALING 0x15
00086 #define SKILL_JUMP 0x16
00087 #define SKILL_LOCKPICK 0x17
00088 #define SKILL_RUN 0x18
00089 #define SKILL_ASSESS_CREATURE 0x1B
00090 #define SKILL_WEAPON_TINKERING 0x1C
00091 #define SKILL_ARMOR_TINKERING 0x1D
00092 #define SKILL_MAGIC_ITEM_TINKERING 0x1E
00093 #define SKILL_CREATURE_ENCHANTMENT 0x1F
00094 #define SKILL_ITEM_ENCHANTMENT 0x20
00095 #define SKILL_LIFE_MAGIC 0x21
00096 #define SKILL_WAR_MAGIC 0x22
00097 #define SKILL_LEADERSHIP 0x23
00098 #define SKILL_LOYALTY 0x24
00099 #define SKILL_FLETCHING 0x25
00100 #define SKILL_ALCHEMY 0x26
00101 #define SKILL_COOKING 0x27
00102 #define SKILL_SALVAGE 0x28
00103 #define PAI 3.14159265
00104
00105 class cWeapon;
00106 class cWand;
00107 class cArmor;
00108 class cDoor;
00109 class cChest;
00110 class cFood;
00111
00112 struct cVital {
00113 WORD m_wID;
00114 DWORD m_dwIncreases;
00115 DWORD m_dwCurrent;
00116 DWORD m_dwXP;
00117 long m_lTrueCurrent;
00118
00119 inline cVital& operator=( DWORD dw )
00120 {
00121 long lDiff = dw - m_dwCurrent;
00122 m_dwCurrent = dw;
00123 m_dwIncreases += lDiff;
00124 return *this;
00125 }
00126 };
00127
00128 typedef struct cObjStats
00129 {
00130 DWORD m_dwLevel;
00131 DWORD m_dwStr;
00132 DWORD m_dwEnd;
00133 DWORD m_dwQuick;
00134 DWORD m_dwCoord;
00135 DWORD m_dwFocus;
00136 DWORD m_dwSelf;
00137 DWORD m_dwSpecies;
00138
00139 cObjStats( )
00140 {
00141 m_dwLevel = 0x1;
00142 m_dwStr = 0x0;
00143 m_dwEnd = 0x0;
00144 m_dwQuick = 0x0;
00145 m_dwCoord = 0x0;
00146 m_dwFocus = 0x0;
00147 m_dwSelf = 0x0;
00148 m_dwSpecies = 0x28;
00149 }
00150 } cObjStats;
00151
00152 struct cAttribute {
00153 WORD m_wID;
00154 DWORD m_dwIncrement;
00155 DWORD m_dwCurrent;
00156 DWORD m_dwXP;
00157
00158 inline cAttribute& operator=( DWORD dw )
00159 {
00160 m_dwCurrent = dw;
00161 return *this;
00162 }
00163
00164 inline DWORD operator+( cAttribute& rhv )
00165 {
00166 return m_dwCurrent + rhv.m_dwCurrent;
00167 }
00168
00169 inline DWORD operator/( DWORD dw )
00170 {
00171 return m_dwCurrent / dw;
00172 }
00173 };
00174
00175 struct cSkill {
00176 WORD m_wID;
00177 WORD m_wStatus;
00178 DWORD m_dwIncreases;
00179 DWORD m_dwTotal;
00180 DWORD m_dwBase;
00181 DWORD m_dwBonus;
00182 DWORD m_dwXP;
00183 DWORD m_dwFreeXP;
00184
00185 inline cSkill& operator=( DWORD dw )
00186 {
00187 m_dwIncreases = dw;
00188 return *this;
00189 }
00190 inline cSkill& operator=( cAttribute& rhv )
00191 {
00192 m_dwIncreases = rhv.m_dwCurrent;
00193 return *this;
00194 }
00195 };
00196
00197 struct cStats {
00198 DWORD m_dwLevel;
00199 cAttribute m_lpcAttributes[6];
00200 cVital m_lpcVitals[3];
00201 cSkill m_lpcSkills[40];
00202 };
00203
00204 int calc_vec_to_deg(int vx, int vy);
00205
00206 class cObject
00207 {
00208 friend class cDatabase;
00209 friend class cPortalDat;
00210 public:
00214 cObject ( cLocation *pcLoc )
00215 {
00216 if ( pcLoc )
00217 SetLocation( pcLoc );
00218 m_bInventorySequence = -1;
00219 m_wPositionSequence = 0;
00220 m_wNumPortals = 0;
00221 m_wNumLogins = 0x3C;
00222 m_fEquipped = 0;
00223 m_fIsOwned = FALSE;
00224 m_fIsCasting = FALSE;
00225 m_wModelSeq = 0x0;
00226 m_bWearSeq = 0x0;
00227 m_wNumAnims = 0x0000;
00228 m_wCurAnim = 0x0000;
00229 m_wMeleeSequence = 0x0000;
00230 m_dwF7B0Sequence = 0x00000000;
00231 m_bStatSequence = 0x00;
00232 m_fDeadOrAlive = true;
00233 }
00237 cObject( )
00238 {
00239 m_bInventorySequence = -1;
00240 m_wPositionSequence = 0;
00241 m_wNumLogins = 0x3C;
00242 m_fEquipped = 0;
00243 m_fIsOwned = FALSE;
00244 m_fIsCasting = FALSE;
00245 m_wNumAnims = 0x0000;
00246 m_wCurAnim = 0x0000;
00247 m_wMeleeSequence = 0x0000;
00248 m_dwF7B0Sequence = 0x00000000;
00249 m_bStatSequence = 0x00;
00250 m_fDeadOrAlive = true;
00251 }
00252 virtual ~cObject( ) {}
00253
00254 void SetLocation( double dNS, double dEW );
00255 inline void SetLocation( cLocation& Loc )
00256 {
00257 m_Location.m_dwLandBlock = Loc.m_dwLandBlock;
00258 m_Location.m_flX = Loc.m_flX;
00259 m_Location.m_flY = Loc.m_flY;
00260 m_Location.m_flZ = Loc.m_flZ;
00261 m_Location.m_flA = Loc.m_flA;
00262 m_Location.m_flB = Loc.m_flB;
00263 m_Location.m_flC = Loc.m_flC;
00264 m_Location.m_flW = Loc.m_flW;
00265 }
00266 inline void SetLocation( cLocation *pcLoc )
00267 {
00268 m_Location.m_dwLandBlock = pcLoc->m_dwLandBlock;
00269 m_Location.m_flX = pcLoc->m_flX;
00270 m_Location.m_flY = pcLoc->m_flY;
00271 m_Location.m_flZ = pcLoc->m_flZ;
00272 m_Location.m_flA = pcLoc->m_flA;
00273 m_Location.m_flB = pcLoc->m_flB;
00274 m_Location.m_flC = pcLoc->m_flC;
00275 m_Location.m_flW = pcLoc->m_flW;
00276 }
00277 inline void SetLocation( DWORD dwLandBlock, float flX, float flY, float flZ, float flA, float flW )
00278 {
00279 m_Location.m_dwLandBlock = dwLandBlock;
00280 m_Location.m_flX = flX;
00281 m_Location.m_flY = flY;
00282 m_Location.m_flZ = flZ;
00283 m_Location.m_flA = flA;
00284 m_Location.m_flW = flW;
00285 }
00286
00287 inline void SetSpawnLoc( cLocation *pcLoc )
00288 {
00289 m_SpawnLoc.m_dwLandBlock = pcLoc->m_dwLandBlock;
00290 m_SpawnLoc.m_flX = pcLoc->m_flX;
00291 m_SpawnLoc.m_flY = pcLoc->m_flY;
00292 m_SpawnLoc.m_flZ = pcLoc->m_flZ;
00293 m_SpawnLoc.m_flA = pcLoc->m_flA;
00294 m_SpawnLoc.m_flB = pcLoc->m_flB;
00295 m_SpawnLoc.m_flC = pcLoc->m_flC;
00296 m_SpawnLoc.m_flW = pcLoc->m_flW;
00297 }
00298 inline void SetSpawnLoc( cLocation& Loc )
00299 {
00300 m_SpawnLoc.m_dwLandBlock = Loc.m_dwLandBlock;
00301 m_SpawnLoc.m_flX = Loc.m_flX;
00302 m_SpawnLoc.m_flY = Loc.m_flY;
00303 m_SpawnLoc.m_flZ = Loc.m_flZ;
00304 m_SpawnLoc.m_flA = Loc.m_flA;
00305 m_SpawnLoc.m_flB = Loc.m_flB;
00306 m_SpawnLoc.m_flC = Loc.m_flC;
00307 m_SpawnLoc.m_flW = Loc.m_flW;
00308 }
00309
00310
00311
00312
00313 virtual cMessage LocationPacket ( );
00314 virtual cMessage CreatePacket ( ) = 0;
00315 virtual cMessage Animation ( WORD wAnim, float flPlaySpeed );
00316 virtual cMessage Animation ( WORD wAnim, float flPlaySpeed, BYTE bActivity );
00317 virtual void Assess ( cClient *pcAssesser ){}
00318 virtual void Action ( cClient *pcActioner ) = 0;
00319 virtual void Attack ( cClient *pcAttacker, float flDamageSlider, DWORD F7B0Sequence );
00320 virtual void SpellAttack ( cClient *pcAttacker, cObject *pcWarSpell, DWORD F7B0Sequence );
00321 virtual cMessage AdjustBar ( DWORD dwGUID, DWORD F7B0Sequence );
00322
00323
00324 static cMessage RemoveObj ( DWORD dwGUID );
00325
00326
00327 virtual cMessage ChangeCombatMode( bool fMode );
00328
00329 virtual cMessage CombatAnimation ( DWORD dwTarget, WORD wAttackAnim );
00330
00331 virtual DWORD CalculateDamage ( int strength, float flPower, float flResistance );
00332
00333 virtual cMessage TurnToTarget ( float flHeading, DWORD dwTargetGUID );
00334 virtual float GetRange ( DWORD dwTargetLandblock, float flTarX, float flTarY, float flTarZ);
00335 virtual float GetHeadingTarget( DWORD dwTargetLandblock, float flTarX, float flTarY, float flTarZ );
00336 virtual cMessage MoveToTarget ( cClient *pcWho );
00337 virtual cMessage MoveTarget ( cClient *pcWho );
00338 virtual cMessage ReturnToSpawn ( );
00339 virtual void ReSpawn ( cObject *pcObject );
00340 virtual cLocation CoordLoc ( float dNS, float dEW );
00341
00342 cLocation EstimateLoc ( float flHeading, float flSpeed, float flDistToTarget,float flTime );
00343 virtual cMessage SetPosition ( );
00344
00345
00346
00347 virtual inline DWORD GetMonsterModelID( )
00348 {
00349 return m_dwMonsterModel;
00350 }
00351
00352 virtual inline DWORD GetItemModelID()
00353 {
00354 return m_dwItemModelID;
00355 }
00356
00357
00358 inline DWORD GetGUID()
00359 {
00360 return m_dwGUID;
00361 }
00362
00363 inline DWORD SetGUID(cObject *pcObj, DWORD nGUID)
00364 {
00365 pcObj->m_dwGUID = nGUID;
00366 return pcObj->m_dwGUID;
00367 }
00368
00369
00370 inline DWORD GetContainer(DWORD dwGUID)
00371 {
00372 return m_dwContainer;
00373 }
00374
00375 inline const char *Name()
00376 {
00377 return m_strName.c_str();
00378 }
00379
00380 inline const char *TokenlessName()
00381 {
00382 const char *szName = m_strName.c_str();
00383
00384 if ( *szName == '+' ) return szName + 1;
00385 else return szName;
00386 }
00387
00388
00389 inline void SetStatic( BOOL state )
00390 {
00391 m_fStatic = state;
00392 }
00393
00394 inline BOOL IsStatic()
00395 {
00396 return m_fStatic;
00397 }
00398
00399
00400
00401
00402
00403
00404
00405
00406
00407
00408 void SetType(int type)
00409 {
00410 item_type = type;
00411 }
00412 int GetType()
00413 {
00414 return item_type;
00415 }
00416
00417
00418 void SetState(int state)
00419 {
00420 m_wState = state;
00421 }
00422 int GetState()
00423 {
00424 return m_wState;
00425 }
00426
00427 cLocation m_Location;
00428 cLocation m_SpawnLoc;
00429
00430 BYTE m_bInventorySequence;
00431 WORD m_wPositionSequence;
00432 WORD m_wNumLogins;
00433 WORD m_wNumPortals;
00434 int m_fEquipped;
00435 BOOL m_fIsOwned;
00436 BOOL m_fIsCasting;
00437 DWORD m_dwContainer;
00438 WORD m_wModelSeq;
00439 BYTE m_bWearSeq;
00440 WORD m_wNumEquips;
00441 WORD m_wState;
00442 WORD m_wNumAnims;
00443 DWORD m_dwDoorState;
00444 WORD m_wPortalMode;
00445 DWORD m_dwObjectFlags1;
00446 DWORD m_dwObjectFlags2;
00447 cLocation m_LSLoc;
00448 cLocation m_HRLoc;
00449 std::string m_strName;
00450 std::string m_strDescription;
00451 WORD m_wCurAnim;
00452 WORD m_wMeleeSequence;
00453 DWORD m_dwF7B0Sequence;
00454 DWORD m_dwConfirmSequence;
00455 BYTE m_bStatSequence;
00456 bool m_fCombatMode;
00457 BYTE m_bIdleAnim;
00458 cVelocity m_Velocity;
00459 DWORD m_dwReSpawn;
00460 DWORD m_dwDecay;
00461 DWORD m_dwChase;
00462 DWORD m_dwInfluence;
00463 DWORD m_dwExp_Value;
00464 bool m_fDeadOrAlive;
00465 DWORD m_dwSpellModel;
00466 DWORD m_dwSpellID;
00467 DWORD m_dwFlagCount;
00468 int item_type;
00469 WORD m_wUses;
00470 DWORD m_dwItemModelID;
00471 float m_fApproachDistance;
00472
00473 DWORD m_dwHouseGUID;
00474 DWORD m_dwOwnerID;
00475 DWORD m_dwQuantity;
00476
00477
00478
00479 DWORD m_dwVitalID;
00480 DWORD m_dwAmount;
00481
00482 DWORD m_dwActivate_Req_SkillID;
00483 DWORD m_dwActivate_Req_Skill_Level;
00484 DWORD m_dwArmor_Level;
00485 float m_fProt_Slashing;
00486 float m_fProt_Piercing;
00487 float m_fProt_Bludgeon;
00488 float m_fProt_Fire;
00489 float m_fProt_Cold;
00490 float m_fProt_Acid;
00491 float m_fProt_Electric;
00492
00493 DWORD m_dwValue;
00494 WORD m_wStack;
00495 WORD m_wStackLimit;
00496
00497
00498
00499
00500 int m_intColor;
00501
00502 BYTE m_bPaletteChange;
00503 DWORD m_wPaletteVector;
00504 sPaletteChange m_vectorPal[255];
00505
00506 BYTE m_bWearPaletteChange;
00507 DWORD m_wWearPaletteVector;
00508 sPaletteChange m_WearVectorPal[255];
00509
00510
00511 std::list< cEnchantment * > m_lstEnchantments;
00512
00513 protected:
00514 DWORD m_dwGUID;
00515 DWORD m_dwModel;
00516 WORD m_wIcon;
00517 BOOL m_fSelectable;
00518 float m_flScale;
00519 BOOL m_fStatic;
00520 DWORD m_dwMode;
00521 DWORD m_dwMonsterModel;
00522 };
00523
00524 class cBiotic : public cObject
00525 {
00526 public:
00527 cBiotic ( cLocation *pcLoc )
00528 : cObject( pcLoc )
00529 {
00530 m_bInventorySequence = -1;
00531 m_wPositionSequence = 0;
00532 m_wNumPortals = 0;
00533 m_wNumLogins = 0x3C;
00534 m_fIsOwned = FALSE;
00535 }
00536
00537 cBiotic( )
00538 {
00539 m_bInventorySequence = -1;
00540 m_wPositionSequence = 0;
00541 m_wNumPortals = 0;
00542 m_wNumLogins = 0x3C;
00543 }
00544 virtual ~cBiotic( ) {}
00545 virtual void Action( cClient *pcClient ) {}
00546
00547 protected:
00548 cStats m_Stats;
00549 };
00550
00551 #define NPCMODE_SINGLE 1
00552 #define NPCMODE_MULTI 2
00553 #define NPCMODE_RANDOM 3
00554
00555 class cNPC : public cObject
00556 {
00557 friend class cClient;
00558
00559 public:
00560 cNPC();
00566 cNPC(DWORD dwGUID, DWORD dwNPCModelID, char *szName, WORD wGender, cLocation *pcLoc = NULL, DWORD dwSellCategories = 0x00000000 );
00567
00568 void Assess (cClient *pcAssesser );
00569 cMessage CreatePacket ( );
00570 void Action (cClient* who);
00571
00572 void GiveItem (cClient *who, DWORD itemid, DWORD npcid);
00573
00574 void BuyItem (cClient *who, DWORD VendorID, DWORD ItemID);
00575
00576
00577 void ApproachVendor (cClient *who);
00578
00579 DWORD m_dwNPCModelID;
00580
00581
00582
00583
00584
00585
00586
00587
00588
00589
00590
00591
00592
00593
00594
00595
00596
00597
00598
00599
00600
00601
00602
00603
00604
00605
00606
00607
00608
00609
00610
00611 virtual ~cNPC( ) {}
00612 void SetMode(DWORD mode)
00613 {
00614 m_dwMode = mode;
00615 }
00616 void SetModel(WORD wNPCModel)
00617 {
00618 m_wNPCModel = wNPCModel;
00619 }
00620 void SetNumMessages(int num)
00621 {
00622 iNumMessages = num;
00623 }
00624 int GetNumMessages()
00625 {
00626 return iNumMessages;
00627 }
00628 DWORD GetMode()
00629 {
00630 return m_dwMode;
00631 }
00632
00633
00634 void SetIsVendor(int vend)
00635 {
00636 IsVendor = vend;
00637 }
00638 int GetIsVendor()
00639 {
00640 return IsVendor;
00641 }
00642
00643
00644 void Set_npc_id(int npcid)
00645 {
00646 npc_id = npcid;
00647 }
00648 int Get_npc_id()
00649 {
00650 return npc_id;
00651 }
00652
00653 void SetString(std::string str,int index)
00654 {
00655 if(index<0||index>15)
00656 {
00657 return;
00658 }
00659 vsMessages[index] = str;
00660 }
00661
00662
00663
00664
00665
00666
00667
00668
00669
00670 inline void AddInventory( cObject *pcObject )
00671 {
00672 m_NPC_lstInventory.push_back( pcObject );
00673 pcObject->m_fIsOwned = TRUE;
00674 pcObject->m_dwContainer = m_dwGUID;
00675 }
00676
00677 inline void RemoveInventory( cObject *pcObject )
00678 {
00679 iterObject_lst itObject = std::find( m_NPC_lstInventory.begin( ), m_NPC_lstInventory.end( ), pcObject );
00680
00681 if ( itObject != m_NPC_lstInventory.end( ) )
00682 m_NPC_lstInventory.erase( itObject );
00683 pcObject->m_fIsOwned = FALSE;
00684 pcObject->m_dwContainer = NULL;
00685 }
00686
00687 inline cObject *FindInventory( DWORD dwGUID )
00688 {
00689 for ( iterObject_lst itObject = m_NPC_lstInventory.begin( ); itObject != m_NPC_lstInventory.end( ); ++itObject )
00690 {
00691 if ( dwGUID == (*itObject)->GetGUID( ) )
00692 return *itObject;
00693 }
00694 return NULL;
00695 }
00696
00697 inline void DeleteFromInventory( cObject *pcObject )
00698 {
00699 iterObject_lst itObject = std::find( m_NPC_lstInventory.begin( ), m_NPC_lstInventory.end( ), pcObject );
00700
00701 if ( itObject != m_NPC_lstInventory.end( ) )
00702 m_NPC_lstInventory.erase( itObject );
00703 }
00704
00705 cObjStats m_NPCStats;
00706 DWORD m_qitem_id1;
00707
00708
00709 DWORD m_npc_target_id;
00710
00711
00712 DWORD v_guids[255];
00713 std::list< cNPC * > npc_ids;
00714
00715
00716 private:
00717 int npc_id;
00718 int IsVendor;
00719 int iNumMessages;
00720 WORD m_wGender;
00721 std::string vsMessages[32];
00722 DWORD m_dwMode;
00723 WORD m_wNPCModel;
00724 DWORD m_dwSellCategories;
00725
00726
00727
00728 std::list< cObject * > m_NPC_lstInventory;
00729
00730
00731 };
00732
00733 class cLifestone : public cObject
00734 {
00735 public:
00736 cLifestone();
00742 cLifestone(WORD type, DWORD dwGUID, cLocation *pcLoc, char *szName, char *szDesc);
00743 virtual ~cLifestone() {}
00744
00745 void Assess (cClient *pcAssesser );
00746 cMessage CreatePacket();
00747 void Action(cClient* who);
00748 void SetMode(DWORD mode)
00749 {
00750 m_dwMode = mode;
00751 }
00752 DWORD GetMode()
00753 {
00754 return m_dwMode;
00755 }
00756 void SetData(WORD wAnimConfig, WORD wSoundSet,WORD wModel,WORD wIcon, DWORD dwObject1, DWORD dwObject2)
00757 {
00758 m_wAnimConfig = wAnimConfig;
00759 m_wSoundSet = wSoundSet;
00760 m_wModel = wModel;
00761 m_wIcon = wIcon;
00762 m_dwObjectsFlag1 = dwObject1;
00763 m_dwObjectsFlag2 = dwObject2;
00764 }
00765 private:
00766
00767 DWORD m_dwMode;
00768 DWORD m_dwType;
00769 WORD m_wModel;
00770 WORD m_wIcon;
00771 WORD m_wSoundSet;
00772 WORD m_wPortalMode;
00773 WORD m_wAnimConfig;
00774 DWORD m_dwObjectsFlag1;
00775 DWORD m_dwObjectsFlag2;
00776
00777 };
00778
00779 class cPortal : public cObject
00780 {
00781 public:
00782 cPortal ( );
00788 cPortal ( DWORD dwGUID, DWORD dwColor, cLocation *Loc, cLocation *destLoc, char *szName, char *szDescription, DWORD dwLowerRestrict, DWORD dwHigherRestrict );
00789
00790 virtual ~cPortal ( ) {}
00791
00792 void Assess ( cClient *pcAssesser );
00793 void Use ( cClient *pcUser );
00794 void Action ( cClient *who );
00795 cMessage CreatePacket( );
00796
00797 inline void SetDestination( cLocation *pcLoc )
00798 {
00799 m_cDestination.m_dwLandBlock = pcLoc->m_dwLandBlock;
00800 m_cDestination.m_flX = pcLoc->m_flX;
00801 m_cDestination.m_flY = pcLoc->m_flY;
00802 m_cDestination.m_flZ = pcLoc->m_flZ;
00803 m_cDestination.m_flA = pcLoc->m_flA;
00804 m_cDestination.m_flB = pcLoc->m_flB;
00805 m_cDestination.m_flC = pcLoc->m_flC;
00806 m_cDestination.m_flW = pcLoc->m_flW;
00807 }
00808 private:
00809 cLocation m_cWorldLoc;
00810 cLocation m_cDestination;
00811
00812
00813
00814
00815
00816 DWORD m_dwLowerRestriction;
00817 DWORD m_dwHigherRestriction;
00818 DWORD m_dwType;
00819 WORD m_wModel;
00820 WORD m_wIcon;
00821 WORD m_wPortalMode;
00822 WORD m_wAnimConfig;
00823 DWORD m_dwObjectsFlag1;
00824 DWORD m_dwObjectsFlag2;
00825 };
00826
00827 class cAbiotic : public cObject
00828 {
00829 public:
00830 cAbiotic( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwWeight, DWORD dwValue, BOOL fSelectable = TRUE, BOOL fEquippable = TRUE, BOOL fStackable = FALSE, BOOL fIsOwned = FALSE, DWORD dwContainer = 0 )
00831 {
00832 m_dwGUID = dwGUID;
00833 m_dwModel = dwModel;
00834 m_flScale = flScale;
00835 m_wIcon = dwIcon;
00836 m_strName = strName;
00837 m_strDescription = strDescription;
00838 m_fSelectable = fSelectable;
00839 m_dwWeight = dwWeight;
00840 m_dwValue = dwValue;
00841 m_fIsOwned = fIsOwned;
00842 m_dwContainer = dwContainer;
00843 m_fEquippable = fEquippable;
00844 m_fIsStackable = fStackable;
00845 m_fIsSolid = fSolid;
00846 m_fIsOwned = FALSE;
00847 m_wState = 0;
00848 m_dwDoorState = 0x0CL;
00849
00850 m_bInventorySequence= -1;
00851 m_wPositionSequence = 0;
00852 m_wNumPortals = 0;
00853 m_wNumLogins = 0x3C;
00854 m_fEquipped = 0;
00855
00856 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
00857 }
00858 cAbiotic( ) {}
00859 virtual ~cAbiotic( ) {}
00860
00861 cMessage CreatePacket ( );
00862 cMessage Animation ( WORD wAnim, float flPlaySpeed ) { return *((cMessage *)NULL); }
00863 void Assess ( cClient *pcAssesser );
00864 void Use ( cClient *pcAssesser ) {}
00865 void Action ( cClient *pcClient ) {}
00866
00867 void SetContainer( DWORD dwGUID );
00868
00869 protected:
00870 DWORD m_dwWeight;
00871 DWORD m_dwValue;
00872 BOOL m_fIsStackable;
00873 BOOL m_fEquippable;
00874 BOOL m_fIsSolid;
00875
00876 std::string m_strDescription;
00877 };
00878
00879
00880
00881
00882
00883
00884
00885
00886
00887
00888 class cMisc : public cObject
00889 {
00890 public:
00896 cMisc( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
00897 {
00898 m_dwGUID = dwGUID;
00899 m_dwModel = dwModel;
00900 m_flScale = flScale;
00901 m_wIcon = dwIcon;
00902 m_strName = strName;
00903 m_strDescription = strDescription;
00904
00905 m_bInventorySequence= -1;
00906 m_wPositionSequence = 0;
00907 m_wNumPortals = 0;
00908 m_wNumLogins = 0x3C;
00909 m_fEquipped = 0;
00910
00911 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
00912 }
00918 cMisc( DWORD dwGUID, DWORD Container, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
00919 {
00920 m_dwGUID = dwGUID;
00921 m_dwModel = dwModel;
00922 m_flScale = flScale;
00923 m_wIcon = dwIcon;
00924 m_strName = strName;
00925 m_strDescription = strDescription;
00926
00927 m_bInventorySequence= -1;
00928 m_wPositionSequence = 0;
00929 m_wNumPortals = 0;
00930 m_wNumLogins = 0x3C;
00931 m_fEquipped = 0;
00932 }
00933
00934 cMisc( ) {}
00935 virtual ~cMisc( ) {}
00936
00937 cMessage CreatePacket ( );
00938 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
00939 void Assess ( cClient *pcAssesser );
00940 void Action ( cClient* who );
00941
00942 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
00943 inline DWORD GetContainerID ( ) { return m_dwContainer; }
00944
00945 DWORD m_dwItemModelID;
00946
00947 protected:
00948 DWORD m_dwWeight;
00949 DWORD m_dwValue;
00950 BOOL m_fIsStackable;
00951 BOOL m_fEquippable;
00952 BOOL m_fIsSolid;
00953
00954 std::string m_strDescription;
00955 };
00956
00957
00958
00959
00960 class cFood : public cObject
00961 {
00962 public:
00968 cFood( DWORD dwGUID, cLocation& Loc, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wBurden, DWORD dwVitalID, DWORD dwAmount ) : m_dwItemModelID( dwModel )
00969 {
00970 m_dwGUID = dwGUID;
00971 m_dwModel = dwModel;
00972 m_wIcon = dwIcon;
00973 m_strName = strName;
00974 m_strDescription = strDescription;
00975 m_wBurden = wBurden;
00976 m_dwValue = dwValue;
00977 m_dwVitalID = dwVitalID;
00978 m_dwAmount = dwAmount;
00979
00980 m_bInventorySequence= -1;
00981 m_wPositionSequence = 0;
00982 m_wNumPortals = 0;
00983 m_wNumLogins = 0x3C;
00984 m_fEquipped = 0;
00985
00986 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
00987 }
00993 cFood( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wStack, WORD wBurden, DWORD dwVitalID, DWORD dwVitalAffect) : m_dwItemModelID( dwModel )
00994 {
00995 m_dwGUID = dwGUID;
00996 m_dwModel = dwModel;
00997 m_wIcon = dwIcon;
00998 m_strName = strName;
00999 m_strDescription = strDescription;
01000 m_wBurden = wBurden;
01001 m_dwValue = dwValue;
01002 m_dwVitalID = dwVitalID;
01003 m_wStack = wStack;
01004 m_dwContainer = dwContainer;
01005 m_dwVitalAffect = dwVitalAffect;
01006
01007 m_bInventorySequence= -1;
01008 m_wPositionSequence = 0;
01009 m_wNumPortals = 0;
01010 m_wNumLogins = 0x3C;
01011 m_fEquipped = 0;
01012 }
01013
01014 cFood( ) {}
01015 virtual ~cFood( ) {}
01016
01017 cMessage CreatePacket ( );
01018 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01019 cMessage Animation ( WORD wAnim, float flPlaySpeed ) { return *((cMessage *)NULL); }
01020 void Assess ( cClient *pcAssesser );
01021 void Action ( cClient* who );
01022
01023 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01024 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01025
01026 DWORD m_dwItemModelID;
01027
01028 protected:
01029 DWORD m_dwValue;
01030 WORD m_wBurden;
01031 DWORD m_dwVitalID;
01032 WORD m_wStack;
01033 DWORD m_dwVitalAffect;
01034
01035 std::string m_strDescription;
01036 };
01037
01038
01039
01040
01041 class cArmor : public cObject
01042 {
01043 public:
01049 cArmor( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01050 {
01051 m_dwGUID = dwGUID;
01052 m_dwModel = dwModel;
01053 m_flScale = flScale;
01054 m_wIcon = dwIcon;
01055 m_strName = strName;
01056 m_strDescription = strDescription;
01057
01058
01059
01060 m_bInventorySequence= -1;
01061 m_wPositionSequence = 0;
01062 m_wNumPortals = 0;
01063 m_wNumLogins = 0x3C;
01064 m_fEquipped = 0;
01065 m_bWearPaletteChange= 0;
01066
01067 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01068 }
01074 cArmor( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wBurden, DWORD dwArmor_Level, float fProt_Slashing, float fProt_Piercing, float fProt_Bludgeon, float fProt_Fire, float fProt_Cold, float fProt_Acid, float fProt_Electric) : m_dwItemModelID( dwModel )
01075
01076 {
01077 m_dwGUID = dwGUID;
01078 m_dwModel = dwModel;
01079 m_flScale = flScale;
01080 m_wIcon = dwIcon;
01081 m_strName = strName;
01082 m_strDescription = strDescription;
01083
01084 m_wBurden = wBurden;
01085 m_dwValue = dwValue;
01086
01087 m_dwContainer = dwContainer;
01088
01089
01090 m_fIsSolid = fSolid;
01091 m_fIsOwned = TRUE;
01092 m_dwArmor_Level = dwArmor_Level;
01093 m_fProt_Slashing = fProt_Slashing;
01094 m_fProt_Piercing = fProt_Piercing;
01095 m_fProt_Bludgeon = fProt_Bludgeon;
01096 m_fProt_Fire = fProt_Fire;
01097 m_fProt_Cold = fProt_Cold;
01098 m_fProt_Acid = fProt_Acid;
01099 m_fProt_Electric = fProt_Electric;
01100
01101 m_bInventorySequence= -1;
01102 m_wPositionSequence = 0;
01103 m_wNumPortals = 0;
01104 m_wNumLogins = 0x3C;
01105 m_fEquipped = 0;
01106 m_bWearPaletteChange= 0;
01107 }
01108 cArmor( ) {}
01109 virtual ~cArmor( ) {}
01110
01111 cMessage CreatePacket ( );
01112 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01113 void Assess ( cClient *pcAssesser );
01114 void Action ( cClient* who );
01115
01116 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01117 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01118
01119 inline DWORD GetSlashProt ( ) { return m_fProt_Slashing; }
01120
01121 DWORD m_dwItemModelID;
01122
01123 protected:
01124 DWORD m_dwValue;
01125 WORD m_wBurden;
01126
01127 BOOL m_fIsStackable;
01128 BOOL m_fEquippable;
01129 BOOL m_fIsSolid;
01130
01131 DWORD m_dwActivate_Req_SkillID;
01132 DWORD m_dwActivate_Req_Skill_Level;
01133 DWORD m_dwArmor_Level;
01134 float m_fProt_Slashing;
01135 float m_fProt_Piercing;
01136 float m_fProt_Bludgeon;
01137 float m_fProt_Fire;
01138 float m_fProt_Cold;
01139 float m_fProt_Acid;
01140 float m_fProt_Electric;
01141
01142 std::string m_strDescription;
01143 };
01144
01145
01146
01147
01148 class cScrolls : public cObject
01149 {
01150 public:
01156 cScrolls( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01157 {
01158 m_dwGUID = dwGUID;
01159 m_dwModel = dwModel;
01160 m_flScale = flScale;
01161 m_wIcon = dwIcon;
01162 m_strName = strName;
01163 m_strDescription = strDescription;
01164
01165 m_bInventorySequence= -1;
01166 m_wPositionSequence = 0;
01167 m_wNumPortals = 0;
01168 m_wNumLogins = 0x3C;
01169 m_fEquipped = 0;
01170
01171 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01172 }
01178 cScrolls( DWORD dwGUID, DWORD Container, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01179 {
01180 m_dwGUID = dwGUID;
01181 m_dwModel = dwModel;
01182 m_flScale = flScale;
01183 m_wIcon = dwIcon;
01184 m_strName = strName;
01185 m_strDescription = strDescription;
01186
01187 m_bInventorySequence= -1;
01188 m_wPositionSequence = 0;
01189 m_wNumPortals = 0;
01190 m_wNumLogins = 0x3C;
01191 m_fEquipped = 0;
01192 }
01193
01194 cScrolls( ) {}
01195 virtual ~cScrolls( ) {}
01196
01197 cMessage CreatePacket ( );
01198 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01199 void Assess ( cClient *pcAssesser );
01200 void Action ( cClient* who );
01201
01202 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01203 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01204
01205 DWORD m_dwItemModelID;
01206
01207 protected:
01208 DWORD m_dwWeight;
01209 DWORD m_dwValue;
01210 BOOL m_fIsStackable;
01211 BOOL m_fEquippable;
01212 BOOL m_fIsSolid;
01213
01214 std::string m_strDescription;
01215 };
01216
01217
01218
01219
01220 class cHealingKits : public cObject
01221 {
01222 public:
01228 cHealingKits( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, WORD wUses, WORD wUseLimit) : m_dwItemModelID( dwModel )
01229 {
01230 m_dwGUID = dwGUID;
01231 m_dwModel = dwModel;
01232 m_flScale = flScale;
01233 m_wIcon = dwIcon;
01234 m_strName = strName;
01235 m_strDescription = strDescription;
01236 dwValue = m_dwValue;
01237 wWeight = m_wWeight;
01238 m_wUses = wUses;
01239 m_wUseLimit = wUseLimit;
01240
01241 m_bInventorySequence= -1;
01242 m_wPositionSequence = 0;
01243 m_wNumPortals = 0;
01244 m_wNumLogins = 0x3C;
01245 m_fEquipped = 0;
01246
01247 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01248 }
01249 cHealingKits( ) {}
01250 virtual ~cHealingKits( ) {}
01251
01252 cMessage CreatePacket ( );
01253 void Assess ( cClient *pcAssesser );
01254 void Action ( cClient* who );
01255
01256 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01257 DWORD m_dwItemModelID;
01258
01259 protected:
01260 WORD m_wWeight;
01261 DWORD m_dwValue;
01262 DWORD m_wUses;
01263 DWORD m_wUseLimit;
01264 BOOL m_fIsStackable;
01265 BOOL m_fEquippable;
01266 BOOL m_fIsSolid;
01267
01268 std::string m_strDescription;
01269 };
01270
01271
01272
01273
01274 class cGems : public cObject
01275 {
01276 public:
01282 cGems( DWORD dwGUID, cLocation& Loc, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01283 {
01284 m_dwGUID = dwGUID;
01285 m_dwModel = dwModel;
01286 m_wIcon = wIcon;
01287 m_strName = strName;
01288 m_strDescription = strDescription;
01289
01290 m_bInventorySequence= -1;
01291 m_wPositionSequence = 0;
01292 m_wNumPortals = 0;
01293 m_wNumLogins = 0x3C;
01294 m_fEquipped = 0;
01295
01296 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01297 }
01303 cGems( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
01304 {
01305 m_dwGUID = dwGUID;
01306 m_dwModel = dwModel;
01307 m_wIcon = wIcon;
01308 m_strName = strName;
01309 m_strDescription = strDescription;
01310 m_dwValue = dwValue;
01311 m_wWeight = wWeight;
01312
01313 m_bInventorySequence= -1;
01314 m_wPositionSequence = 0;
01315 m_wNumPortals = 0;
01316 m_wNumLogins = 0x3C;
01317 m_fEquipped = 0;
01318 }
01319
01320 cGems( ) {}
01321 virtual ~cGems( ) {}
01322
01323 cMessage CreatePacket ( );
01324 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01325 void Assess ( cClient *pcAssesser );
01326 void Action ( cClient* who );
01327
01328 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01329 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01330 DWORD m_dwItemModelID;
01331
01332 protected:
01333 WORD m_wWeight;
01334 DWORD m_dwValue;
01335 BOOL m_fIsStackable;
01336 BOOL m_fEquippable;
01337 BOOL m_fIsSolid;
01338
01339 std::string m_strDescription;
01340 };
01341
01342
01343
01344
01345 class cBooks : public cObject
01346 {
01347 public:
01353 cBooks( DWORD dwGUID, cLocation& Loc, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01354 {
01355 m_dwGUID = dwGUID;
01356 m_dwModel = dwModel;
01357 m_wIcon = wIcon;
01358 m_strName = strName;
01359 m_strDescription = strDescription;
01360
01361 m_bInventorySequence= -1;
01362 m_wPositionSequence = 0;
01363 m_wNumPortals = 0;
01364 m_wNumLogins = 0x3C;
01365 m_fEquipped = 0;
01366
01367 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01368 }
01374 cBooks( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wBurden) : m_dwItemModelID( dwModel )
01375
01376
01377
01378
01379
01380
01381 {
01382 m_dwGUID = dwGUID;
01383 m_dwModel = dwModel;
01384 m_wIcon = wIcon;
01385 m_strName = strName;
01386 m_strDescription = strDescription;
01387 m_wBurden = wBurden;
01388 m_dwValue = dwValue;
01389
01390 m_bInventorySequence= -1;
01391 m_wPositionSequence = 0;
01392 m_wNumPortals = 0;
01393 m_wNumLogins = 0x3C;
01394 m_fEquipped = 0;
01395 }
01396
01397 cBooks( ) {}
01398 virtual ~cBooks( ) {}
01399
01400 cMessage CreatePacket ( );
01401 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01402 void Assess ( cClient *pcAssesser );
01403 void Action ( cClient* who );
01404 void Read ( cClient* who, DWORD GUID, DWORD PageNumber );
01405
01406 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01407 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01408 DWORD m_dwItemModelID;
01409
01410
01411
01412 protected:
01413 WORD m_wBurden;
01414 DWORD m_dwValue;
01415 BOOL m_fIsStackable;
01416 BOOL m_fEquippable;
01417 BOOL m_fIsSolid;
01418
01419
01420
01421
01422 std::string m_strDescription;
01423 };
01424
01425
01426
01427
01428 class cManaStones : public cObject
01429 {
01430 public:
01436 cManaStones( DWORD dwGUID, cLocation& Loc, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01437 {
01438 m_dwGUID = dwGUID;
01439 m_dwModel = dwModel;
01440 m_wIcon = dwIcon;
01441 m_strName = strName;
01442 m_strDescription = strDescription;
01443
01444 m_bInventorySequence= -1;
01445 m_wPositionSequence = 0;
01446 m_wNumPortals = 0;
01447 m_wNumLogins = 0x3C;
01448 m_fEquipped = 0;
01449
01450 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01451 }
01457 cManaStones( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
01458 {
01459 m_dwGUID = dwGUID;
01460 m_dwModel = dwModel;
01461 m_wIcon = dwIcon;
01462 m_strName = strName;
01463 m_strDescription = strDescription;
01464 m_wWeight = wWeight;
01465 m_dwValue = dwValue;
01466 m_dwContainer = dwContainer;
01467
01468
01469 m_wPositionSequence = 0;
01470 m_wNumPortals = 0;
01471 m_wNumLogins = 0x0;
01472 m_fEquipped = 0;
01473 }
01474 cManaStones( ) {}
01475 virtual ~cManaStones( ) {}
01476
01477 cMessage CreatePacket ( );
01478 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01479 void Assess ( cClient *pcAssesser );
01480 void Action ( cClient* who );
01481
01482 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01483 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01484 DWORD m_dwItemModelID;
01485
01486 protected:
01487 WORD m_wWeight;
01488 DWORD m_dwValue;
01489
01490 std::string m_strDescription;
01491 };
01492
01493
01494
01495
01496 class cLockpicks : public cObject
01497 {
01498 public:
01504 cLockpicks( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01505 {
01506 m_dwGUID = dwGUID;
01507 m_dwModel = dwModel;
01508 m_flScale = flScale;
01509 m_wIcon = dwIcon;
01510 m_strName = strName;
01511 m_strDescription = strDescription;
01512
01513 m_bInventorySequence= -1;
01514 m_wPositionSequence = 0;
01515 m_wNumPortals = 0;
01516 m_wNumLogins = 0x3C;
01517 m_fEquipped = 0;
01518
01519 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01520 }
01526 cLockpicks( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, WORD wUses, WORD wUseLimit) : m_dwItemModelID( dwModel )
01527 {
01528 m_dwGUID = dwGUID;
01529 m_dwModel = dwModel;
01530 m_flScale = flScale;
01531 m_wIcon = dwIcon;
01532 m_strName = strName;
01533 m_strDescription = strDescription;
01534 m_dwContainer = dwContainer;
01535 m_wUses = wUses;
01536 m_wUseLimit = wUseLimit;
01537
01538 m_bInventorySequence= -1;
01539 m_wPositionSequence = 0;
01540 m_wNumPortals = 0;
01541 m_wNumLogins = 0x3C;
01542 m_fEquipped = 0;
01543 }
01544 cLockpicks( ) {}
01545 virtual ~cLockpicks( ) {}
01546
01547 cMessage CreatePacket ( );
01548 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01549 void Assess ( cClient *pcAssesser );
01550 void Action ( cClient* who );
01551
01552 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01553 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01554 DWORD m_dwItemModelID;
01555
01556 protected:
01557 DWORD m_dwWeight;
01558 DWORD m_dwValue;
01559 BOOL m_fIsStackable;
01560 BOOL m_fEquippable;
01561 BOOL m_fIsSolid;
01562 WORD m_wUses;
01563 WORD m_wUseLimit;
01564
01565 std::string m_strDescription;
01566 };
01567
01568
01569
01570
01571 class cTradeSkillMats : public cObject
01572 {
01573 public:
01579 cTradeSkillMats( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01580 {
01581 m_dwGUID = dwGUID;
01582 m_dwModel = dwModel;
01583 m_flScale = flScale;
01584 m_wIcon = dwIcon;
01585 m_strName = strName;
01586 m_strDescription = strDescription;
01587
01588 m_bInventorySequence= -1;
01589 m_wPositionSequence = 0;
01590 m_wNumPortals = 0;
01591 m_wNumLogins = 0x3C;
01592 m_fEquipped = 0;
01593
01594 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01595 }
01601 cTradeSkillMats( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
01602 {
01603 m_dwGUID = dwGUID;
01604 m_dwModel = dwModel;
01605 m_flScale = flScale;
01606 m_wIcon = dwIcon;
01607 m_strName = strName;
01608 m_strDescription = strDescription;
01609 m_fSelectable = fSelectable;
01610 m_wWeight = wWeight;
01611 m_dwValue = dwValue;
01612 m_fIsOwned = fIsOwned;
01613 m_dwContainer = dwContainer;
01614 m_fEquippable = fEquippable;
01615 m_fIsStackable = fStackable;
01616 m_fIsSolid = fSolid;
01617 m_fIsOwned = TRUE;
01618
01619 m_bInventorySequence= -1;
01620 m_wPositionSequence = 0;
01621 m_wNumPortals = 0;
01622 m_wNumLogins = 0x3C;
01623 m_fEquipped = 0;
01624 }
01625 cTradeSkillMats( ) {}
01626 virtual ~cTradeSkillMats( ) {}
01627
01628 cMessage CreatePacket ( );
01629 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01630 void Assess ( cClient *pcAssesser );
01631 void Action ( cClient* who );
01632
01633 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01634 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01635 DWORD m_dwItemModelID;
01636
01637 protected:
01638 WORD m_wWeight;
01639 DWORD m_dwValue;
01640 BOOL m_fIsStackable;
01641 BOOL m_fEquippable;
01642 BOOL m_fIsSolid;
01643
01644 std::string m_strDescription;
01645 };
01646
01647
01648
01649
01650 class cWands : public cObject
01651 {
01652 public:
01658 cWands( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01659 {
01660 m_dwGUID = dwGUID;
01661 m_dwModel = dwModel;
01662 m_flScale = flScale;
01663 m_wIcon = dwIcon;
01664 m_strName = strName;
01665 m_strDescription = strDescription;
01666
01667 m_bInventorySequence= -1;
01668 m_wPositionSequence = 0;
01669 m_wNumPortals = 0;
01670 m_wNumLogins = 0x3C;
01671 m_fEquipped = 0;
01672
01673 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01674 }
01680 cWands( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
01681 {
01682 m_dwGUID = dwGUID;
01683 m_dwModel = dwModel;
01684 m_flScale = flScale;
01685 m_wIcon = dwIcon;
01686 m_strName = strName;
01687 m_strDescription = strDescription;
01688 m_fSelectable = fSelectable;
01689 m_wWeight = wWeight;
01690 m_dwValue = dwValue;
01691 m_fIsOwned = fIsOwned;
01692 m_dwContainer = dwContainer;
01693 m_fEquippable = fEquippable;
01694 m_fIsStackable = fStackable;
01695 m_fIsSolid = fSolid;
01696 m_fIsOwned = TRUE;
01697
01698 m_bInventorySequence= -1;
01699 m_wPositionSequence = 0;
01700 m_wNumPortals = 0;
01701 m_wNumLogins = 0x3C;
01702 m_fEquipped = 0;
01703 }
01704 cWands( ) {}
01705 virtual ~cWands( ) {}
01706
01707 cMessage CreatePacket ( );
01708 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01709 void Assess ( cClient *pcAssesser );
01710 void Action ( cClient* who );
01711
01712 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01713 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01714 DWORD m_dwItemModelID;
01715
01716 protected:
01717 WORD m_wWeight;
01718 DWORD m_dwValue;
01719 BOOL m_fIsStackable;
01720 BOOL m_fEquippable;
01721 BOOL m_fIsSolid;
01722
01723 std::string m_strDescription;
01724 };
01725
01726
01727
01728
01729 class cSpellComps : public cObject
01730 {
01731 public:
01737 cSpellComps( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01738 {
01739 m_dwGUID = dwGUID;
01740 m_dwModel = dwModel;
01741 m_flScale = flScale;
01742 m_wIcon = dwIcon;
01743 m_strName = strName;
01744 m_strDescription = strDescription;
01745
01746 m_bInventorySequence= -1;
01747 m_wPositionSequence = 0;
01748 m_wNumPortals = 0;
01749 m_wNumLogins = 0x3C;
01750 m_fEquipped = 0;
01751
01752 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01753 }
01759 cSpellComps( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wStack, WORD wWeight ) : m_dwItemModelID( dwModel )
01760 {
01761 m_dwGUID = dwGUID;
01762 m_dwModel = dwModel;
01763 m_wIcon = dwIcon;
01764 m_strName = strName;
01765 m_strDescription = strDescription;
01766 m_wWeight = wWeight;
01767 m_dwValue = dwValue;
01768 m_dwContainer = dwContainer;
01769 m_wStack = wStack;
01770
01771 m_bInventorySequence= -1;
01772 m_wPositionSequence = 0;
01773 m_wNumPortals = 0;
01774 m_wNumLogins = 0x3C;
01775 m_fEquipped = 0;
01776 }
01777
01778 cSpellComps( ) {}
01779 virtual ~cSpellComps( ) {}
01780
01781 cMessage CreatePacket ( );
01782 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01783 void Assess ( cClient *pcAssesser );
01784 void Action ( cClient* who );
01785
01786 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01787 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01788
01789 DWORD m_dwItemModelID;
01790
01791 protected:
01792 WORD m_wWeight;
01793 WORD m_wStack;
01794 DWORD m_dwValue;
01795
01796 std::string m_strDescription;
01797 };
01798
01799
01800
01801
01802 class cPlants : public cObject
01803 {
01804 public:
01810 cPlants( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01811 {
01812 m_dwGUID = dwGUID;
01813 m_dwModel = dwModel;
01814 m_flScale = flScale;
01815 m_wIcon = dwIcon;
01816 m_strName = strName;
01817 m_strDescription = strDescription;
01818
01819 m_bInventorySequence= -1;
01820 m_wPositionSequence = 0;
01821 m_wNumPortals = 0;
01822 m_wNumLogins = 0x3C;
01823 m_fEquipped = 0;
01824
01825 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01826 }
01832 cPlants( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, DWORD wWeight ) : m_dwItemModelID( dwModel )
01833 {
01834 m_dwGUID = dwGUID;
01835 m_dwModel = dwModel;
01836 m_flScale = flScale;
01837 m_wIcon = dwIcon;
01838 m_strName = strName;
01839 m_strDescription = strDescription;
01840 m_wWeight = wWeight;
01841 m_dwValue = dwValue;
01842 m_dwContainer = dwContainer;
01843
01844
01845 m_bInventorySequence= -1;
01846 m_wPositionSequence = 0;
01847 m_wNumPortals = 0;
01848 m_wNumLogins = 0x3C;
01849 m_fEquipped = 0;
01850 }
01851
01852 cPlants( ) {}
01853 virtual ~cPlants( ) {}
01854
01855 cMessage CreatePacket ( );
01856 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01857 void Assess ( cClient *pcAssesser );
01858 void Action ( cClient* who );
01859
01860 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01861 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01862
01863 DWORD m_dwItemModelID;
01864
01865 protected:
01866 WORD m_wWeight;
01867 DWORD m_dwValue;
01868
01869 std::string m_strDescription;
01870 };
01871
01872
01873
01874
01875 class cAmmo : public cObject
01876 {
01877 public:
01883 cAmmo( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
01884 {
01885 m_dwGUID = dwGUID;
01886 m_dwModel = dwModel;
01887 m_flScale = flScale;
01888 m_wIcon = dwIcon;
01889 m_strName = strName;
01890 m_strDescription = strDescription;
01891
01892 m_bInventorySequence= -1;
01893 m_wPositionSequence = 0;
01894 m_wNumPortals = 0;
01895 m_wNumLogins = 0x3C;
01896 m_fEquipped = 0;
01897
01898 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01899 }
01905 cAmmo( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, WORD wStack, WORD wStackLimit ) : m_dwItemModelID( dwModel )
01906 {
01907 m_dwGUID = dwGUID;
01908 m_dwModel = dwModel;
01909 m_wIcon = dwIcon;
01910 m_strName = strName;
01911 m_strDescription = strDescription;
01912 m_wWeight = wWeight;
01913 m_dwValue = dwValue;
01914 m_dwContainer = dwContainer;
01915 m_wStack = wStack;
01916 m_wStackLimit = wStackLimit;
01917 m_bInventorySequence= -1;
01918 m_wPositionSequence = 0;
01919 m_wNumPortals = 0;
01920 m_wNumLogins = 0x3C;
01921 m_fEquipped = 0;
01922 }
01923 cAmmo( ) {}
01924 virtual ~cAmmo( ) {}
01925
01926 cMessage CreatePacket ( );
01927 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
01928 void Assess ( cClient *pcAssesser );
01929 void Action ( cClient* who );
01930
01931 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
01932 inline DWORD GetContainerID ( ) { return m_dwContainer; }
01933 DWORD m_dwItemModelID;
01934
01935 protected:
01936 WORD m_wWeight;
01937 DWORD m_dwValue;
01938 BOOL m_fIsStackable;
01939 BOOL m_fEquippable;
01940 BOOL m_fIsSolid;
01941 WORD m_wStack;
01942 WORD m_wStackLimit;
01943
01944 std::string m_strDescription;
01945 };
01946
01947
01948
01949
01950 class cWeapon : public cObject
01951 {
01952 public:
01958 cWeapon( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription,
01959 DWORD dwValue, WORD wWeight, BYTE bWieldType, DWORD dwIconHighlight, float fWorkmanship, DWORD dwMaterialType, DWORD dwWeaponDamage,
01960 DWORD dwWeaponSpeed, DWORD dwWeaponSkill, DWORD dwDamageType, double dWeaponVariance, double dWeaponModifier, double dWeaponPower,
01961 double dWeaponAttack) : m_dwItemModelID( dwModel )
01962 {
01963 m_dwGUID = dwGUID;
01964 m_dwModel = dwModel;
01965 m_flScale = flScale;
01966 m_wIcon = dwIcon;
01967 m_strName = strName;
01968 m_strDescription = strDescription;
01969 m_wWeight = wWeight;
01970 m_dwValue = dwValue;
01971 m_bWieldType = bWieldType;
01972 m_wIconHighlight = dwIconHighlight;
01973 m_fWorkmanShip = fWorkmanship;
01974 m_dwMaterialType = dwMaterialType;
01975 m_dwWeaponDamage = dwWeaponDamage;
01976 m_dwWeaponSpeed = dwWeaponSpeed;
01977 m_dwWeaponSkill = dwWeaponSkill;
01978 m_dwDamageType = dwDamageType;
01979 m_dWeaponVariance = dWeaponVariance;
01980 m_dWeaponModifier = dWeaponModifier;
01981 m_dWeaponPower = dWeaponPower;
01982 m_dWeaponAttack = dWeaponAttack;
01983
01984 m_bInventorySequence= -1;
01985 m_wPositionSequence = 0;
01986 m_wNumPortals = 0;
01987 m_wNumLogins = 0x3C;
01988 m_fEquipped = 0;
01989
01990 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
01991 }
01997 cWeapon( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription,
01998 DWORD dwValue, WORD wWeight, BYTE bWieldType, DWORD dwIconHighlight, float fWorkmanship, DWORD dwMaterialType, DWORD dwWeaponDamage,
01999 DWORD dwWeaponSpeed, DWORD dwWeaponSkill, DWORD dwDamageType, double dWeaponVariance, double dWeaponModifier, double dWeaponPower,
02000 double dWeaponAttack ) : m_dwItemModelID( dwModel )
02001 {
02002 m_dwGUID = dwGUID;
02003 m_dwModel = dwModel;
02004 m_flScale = flScale;
02005 m_wIcon = dwIcon;
02006 m_strName = strName;
02007 m_strDescription = strDescription;
02008
02009 m_wWeight = wWeight;
02010 m_dwValue = dwValue;
02011 m_bWieldType = bWieldType;
02012 m_wIconHighlight = dwIconHighlight;
02013 m_fWorkmanShip = fWorkmanship;
02014 m_dwMaterialType = dwMaterialType;
02015 m_dwWeaponDamage = dwWeaponDamage;
02016 m_dwWeaponSpeed = dwWeaponSpeed;
02017 m_dwWeaponSkill = dwWeaponSkill;
02018 m_dwDamageType = dwDamageType;
02019
02020 m_dWeaponVariance = dWeaponVariance;
02021 m_dWeaponModifier = dWeaponModifier;
02022 m_dWeaponPower = dWeaponPower;
02023 m_dWeaponAttack = dWeaponAttack;
02024
02025
02026
02027
02028
02029
02030
02031 m_bInventorySequence= -1;
02032 m_wPositionSequence = 0;
02033 m_wNumPortals = 0;
02034 m_wNumLogins = 0x3C;
02035 m_fEquipped = 0;
02036 }
02037 cWeapon( ) {}
02038 virtual ~cWeapon( ) {}
02039
02040 cMessage CreatePacket ( );
02041 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02042 void Assess ( cClient *pcAssesser );
02043 void Action ( cClient* who );
02044
02045 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02046 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02047
02048 inline DWORD GetItemValue ( ) { return m_dwValue; }
02049
02050 int GetIsUAWeapon()
02051 {
02052 return isUAWeapon;
02053 }
02054
02055 DWORD m_dwItemModelID;
02056 BYTE m_bWieldType;
02057 int isUAWeapon;
02058 DWORD m_dwDamageType;
02059
02060 protected:
02061 WORD m_wWeight;
02062 DWORD m_dwValue;
02063
02064 DWORD m_wIconHighlight;
02065 float m_fWorkmanShip;
02066 DWORD m_dwMaterialType;
02067
02068 DWORD m_dwWeaponDamage;
02069 DWORD m_dwWeaponSpeed;
02070 DWORD m_dwWeaponSkill;
02071
02072
02073 double m_dWeaponVariance;
02074 double m_dWeaponModifier;
02075 double m_dWeaponPower;
02076 double m_dWeaponAttack;
02077
02078 BOOL m_fIsStackable;
02079 BOOL m_fEquippable;
02080 BOOL m_fIsSolid;
02081
02082 std::string m_strDescription;
02083 };
02084
02085
02086
02087
02088 class cSalvage : public cObject
02089 {
02090 public:
02096 cSalvage( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
02097 {
02098 m_dwGUID = dwGUID;
02099 m_dwModel = dwModel;
02100 m_flScale = flScale;
02101 m_wIcon = dwIcon;
02102 m_strName = strName;
02103 m_strDescription = strDescription;
02104
02105 m_bInventorySequence= -1;
02106 m_wPositionSequence = 0;
02107 m_wNumPortals = 0;
02108 m_wNumLogins = 0x3C;
02109 m_fEquipped = 0;
02110
02111 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02112 }
02118 cSalvage( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
02119 {
02120 m_dwGUID = dwGUID;
02121 m_dwModel = dwModel;
02122 m_flScale = flScale;
02123 m_wIcon = dwIcon;
02124 m_strName = strName;
02125 m_strDescription = strDescription;
02126 m_wWeight = wWeight;
02127 m_dwValue = dwValue;
02128
02129 m_bInventorySequence= -1;
02130 m_wPositionSequence = 0;
02131 m_wNumPortals = 0;
02132 m_wNumLogins = 0x3C;
02133 m_fEquipped = 0;
02134 }
02135
02136 cSalvage( ) {}
02137 virtual ~cSalvage( ) {}
02138
02139 cMessage CreatePacket ( );
02140 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02141 void Assess ( cClient *pcAssesser );
02142 void Action ( cClient* who );
02143
02144 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02145 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02146
02147 DWORD m_dwItemModelID;
02148
02149 protected:
02150 WORD m_wWeight;
02151 DWORD m_dwValue;
02152 BOOL m_fIsStackable;
02153 BOOL m_fEquippable;
02154 BOOL m_fIsSolid;
02155
02156 std::string m_strDescription;
02157 };
02158
02159
02160
02161
02162 class cPyreals : public cObject
02163 {
02164 public:
02170 cPyreals( DWORD dwGUID, cLocation& Loc, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wStack, WORD wStackLimit) : m_dwItemModelID( dwModel )
02171 {
02172 m_dwGUID = dwGUID;
02173 m_dwModel = dwModel;
02174 m_wIcon = wIcon;
02175
02176 m_strName = strName;
02177 m_strDescription = strDescription;
02178 m_dwValue = dwValue;
02179 m_wStack = wStack;
02180 m_wStackLimit = wStackLimit;
02181
02182 m_bInventorySequence= -1;
02183 m_wPositionSequence = 0;
02184 m_wNumPortals = 0;
02185 m_wNumLogins = 0x3C;
02186 m_fEquipped = 0;
02187
02188 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02189 }
02195 cPyreals( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wStack, WORD wStackLimit) : m_dwItemModelID( dwModel )
02196 {
02197 m_dwGUID = dwGUID;
02198 m_dwModel = dwModel;
02199 m_wIcon = wIcon;
02200 m_strName = strName;
02201 m_strDescription = strDescription;
02202 m_dwValue = dwValue;
02203 m_wStack = wStack;
02204 m_wStackLimit = wStackLimit;
02205
02206 m_bInventorySequence= -1;
02207 m_wPositionSequence = 0;
02208 m_wNumPortals = 0;
02209 m_wNumLogins = 0x3C;
02210 m_fEquipped = 0;
02211 }
02212
02213 cPyreals( ) {}
02214 virtual ~cPyreals( ) {}
02215
02216 cMessage CreatePacket ( );
02217 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02218 void Assess ( cClient *pcAssesser );
02219 void Action ( cClient* who );
02220 void Stack ( cClient* who, DWORD item1, DWORD item2, DWORD amount);
02221 void Split ( cClient* who, DWORD item_guid, DWORD slot, DWORD value );
02222
02223 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02224 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02225 DWORD m_dwItemModelID;
02226
02227 WORD GetStack()
02228 {
02229 return m_wStack;
02230 }
02231
02232 WORD SetStack(WORD amount)
02233 {
02234 m_wStack = amount;
02235 }
02236
02237 protected:
02238 WORD m_wStack;
02239 WORD m_wStackLimit;
02240 DWORD m_dwWeight;
02241 DWORD m_dwValue;
02242 BOOL m_fIsStackable;
02243 BOOL m_fEquippable;
02244 BOOL m_fIsSolid;
02245
02246 std::string m_strDescription;
02247 };
02248
02249
02250
02251
02252 class cTradeNotes : public cObject
02253 {
02254 public:
02260 cTradeNotes( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
02261 {
02262 m_dwGUID = dwGUID;
02263 m_dwModel = dwModel;
02264 m_flScale = flScale;
02265 m_wIcon = wIcon;
02266 m_strName = strName;
02267 m_strDescription = strDescription;
02268 m_wWeight = wWeight;
02269 m_dwValue = dwValue;
02270 m_bInventorySequence= -1;
02271 m_wPositionSequence = 0;
02272 m_wNumPortals = 0;
02273 m_wNumLogins = 0x3C;
02274 m_fEquipped = 0;
02275
02276 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02277 }
02283 cTradeNotes( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
02284 {
02285 m_dwGUID = dwGUID;
02286 m_dwModel = dwModel;
02287 m_flScale = flScale;
02288 m_wIcon = dwIcon;
02289 m_strName = strName;
02290 m_strDescription = strDescription;
02291 m_wWeight = wWeight;
02292 m_dwValue = dwValue;
02293
02294 m_bInventorySequence= -1;
02295 m_wPositionSequence = 0;
02296 m_wNumPortals = 0;
02297 m_wNumLogins = 0x3C;
02298 m_fEquipped = 0;
02299 }
02300
02301 cTradeNotes( ) {}
02302 virtual ~cTradeNotes( ) {}
02303
02304 cMessage CreatePacket ( );
02305 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02306 void Assess ( cClient *pcAssesser );
02307 void Action ( cClient* who );
02308
02309 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02310 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02311 DWORD m_dwItemModelID;
02312
02313 protected:
02314 WORD m_wWeight;
02315 DWORD m_dwValue;
02316 BOOL m_fIsStackable;
02317 BOOL m_fEquippable;
02318 BOOL m_fIsSolid;
02319
02320 std::string m_strDescription;
02321 };
02322
02323
02324
02325
02326 class cJewelry : public cObject
02327 {
02328 public:
02334 cJewelry( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
02335 {
02336 m_dwGUID = dwGUID;
02337 m_dwModel = dwModel;
02338 m_flScale = flScale;
02339 m_wIcon = dwIcon;
02340 m_strName = strName;
02341 m_strDescription = strDescription;
02342
02343 m_bInventorySequence= -1;
02344 m_wPositionSequence = 0;
02345 m_wNumPortals = 0;
02346 m_wNumLogins = 0x3C;
02347 m_fEquipped = 0;
02348
02349 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02350 }
02356 cJewelry( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight) : m_dwItemModelID( dwModel )
02357 {
02358 m_dwGUID = dwGUID;
02359 m_dwModel = dwModel;
02360 m_flScale = flScale;
02361 m_wIcon = dwIcon;
02362 m_strName = strName;
02363 m_strDescription = strDescription;
02364 m_wWeight = wWeight;
02365 m_dwValue = dwValue;
02366
02367 m_bInventorySequence= -1;
02368 m_wPositionSequence = 0;
02369 m_wNumPortals = 0;
02370 m_wNumLogins = 0x3C;
02371 m_fEquipped = 0;
02372 }
02373
02374 cJewelry( ) {}
02375 virtual ~cJewelry( ) {}
02376
02377 cMessage CreatePacket ( );
02378 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02379 void Assess ( cClient *pcAssesser );
02380 void Action ( cClient* who );
02381
02382 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02383 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02384 DWORD m_dwItemModelID;
02385
02386 protected:
02387 WORD m_wWeight;
02388 DWORD m_dwValue;
02389 BOOL m_fIsStackable;
02390 BOOL m_fEquippable;
02391 BOOL m_fIsSolid;
02392
02393 std::string m_strDescription;
02394 };
02395
02396
02397
02398
02399 class cFoci : public cObject
02400 {
02401 public:
02407 cFoci( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
02408 {
02409 m_dwGUID = dwGUID;
02410 m_dwModel = dwModel;
02411 m_flScale = flScale;
02412 m_wIcon = dwIcon;
02413 m_strName = strName;
02414 m_strDescription = strDescription;
02415
02416
02417
02418 m_bInventorySequence= -1;
02419 m_wPositionSequence = 0;
02420 m_wNumPortals = 0;
02421 m_wNumLogins = 0x3C;
02422 m_fEquipped = 0;
02423
02424 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02425 }
02431 cFoci( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
02432 {
02433 m_dwGUID = dwGUID;
02434 m_dwModel = dwModel;
02435 m_flScale = flScale;
02436 m_wIcon = dwIcon;
02437 m_strName = strName;
02438 m_strDescription = strDescription;
02439 m_fSelectable = fSelectable;
02440 m_wWeight = wWeight;
02441 m_dwValue = dwValue;
02442 m_fIsOwned = fIsOwned;
02443 m_dwContainer = dwContainer;
02444 m_fEquippable = fEquippable;
02445 m_fIsStackable = fStackable;
02446 m_fIsSolid = fSolid;
02447 m_fIsOwned = TRUE;
02448
02449 m_bInventorySequence= -1;
02450 m_wPositionSequence = 0;
02451 m_wNumPortals = 0;
02452 m_wNumLogins = 0x3C;
02453 m_fEquipped = 0;
02454 }
02455 cFoci( ) {}
02456 virtual ~cFoci( ) {}
02457
02458 cMessage CreatePacket ( );
02459 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02460 void Assess ( cClient *pcAssesser );
02461 void Action ( cClient* who );
02462
02463 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02464 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02465 DWORD m_dwItemModelID;
02466
02467 protected:
02468 WORD m_wWeight;
02469 DWORD m_dwValue;
02470 BOOL m_fIsStackable;
02471 BOOL m_fEquippable;
02472 BOOL m_fIsSolid;
02473
02474 std::string m_strDescription;
02475 };
02476
02477
02478
02479
02480 class cPack : public cObject
02481 {
02482 public:
02488 cPack( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
02489 {
02490 m_dwGUID = dwGUID;
02491 m_dwModel = dwModel;
02492 m_flScale = flScale;
02493 m_wIcon = dwIcon;
02494 m_strName = strName;
02495 m_strDescription = strDescription;
02496
02497
02498
02499 m_bInventorySequence= -1;
02500 m_wPositionSequence = 0;
02501 m_wNumPortals = 0;
02502 m_wNumLogins = 0x3C;
02503 m_fEquipped = 0;
02504
02505 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02506 }
02512 cPack( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
02513 {
02514 m_dwGUID = dwGUID;
02515 m_dwModel = dwModel;
02516 m_flScale = flScale;
02517 m_wIcon = dwIcon;
02518 m_strName = strName;
02519 m_strDescription = strDescription;
02520 m_fSelectable = fSelectable;
02521 m_wWeight = wWeight;
02522 m_dwValue = dwValue;
02523 m_fIsOwned = fIsOwned;
02524 m_dwContainer = dwContainer;
02525 m_fEquippable = fEquippable;
02526 m_fIsStackable = fStackable;
02527 m_fIsSolid = fSolid;
02528 m_fIsOwned = TRUE;
02529
02530 m_bInventorySequence= -1;
02531 m_wPositionSequence = 0;
02532 m_wNumPortals = 0;
02533 m_wNumLogins = 0x3C;
02534 m_fEquipped = 0;
02535 }
02536
02537 cPack( ) {}
02538 virtual ~cPack( ) {}
02539
02540 cMessage CreatePacket ( );
02541 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02542 void Assess ( cClient *pcAssesser );
02543 void Action ( cClient* who );
02544
02545 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02546 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02547 DWORD m_dwItemModelID;
02548
02549 protected:
02550 WORD m_wWeight;
02551 DWORD m_dwValue;
02552 BOOL m_fIsStackable;
02553 BOOL m_fEquippable;
02554 BOOL m_fIsSolid;
02555
02556 std::string m_strDescription;
02557 };
02558
02559
02560
02561
02562 class cClothes : public cObject
02563 {
02564 public:
02570 cClothes( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription) : m_dwItemModelID( dwModel )
02571 {
02572 m_dwGUID = dwGUID;
02573 m_dwModel = dwModel;
02574 m_flScale = flScale;
02575 m_wIcon = dwIcon;
02576 m_strName = strName;
02577 m_strDescription = strDescription;
02578
02579
02580
02581 m_bInventorySequence= -1;
02582 m_wPositionSequence = 0;
02583 m_wNumPortals = 0;
02584 m_wNumLogins = 0x3C;
02585 m_fEquipped = 0;
02586 m_bWearPaletteChange= 0;
02587
02588 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02589 }
02595 cClothes( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wWeight, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
02596 {
02597 m_dwGUID = dwGUID;
02598 m_dwModel = dwModel;
02599 m_flScale = flScale;
02600 m_wIcon = dwIcon;
02601 m_strName = strName;
02602 m_strDescription = strDescription;
02603 m_fSelectable = fSelectable;
02604 m_wWeight = wWeight;
02605 m_dwValue = dwValue;
02606 m_fIsOwned = fIsOwned;
02607 m_dwContainer = dwContainer;
02608 m_fEquippable = fEquippable;
02609 m_fIsStackable = fStackable;
02610 m_fIsSolid = fSolid;
02611 m_fIsOwned = TRUE;
02612
02613
02614
02615
02616
02617
02618
02619
02620
02621 m_bInventorySequence= -1;
02622 m_wPositionSequence = 0;
02623 m_wNumPortals = 0;
02624 m_wNumLogins = 0x3C;
02625 m_fEquipped = 0;
02626 m_bWearPaletteChange= 0;
02627 }
02628 cClothes( ) {}
02629 virtual ~cClothes( ) {}
02630
02631 cMessage CreatePacket ( );
02632 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02633 void Assess ( cClient *pcAssesser );
02634 void Action ( cClient* who );
02635
02636 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02637 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02638 DWORD m_dwItemModelID;
02639
02640 protected:
02641 WORD m_wWeight;
02642 DWORD m_dwValue;
02643 BOOL m_fIsStackable;
02644 BOOL m_fEquippable;
02645 BOOL m_fIsSolid;
02646
02647 DWORD m_dwActivate_Req_SkillID;
02648 DWORD m_dwActivate_Req_Skill_Level;
02649 DWORD m_dwArmor_Level;
02650 float m_fProt_Slashing;
02651 float m_fProt_Piercing;
02652 float m_fProt_Bludgeon;
02653 float m_fProt_Fire;
02654 float m_fProt_Cold;
02655 float m_fProt_Acid;
02656 float m_fProt_Electric;
02657
02658 std::string m_strDescription;
02659 };
02660
02661
02662
02663
02664 class cShield : public cObject
02665 {
02666 public:
02672 cShield( DWORD dwGUID, cLocation& Loc, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wBurden, DWORD ArmorLevel) : m_dwItemModelID( dwModel )
02673 {
02674 m_dwGUID = dwGUID;
02675 m_dwModel = dwModel;
02676 m_wIcon = wIcon;
02677 m_strName = strName;
02678 m_strDescription = strDescription;
02679 m_wBurden = wBurden;
02680 m_dwValue = dwValue;
02681 m_dwArmorLevel = ArmorLevel;
02682 m_bInventorySequence= -1;
02683 m_wPositionSequence = 0;
02684 m_wNumPortals = 0;
02685 m_wNumLogins = 0x3C;
02686 m_fEquipped = 0;
02687
02688 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
02689 }
02695 cShield( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, WORD wIcon, std::string strName, std::string strDescription, DWORD dwValue, WORD wBurden, DWORD ArmorLevel) : m_dwItemModelID( dwModel )
02696 {
02697 m_dwGUID = dwGUID;
02698 m_dwModel = dwModel;
02699 m_wIcon = wIcon;
02700 m_strName = strName;
02701 m_strDescription = strDescription;
02702 m_wBurden = wBurden;
02703 m_dwValue = dwValue;
02704 m_dwContainer = dwContainer;
02705 m_dwArmorLevel = ArmorLevel;
02706
02707 m_bInventorySequence= -1;
02708 m_wPositionSequence = 0;
02709 m_wNumPortals = 0;
02710 m_wNumLogins = 0x3C;
02711 m_fEquipped = 0;
02712 }
02713
02714 cShield( ) {}
02715 virtual ~cShield( ) {}
02716
02717 cMessage CreatePacket ( );
02718 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02719 void Assess ( cClient *pcAssesser );
02720 void Action ( cClient* who );
02721
02722 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02723 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02724 DWORD m_dwItemModelID;
02725 DWORD m_dwArmorLevel;
02726 protected:
02727 WORD m_wBurden;
02728 DWORD m_dwValue;
02729 BOOL m_fIsStackable;
02730 BOOL m_fEquippable;
02731 BOOL m_fIsSolid;
02732
02733 std::string m_strDescription;
02734 };
02735
02736
02737
02738
02739
02740
02741
02742
02743
02744
02745
02746
02747 class cHealingCon : public cObject
02748 {
02749 public:
02755 cHealingCon( DWORD dwGUID, DWORD dwContainer, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwWeight, DWORD dwValue, WORD wUses, WORD wUseLimit, BOOL fSelectable = TRUE, BOOL fEquippable = FALSE, BOOL fStackable = TRUE, BOOL fIsOwned = TRUE ) : m_dwItemModelID( dwModel )
02756 {
02757 m_dwGUID = dwGUID;
02758 m_dwModel = dwModel;
02759 m_flScale = flScale;
02760 m_wIcon = dwIcon;
02761 m_strName = strName;
02762 m_strDescription = strDescription;
02763 m_fSelectable = fSelectable;
02764 m_dwWeight = dwWeight;
02765 m_dwValue = dwValue;
02766 m_wUses = wUses;
02767 m_wUseLimit = wUseLimit;
02768 m_fIsOwned = fIsOwned;
02769 m_dwContainer = dwContainer;
02770 m_fEquippable = fEquippable;
02771 m_fIsStackable = fStackable;
02772 m_fIsSolid = fSolid;
02773 m_fIsOwned = TRUE;
02774
02775 m_bInventorySequence= -1;
02776 m_wPositionSequence = 0;
02777 m_wNumPortals = 0;
02778 m_wNumLogins = 0x3C;
02779 m_fEquipped = 0;
02780 }
02781 cHealingCon( ) {}
02782 virtual ~cHealingCon( ) {}
02783
02784 cMessage CreatePacket();
02785
02786 cMessage CreatePacketContainer ( DWORD Container, DWORD ItemModelID );
02787 cMessage Animation ( WORD wAnim, float flPlaySpeed ) { return *((cMessage *)NULL); }
02788 void Assess ( cClient *pcAssesser );
02789 void Action ( cClient* who );
02790
02791 void SetContainer( DWORD dwGUID );
02792
02793 inline DWORD GetItemModelID ( ) { return m_dwItemModelID; }
02794 inline DWORD GetContainerID ( ) { return m_dwContainer; }
02795 DWORD m_dwItemModelID;
02796
02797 protected:
02798 DWORD m_dwWeight;
02799 DWORD m_dwValue;
02800 WORD m_wUses;
02801 WORD m_wUseLimit;
02802 BOOL m_fIsStackable;
02803 BOOL m_fEquippable;
02804 BOOL m_fIsSolid;
02805
02806 std::string m_strDescription;
02807 };
02808
02809 class cEquipment
02810 {
02811 public:
02812 cArmor* ca_Shield;
02813 cArmor* ca_Helmet;
02814 cArmor* ca_UpperArm;
02815 cArmor* ca_LowerArm;
02816 cArmor* ca_Breastplate;
02817 cArmor* ca_Girth;
02818 cArmor* ca_UpperLegs;
02819 cArmor* ca_LowerLegs;
02820
02821
02822
02823
02824
02825 cWeapon* cw_Weapon;
02826 };
02827
02828 class cInventory
02829 {
02830 public:
02831 std::vector< cObject * > m_vInventoryObjects;
02832 cEquipment *m_cEquipment;
02833 };
02834
02835 #define PK_ALTAR 1
02836 #define NPK_ALTAR 0
02837
02838
02839
02840
02841
02842
02843 class cAltar: public cObject
02844 {
02845 public:
02846 cAltar ();
02852 cAltar (DWORD dwType, DWORD dwGUID, cLocation *pcLoc, char* strName, char* strDesc);
02853
02854
02855
02856
02857
02858
02859
02860
02861 virtual ~cAltar (){}
02862 void Assess (cClient *pcAssesser );
02863 cMessage CreatePacket();
02864 void Action(cClient* who);
02865
02866 void SetMode(DWORD mode)
02867 {
02868 m_dwMode = mode;
02869 }
02870 DWORD GetMode()
02871 {
02872 return m_dwMode;
02873 }
02874 void SetData(WORD wAnimConfig, WORD wSoundSet,WORD wModel,WORD wIcon, DWORD dwObject)
02875 {
02876 m_wAnimConfig = wAnimConfig;
02877 m_wSoundSet = wSoundSet;
02878 m_wModel = wModel;
02879 m_wIcon = wIcon;
02880 }
02881 private:
02882 DWORD m_dwType;
02883 WORD m_wModel;
02884 WORD m_wIcon;
02885 WORD m_wSoundSet;
02886 WORD m_wAnimConfig;
02887 DWORD dwType;
02888 };
02889
02890 #define DOOR_OPEN 1
02891 #define DOOR_CLOSED 0
02892
02893
02894
02895
02896 class cDoor : public cObject
02897 {
02898 friend class cClient;
02899 public:
02900 cDoor ();
02906 cDoor ( WORD type, DWORD dwGUID, cLocation *pcLoc, char *szName, char *szDesc );
02907 virtual ~cDoor ( ) {}
02908
02909 void Assess ( cClient *pcAssesser );
02910 void Action (cClient* who);
02911 cMessage CreatePacket( );
02912
02913 void SetMode(DWORD mode)
02914 {
02915 m_dwMode = mode;
02916 }
02917 DWORD GetMode()
02918 {
02919 return m_dwMode;
02920 }
02921 void SetData(WORD wAnimConfig, WORD wSoundSet,WORD wModel,WORD wIcon)
02922 {
02923 m_wAnimConfig = wAnimConfig;
02924 m_wSoundSet = wSoundSet;
02925 m_wModel = wModel;
02926 m_wIcon = wIcon;
02927 }
02928 private:
02929
02930 DWORD m_dwMode;
02931 DWORD m_dwType;
02932 WORD m_wModel;
02933 WORD m_wIcon;
02934 WORD m_wSoundSet;
02935 WORD m_wPortalMode;
02936 WORD m_wAnimConfig;
02937 };
02938
02939
02940
02941
02942 class cWorldObject : public cObject
02943 {
02944 public:
02945 cWorldObject();
02951 cWorldObject(WORD type, DWORD dwGUID, cLocation *pcLoc, char *szName, char *szDesc);
02952 virtual ~cWorldObject() {}
02953
02954 void Assess (cClient *pcAssesser );
02955 cMessage CreatePacket();
02956 void Action(cClient* who);
02957
02958
02959
02960
02961
02962
02963 void SetObjectType(int ot)
02964 {
02965 iObjectType = ot;
02966 }
02967 int GetObjectType()
02968 {
02969 return iObjectType;
02970 }
02971
02972 void SetData(WORD wModel,WORD wIcon)
02973
02974 {
02975 m_wModel = wModel;
02976 m_wIcon = wIcon;
02977 }
02978 private:
02979 int iObjectType;
02980 DWORD m_dwMode;
02981 DWORD m_dwType;
02982 WORD m_wModel;
02983 WORD m_wIcon;
02984 WORD m_wPortalMode;
02985 };
02986
02987
02988
02989
02990 class cMerchantSign : public cObject
02991 {
02992 public:
02998 cMerchantSign( DWORD dwGUID, cLocation& Loc, DWORD dwModel, float flScale, BOOL fSolid, DWORD dwIcon, std::string strName, std::string strDescription, DWORD dwWeight, DWORD dwValue, BOOL fSelectable = TRUE, BOOL fEquippable = TRUE, BOOL fStackable = FALSE, BOOL fIsOwned = FALSE, DWORD dwContainer = 0 ) : m_dwWOModelID( dwModel )
02999 {
03000 m_dwGUID = dwGUID;
03001 m_dwModel = dwModel;
03002 m_flScale = flScale;
03003 m_wIcon = dwIcon;
03004 m_strName = strName;
03005 m_strDescription = strDescription;
03006 m_fSelectable = fSelectable;
03007 m_dwWeight = dwWeight;
03008 m_dwValue = dwValue;
03009 m_fIsOwned = fIsOwned;
03010 m_dwContainer = dwContainer;
03011 m_fEquippable = fEquippable;
03012 m_fIsStackable = fStackable;
03013 m_fIsSolid = fSolid;
03014
03015
03016
03017
03018 m_bInventorySequence= -1;
03019 m_wPositionSequence = 0;
03020 m_wNumPortals = 0;
03021 m_wNumLogins = 0x3C;
03022 m_fEquipped = 0;
03023
03024 CopyMemory( &m_Location, &Loc, sizeof( cLocation ) );
03025 }
03026 cMerchantSign( ) {}
03027 virtual ~cMerchantSign( ) {}
03028
03029 cMessage CreatePacket ( );
03030 cMessage Animation ( WORD wAnim, float flPlaySpeed ) { return *((cMessage *)NULL); }
03031 void Assess ( cClient *pcAssesser );
03032 void Action ( cClient* who );
03033
03034
03035
03036 inline DWORD GetWorldObject ( ) { return m_dwWOModelID; }
03037
03038 void SetObjectType(int ot)
03039 {
03040 iObjectType = ot;
03041 }
03042 int GetObjectType()
03043 {
03044 return iObjectType;
03045 }
03046
03047 protected:
03048 int iObjectType;
03049 DWORD m_dwWOModelID;
03050 DWORD m_dwWeight;
03051 DWORD m_dwValue;
03052 BOOL m_fIsStackable;
03053 BOOL m_fEquippable;
03054 BOOL m_fIsSolid;
03055
03056 std::string m_strDescription;
03057 };
03058
03059
03060
03061
03062 class cChest : public cObject
03063 {
03064 friend class cClient;
03065 public:
03066 cChest ();
03072 cChest ( WORD type, DWORD dwGUID, cLocation *pcLoc, char *szName, char *szDesc );
03073 virtual ~cChest ( ) {}
03074
03075 void Assess ( cClient *pcAssesser );
03076 void Action (cClient* who);
03077 cMessage CreatePacket( );
03078
03079 void SetMode(DWORD mode)
03080 {
03081 m_dwMode = mode;
03082 }
03083 DWORD GetMode()
03084 {
03085 return m_dwMode;
03086 }
03087
03088
03089 void SetIsLocked(int locked)
03090 {
03091 IsLocked = locked;
03092 }
03093 int GetIsLocked()
03094 {
03095 return IsLocked;
03096 }
03097
03098
03099 void SetLDiff(int ldiff)
03100 {
03101 LockDiff = ldiff;
03102 }
03103 int GetLDiff()
03104 {
03105 return LockDiff;
03106 }
03107
03108 void SetData(WORD wAnimConfig, WORD wSoundSet,WORD wModel,WORD wIcon, DWORD dwObject1, DWORD dwObject2)
03109 {
03110 m_wAnimConfig = wAnimConfig;
03111 m_wSoundSet = wSoundSet;
03112 m_wModel = wModel;
03113 m_wIcon = wIcon;
03114 m_dwObjectsFlag1 = dwObject1;
03115 m_dwObjectsFlag2 = dwObject2;
03116 }
03117 private:
03118
03119 DWORD m_dwMode;
03120 DWORD m_dwType;
03121 WORD m_wModel;
03122 WORD m_wIcon;
03123 WORD m_wSoundSet;
03124 WORD m_wPortalMode;
03125 WORD m_wAnimConfig;
03126 DWORD m_dwObjectsFlag1;
03127 DWORD m_dwObjectsFlag2;
03128 int IsLocked;
03129 int LockDiff;
03130 };
03131
03132
03133
03134
03135 class cCorpse : public cObject
03136 {
03137 friend class cClient;
03138 friend class cMonster;
03139
03140 public:
03141 cCorpse () {};
03147 cCorpse ( WORD type, DWORD dwGUID, cLocation& Loc, char *szName, char *szDesc );
03148 virtual ~cCorpse ( ) {}
03149
03150 void Assess ( cClient *pcAssesser );
03151 void Action (cClient* who);
03152 cMessage CreatePacket ( );
03153
03154
03155 inline DWORD GetCorpseGUID( )
03156 {
03157 return m_dwGUID;
03158 }
03159
03160
03161 inline DWORD GetType()
03162 {
03163 return m_dwType;
03164 }
03165
03166 void SetMode(DWORD mode)
03167 {
03168 m_dwMode = mode;
03169 }
03170 DWORD GetMode()
03171 {
03172 return m_dwMode;
03173 }
03174 void SetData(WORD wAnimConfig, WORD wSoundSet,WORD wModel,WORD wIcon, DWORD MonsterModelID, float flScale)
03175 {
03176 m_wAnimConfig = wAnimConfig;
03177 m_wSoundSet = wSoundSet;
03178 m_wModel = wModel;
03179 m_wIcon = wIcon;
03180 m_MonsterModelID = MonsterModelID;
03181 m_flScale = flScale;
03182 }
03183
03184
03185
03186 inline void AddInventory( cObject *pcObject )
03187 {
03188 m_cor_lstInventory.push_back( pcObject );
03189 pcObject->m_fIsOwned = TRUE;
03190 pcObject->m_dwContainer = m_dwGUID;
03191 }
03192
03193 inline void RemoveInventory( cObject *pcObject )
03194 {
03195 iterObject_lst itObject = std::find( m_cor_lstInventory.begin( ), m_cor_lstInventory.end( ), pcObject );
03196
03197 if ( itObject != m_cor_lstInventory.end( ) )
03198 m_cor_lstInventory.erase( itObject );
03199 pcObject->m_fIsOwned = FALSE;
03200 pcObject->m_dwContainer = NULL;
03201 }
03202
03203 inline cObject *FindInventory( DWORD dwGUID )
03204 {
03205 for ( iterObject_lst itObject = m_cor_lstInventory.begin( ); itObject != m_cor_lstInventory.end( ); ++itObject )
03206 {
03207 if ( dwGUID == (*itObject)->GetGUID( ) )
03208 return *itObject;
03209 }
03210 return NULL;
03211 }
03212
03213 inline void DeleteFromInventory( cObject *pcObject )
03214 {
03215 iterObject_lst itObject = std::find( m_cor_lstInventory.begin( ), m_cor_lstInventory.end( ), pcObject );
03216
03217 if ( itObject != m_cor_lstInventory.end( ) )
03218 m_cor_lstInventory.erase( itObject );
03219 }
03220
03221
03222
03223 private:
03224
03225 DWORD m_dwMode;
03226 DWORD m_dwType;
03227 WORD m_wModel;
03228 WORD m_wIcon;
03229 WORD m_wSoundSet;
03230 WORD m_wPortalMode;
03231 WORD m_wAnimConfig;
03232 DWORD m_MonsterModelID;
03233 float m_flScale;
03234
03235
03236 std::list< cObject * > m_cor_lstInventory;
03237 };
03238
03239
03240
03241
03242 class cCovenant: public cObject
03243 {
03244 friend class cClient;
03245 public:
03246 cCovenant();
03252 cCovenant( WORD type, DWORD dwGUID, DWORD houseID, char *szName, char *szDescription, cLocation *pcLoc = NULL );
03253
03254 void Assess (cClient *pcAssesser );
03255 cMessage CreatePacket( );
03256 void Action(cClient* who);
03257
03258 virtual ~cCovenant( ) {}
03259
03260 void SetMode(DWORD mode)
03261 {
03262 m_dwMode = mode;
03263 }
03264 void SetGUID(DWORD GUID)
03265 {
03266 m_dwGUID = GUID;
03267 }
03268 void SetOwner(DWORD ownerID)
03269 {
03270 m_dwOwnerID = ownerID;
03271 }
03272 void SetData(DWORD wAnimConfig,WORD wModel,WORD wIcon)
03273 {
03274 m_wAnimConfig = wAnimConfig;
03275 m_wModel = wModel;
03276 m_wIcon = wIcon;
03277 }
03278
03279 private:
03280 DWORD m_dwType;
03281 DWORD m_dwHouseID;
03282 WORD m_wModel;
03283 WORD m_wIcon;
03284 WORD m_wAnimConfig;
03285 DWORD m_dwHouseType;
03286 };
03287
03288 #define HOUSE_FORSALE 1
03289 #define HOUSE_OWNED 2
03290 #define HOUSE_OPEN 3
03291 #define HOUSE_CLOSED 4
03292
03293
03294
03295
03296 class cHouse : public cObject
03297 {
03298 friend class cClient;
03299
03300 public:
03301 cHouse();
03307 cHouse( char *szName, char *szDescription, WORD type, DWORD GUID, cLocation *pcLoc = NULL );
03308 virtual ~cHouse( ) {}
03309
03310 void cHouse::Assess ( cClient *pcAssesser );
03311 cMessage cHouse::CreatePacket();
03312 void cHouse::Action(cClient* who);
03313
03314 void SetGUID(DWORD GUID)
03315 {
03316 m_dwGUID = GUID;
03317 }
03318 void SetOwner(DWORD ownerID)
03319 {
03320 m_dwOwnerID = ownerID;
03321 }
03322 void SetData(WORD wModel,WORD wIcon)
03323 {
03324 m_wModel = wModel;
03325 m_wIcon = wIcon;
03326 }
03327 void SetIsOpen(DWORD open)
03328 {
03329 IsOpen = open;
03330 }
03331
03332 private:
03333 WORD m_wModel;
03334 WORD m_wIcon;
03335 DWORD IsOpen;
03336
03337 };
03338
03339
03340
03341
03342 class cHooks: public cObject
03343 {
03344 friend class cClient;
03345 public:
03346 cHooks();
03352 cHooks( WORD type, DWORD dwGUID, DWORD houseID, char *szName, char *szDescription, cLocation *pcLoc = NULL );
03353
03354 void Assess (cClient *pcAssesser );
03355 cMessage CreatePacket( );
03356 void Action(cClient* who);
03357
03358 virtual ~cHooks( ) {}
03359
03360 void SetMode(DWORD mode)
03361 {
03362 m_dwMode = mode;
03363 }
03364 void SetGUID(DWORD GUID)
03365 {
03366 m_dwGUID = GUID;
03367 }
03368
03369 void Set_hook_id(int hookid)
03370 {
03371 hook_id = hookid;
03372 }
03373 int Get_hook_id()
03374 {
03375 return hook_id;
03376 }
03377
03378
03379
03380
03381
03382
03383
03384
03385
03386
03387
03388
03389
03390
03391
03392
03393
03394
03395
03396
03397
03398
03399
03400
03401 void SetData(WORD wAnimConfig,WORD wSoundSet,WORD wModel,WORD wIcon)
03402 {
03403 m_wAnimConfig = wAnimConfig;
03404 m_wSoundSet = wSoundSet;
03405 m_wModel = wModel;
03406 m_wIcon = wIcon;
03407 }
03408
03409 DWORD v_guids[255];
03410 DWORD m_dwHouseID;
03411
03412 private:
03413 int IsUsed;
03414 DWORD m_dwType;
03415 WORD m_wModel;
03416 WORD m_wIcon;
03417 WORD m_wSoundSet;
03418 WORD m_wAnimConfig;
03419 int hook_id;
03420
03421
03422
03423 };
03424
03425
03426
03427
03428 class cStorage: public cObject
03429 {
03430 friend class cClient;
03431 public:
03432 cStorage();
03438 cStorage( WORD type, DWORD dwGUID, DWORD houseID, char *szName, char *szDescription, cLocation *pcLoc = NULL );
03439
03440 void Assess (cClient *pcAssesser );
03441 cMessage CreatePacket( );
03442 void Action(cClient* who);
03443
03444 virtual ~cStorage( ) {}
03445
03446 void SetMode(DWORD mode)
03447 {
03448 m_dwMode = mode;
03449 }
03450 DWORD GetMode()
03451 {
03452 return m_dwMode;
03453 }
03454 void SetGUID(DWORD GUID)
03455 {
03456 m_dwGUID = GUID;
03457 }
03458 void SetData(WORD wAnimConfig,WORD wSoundSet,WORD wModel,WORD wIcon)
03459 {
03460 m_wAnimConfig = wAnimConfig;
03461 m_wSoundSet = wSoundSet;
03462 m_wModel = wModel;
03463 m_wIcon = wIcon;
03464 }
03465 DWORD m_dwHouseID;
03466
03467 private:
03468 DWORD m_dwType;
03469 WORD m_wModel;
03470 WORD m_wIcon;
03471 WORD m_wSoundSet;
03472 WORD m_wPortalMode;
03473 WORD m_wAnimConfig;
03474 };
03475
03476
03477
03478
03479 class cWarSpell : public cObject
03480 {
03481 friend class cClient;
03482
03483 public:
03484
03490 cWarSpell(DWORD dwGUID, DWORD dwSpellID, cLocation& Loc, cVelocity tarVel, DWORD dwSpellModel)
03491 {
03492 m_wPositionSequence = 0;
03493 m_wNumPortals = 0;
03494 m_wNumLogins = 0x1;
03495 m_fStatic = FALSE;
03496 SetLocation(Loc);
03497 m_dwGUID = dwGUID;
03498 m_dwSpellModel = dwSpellModel;
03499 m_dwSpellID = dwSpellID;
03500 m_strName = "War Spell";
03501 m_Velocity = tarVel;
03502 m_Location.m_flX += tarVel.m_dx;
03503 m_Location.m_flY += tarVel.m_dy;
03504 m_Location.m_flZ += 1.4f + tarVel.m_dz;
03505
03506 };
03507 virtual ~cWarSpell(){};
03508
03509 cMessage cWarSpell::CreatePacket();
03510 void cWarSpell::Assess (cClient *pcAssesser );
03511 void cWarSpell::Action(cClient* who);
03512 static int cWarSpell::Move( LPVOID wp, LPVOID lp );
03513 cMessage cWarSpell::WarParticle(cWarSpell* pcWarSpell,DWORD dwEffect,float flSpeed);
03514 cMessage cWarSpell::SpellAnim(cWarSpell* pcWarSpell,WORD wWarAnim,WORD wWarAnim2);
03515 cMessage cWarSpell::SetPosition();
03516 cMessage cWarSpell::SpellImpact(cWarSpell* pcWarSpell,DWORD dwEffect,float flSpeed);
03517 cMessage cWarSpell::SpellVis(cWarSpell* pcWarSpell);
03518 };
03519
03520
03521
03522
03523 class cMonster : public cObject
03524 {
03525 friend class cClient;
03526 friend class SimpleAI;
03527
03528 public:
03529
03535 cMonster ( DWORD dwGUID, DWORD dwMonsterID, cLocation *pcLoc, char *szName, char *szDesc, cMonStats *pcmsStats, DWORD dwRespawn, DWORD dwDecay, DWORD dwChase, DWORD dwInfluence, DWORD dwExp_Value, DWORD dwHealth, DWORD dwStamina, DWORD dwMana );
03536 virtual ~cMonster ( ) {}
03537
03538 void Assess ( cClient *pcAssesser );
03539 void Action ( cClient* who );
03540 void Attack ( cClient* who, float flDamageSlider, DWORD F7B0Sequence );
03541 void SpellAttack ( cClient* who, cWarSpell *pcWarSpell, DWORD F7B0Sequence );
03542 static int DeathAnimation ( LPVOID wp, LPVOID lp );
03543 cMessage CreatePacket ( );
03544 cMessage Animation ( WORD wAnim, float flPlaySpeed = 1.0f );
03545 cMessage DoDamageMessage ( DWORD F7B0seq, std::string target, DWORD damagetype, double severity, DWORD amount );
03546 cMessage RecieveDamageMessage ( DWORD F7B0seq, std::string giver, DWORD damagetype, double severity, DWORD amount, DWORD location );
03547 cMessage DecrementHealth ( DWORD dwGUID, WORD amount, signed int &newhealth );
03548 cMessage SetHealth ( DWORD dwNewHealth );
03549 cMessage AdjustBar ( DWORD dwGUID, DWORD F7B0Sequence );
03550 cMessage ChangeCombatMode ( bool fMode );
03551 cMessage CombatAnimation ( DWORD dwTarget, WORD wAttackAnim );
03552 cMessage TurnToTarget ( float flHeading, DWORD dwTargetGUID );
03553 cMessage MoveToTarget ( cClient *pcWho );
03554 cMessage MoveTarget ( cClient *pcWho );
03555 cMessage ReturnToSpawn ( );
03556 void ReSpawn ( cObject *pcObject );
03557 void RemoveMonster ( cObject *pcObject );
03558 void MonsterCorpse ( );
03559 cMessage SetPosition ( );
03560 inline DWORD GetMonsterModelID ( ) { return m_dwMonsterModelID; }
03561 inline WORD GetTotalHealth ( ) { return m_dwCurrenthealth; }
03562
03563 DWORD m_dwMonsterModelID;
03564
03565 WORD m_wNumMovements;
03566 WORD m_wNumAnimInteracts;
03567 WORD m_wNumBubbleModes;
03568 WORD m_wNumJumps;
03569 WORD m_wNumPortals;
03570 WORD m_wAnimCount;
03571 WORD m_wNumOverrides;
03572 WORD m_wNumLogins;
03573
03574 DWORD m_dwLevel;
03575 DWORD m_dwCurrenthealth;
03576 DWORD m_dwMaxHealth;
03577 DWORD m_dwStr;
03578 DWORD m_dwEnd;
03579 DWORD m_dwQuick;
03580 DWORD m_dwCoord;
03581 DWORD m_dwFocus;
03582 DWORD m_dwSelf;
03583 DWORD m_dwCurrentStamina;
03584 DWORD m_dwCurrentMana;
03585 DWORD m_dwMaxStamina;
03586 DWORD m_dwMaxMana;
03587 DWORD m_dwSpecies;
03588 WORD m_wCurAnim;
03589 WORD m_wMeleeSequence;
03590 DWORD m_dwF7B0Sequence;
03591 BYTE m_bStatSequence;
03592
03593 DWORD m_dwUnknownCount;
03594 BYTE m_bInitialAnimation[200];
03595 BYTE m_bCombatMode;
03596 cLocation m_TargetLocation;
03597 int m_iPosUpdateCount;
03598 bool m_fHasTarget;
03599 DWORD m_dwTargetGUID;
03600 };
03601
03602 #endif // #ifndef __OBJECT_H