Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.00 KB | None | 0 0
  1. /*////////////////////////////////////////////////////////////////////////////
  2.  
  3. This file is part of the G2Ext SDK headers.
  4.  
  5. //////////////////////////////////////////////////////////////////////////////
  6.  
  7. The G2Ext SDK headers
  8.  
  9. Copyright © 2009, 2010 by Paindevs and Patrick Vogel
  10.  
  11. All Rights reserved.
  12.  
  13. THE WORK (AS DEFINED BELOW) IS PROVIDED
  14. UNDER THE TERMS OF THIS CREATIVE COMMONS
  15. PUBLIC LICENSE ("CCPL" OR "LICENSE").
  16. THE WORK IS PROTECTED BY COPYRIGHT AND/OR
  17. OTHER APPLICABLE LAW. ANY USE OF THE WORK
  18. OTHER THAN AS AUTHORIZED UNDER THIS LICENSE
  19. OR COPYRIGHT LAW IS PROHIBITED.
  20.  
  21. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED
  22. HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE
  23. TERMS OF THIS LICENSE. TO THE EXTENT THIS
  24. LICENSE MAY BE CONSIDERED TO BE A CONTRACT,
  25. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED
  26. HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF
  27. SUCH TERMS AND CONDITIONS.
  28.  
  29. Full license at http://creativecommons.org/licenses/by-nc/3.0/legalcode
  30.  
  31. /////////////////////////////////////////////////////////////////////////////*/
  32.  
  33. #ifndef __API_G2_OCNPC_H__
  34. #define __API_G2_OCNPC_H__
  35.  
  36. #ifndef __G2EXT_API_HEADER
  37. #define __G2EXT_API_HEADER
  38. #endif //__G2EXT_API_HEADER
  39.  
  40. #ifdef _G2EXT_COMPILE_SPACER
  41. #error Cannot use gothic headers on spacer dll (_G2EXT_COMPILE_SPACER defined)
  42. #endif
  43.  
  44. #include "api/g2/ztypes.h"
  45. #include "api/g2/zstring.h"
  46.  
  47. #include "api/g2/zcobject.h"
  48. #include "api/g2/ocvob.h"
  49. #include "api/g2/ocitem.h"
  50. #include "api/g2/ocnpcinventory.h"
  51.  
  52. class oCAskBox;
  53. class oCInfo;
  54. class oCMission;
  55. class oCNews;
  56. class oCNpc;
  57. class oCNpcMessage;
  58. class oCNpcTalent;
  59. class oCNpcTimedOverlay;
  60. class oCRtnEntry;
  61. class oCSpell;
  62. class oCVisualFX;
  63. class TNpcSlot;
  64. class zCPlayerGroup;
  65. class zCRoute;
  66. class zCParticleFX;
  67. class zTSoundHandle;
  68. class oTDirectionInfo;
  69. class zCModel;
  70.  
  71. enum oCNpc_Attribute
  72. {
  73. NPC_ATR_HITPOINTS,
  74. NPC_ATR_HITPOINTS_MAX,
  75. NPC_ATR_MANA,
  76. NPC_ATR_MANA_MAX,
  77. NPC_ATR_STRENGTH,
  78. NPC_ATR_DEXTERITY,
  79. NPC_ATR_REGENERATEHP,
  80. NPC_ATR_REGENERATEMANA,
  81. NPC_ATR_MAX
  82. };
  83.  
  84. enum oCNpc_Hitchance
  85. {
  86. NPC_HITCHANCE_1H,
  87. NPC_HITCHANCE_2H,
  88. NPC_HITCHANCE_BOW,
  89. NPC_HITCHANCE_CROSSBOW,
  90. NPC_HITCHANCE_MAX
  91. };
  92.  
  93. enum oCNpc_Attitude
  94. {
  95. NPC_ATTITUDE_HOSTILE,
  96. NPC_ATTITUDE_ANGRY,
  97. NPC_ATTITUDE_NEUTRAL,
  98. NPC_ATTITUDE_FRIENDLY
  99. };
  100.  
  101. enum oCNpc_WeaponMode
  102. {
  103. NPC_WEAPON_NONE = 0,
  104. NPC_WEAPON_FIST = 1,
  105. NPC_WEAPON_DAG = 2,
  106. NPC_WEAPON_1HS = 3,
  107. NPC_WEAPON_2HS = 4,
  108. NPC_WEAPON_BOW = 5,
  109. NPC_WEAPON_CBOW = 6,
  110. NPC_WEAPON_MAG = 7,
  111. NPC_WEAPON_MAX = 8
  112. };
  113.  
  114. /** Insert description */
  115. class oCMag_Book
  116. {
  117. private:
  118. char _data[64];
  119. public:
  120. //.text:004767A0 ; public: void __thiscall oCMag_Book::Spell_Cast(void)
  121. /** Insert description.
  122. * @usable Ingame only
  123. */
  124. void Spell_Cast(void)
  125. {
  126. XCALL(0x004767A0);
  127. };
  128. };
  129.  
  130. /** Insert description */
  131. class oCNewsMemory
  132. {
  133. protected:
  134. int knownNews_vtbl;
  135. public:
  136. zCList <oCNews> iknow;
  137. };
  138.  
  139. /** Insert description */
  140. struct TNpcAIState
  141. {
  142. int index; // 0x05A4 int
  143. int loop; // 0x05A8 int
  144. int end; // 0x05AC int
  145. int timeBehaviour; // 0x05B0 int
  146. float restTime; // 0x05B4 zREAL
  147. int phase; // 0x05B8 int
  148. zBOOL valid; // 0x05BC zBOOL
  149. zSTRING name; // 0x05C0 zSTRING
  150. float stateTime; // 0x05D4 zREAL
  151. int prgIndex; // 0x05D8 int
  152. zBOOL isRtnState; // 0x05DC zBOOL
  153. };
  154.  
  155. /** Insert description */
  156. struct oCNpc_States
  157. {
  158. public:
  159. int state_vtbl; // 0x0588
  160. zSTRING state_name; // 0x058C zSTRING
  161. oCNpc* state_npc; // 0x05A0 oCNpc*
  162. TNpcAIState current_state;
  163. TNpcAIState next_state;
  164. int lastAIState; // 0x061C int
  165. zBOOL hasRoutine; // 0x0620 zBOOL
  166. zBOOL rtnChanged; // 0x0624 zBOOL
  167. int rtnBefore; // 0x0628 oCRtnEntry*
  168. int rtnNow; // 0x062C oCRtnEntry*
  169. zCRoute* rtnRoute; // 0x0630 zCRoute*
  170. zBOOL rtnOverlay; // 0x0634 zBOOL
  171. int rtnOverlayCount; // 0x0638 int
  172. int walkmode_routine; // 0x063C int
  173. zBOOL weaponmode_routine; // 0x0640 zBOOL
  174. zBOOL startNewRoutine; // 0x0644 zBOOL
  175. int aiStateDriven; // 0x0648 int
  176. zVEC3 aiStatePosition; // 0x064C zVEC3
  177. oCNpc* parOther; // 0x0658 oCNpc*
  178. oCNpc* parVictim; // 0x065C oCNpc*
  179. oCItem* parItem; // 0x0660 oCItem*
  180. int rntChangeCount; // 0x0664 int
  181. };
  182.  
  183. /** Insert description */
  184. struct oSDamageDescriptor
  185. {
  186. int dwFieldsValid;
  187. zCVob* pVobAttacker;
  188. oCNpc* pNpcAttacker;
  189. zCVob* pVobHit;
  190. oCVisualFX* pFXHit;
  191. oCItem* pItemWeapon;
  192. zUINT32 nSpellID;
  193. zUINT32 nSpellCat;
  194. zUINT32 nSpellLevel;
  195. int enuModeDamage;
  196. int enuModeWeapon;
  197. zUINT32 aryDamage[8];
  198. zREAL fDamageTotal;
  199. zREAL fDamageMultiplier;
  200. zVEC3 vecLocationHit;
  201. zVEC3 vecDirectionFly;
  202. zSTRING strVisualFX;
  203. zREAL fTimeDuration;
  204. zREAL fTimeInterval;
  205. zREAL fDamagePerInterval;
  206. zBOOL bDamageDontKill;
  207.  
  208. struct
  209. {
  210. zUINT32 bOnce : 1;
  211. zUINT32 bFinished : 1;
  212. zUINT32 bIsDead : 1;
  213. zUINT32 bIsUnconscious : 1;
  214. zUINT32 lReserved : 28;
  215. };
  216.  
  217. zREAL fAzimuth;
  218. zREAL fElevation;
  219. zREAL fTimeCurrent;
  220. zREAL fDamageReal;
  221. zREAL fDamageEffective;
  222. zUINT32 aryDamageEffective[8];
  223. zCVob* pVobParticleFX;
  224. zCParticleFX* pParticleFX;
  225. oCVisualFX* pVisualFX;
  226. };
  227.  
  228. /** Insert description */
  229. class oTRobustTrace
  230. {
  231. protected:
  232. int _bitfield; // 0x04C4 oCNpc_oTRobustTrace_bitfield_Xxx
  233. public:
  234. zVEC3 targetPos; // 0x04C8 zVEC3
  235. zCVob* targetVob; // 0x04D4 zCVob*
  236. zCVob* obstVob; // 0x04D8 zCVob*
  237. float targetDist; // 0x04DC zREAL
  238. float lastTargetDist; // 0x04E0 zREAL
  239. float maxTargetDist; // 0x04E4 zREAL
  240. float dirTurn; // 0x04E8 zREAL
  241. float timer; // 0x04EC zREAL
  242. zVEC3 dirFirst; // 0x04F0 zVEC3
  243. float dirLastAngle; // 0x04FC zREAL
  244. zCArray<oTDirectionInfo*> lastDirections;
  245. int frameCtr; // 0x050C int
  246. zVEC3 targetPosArray[5]; // 0x0510 zVEC3[5]
  247. int targetPosCounter; // 0x054C int
  248. int targetPosIndex; // 0x0550 int
  249. float checkVisibilityTime; // 0x0554 zREAL
  250. float positionUpdateTime; // 0x0558 zREAL
  251. float failurePossibility; // 0x055C zREAL
  252. };
  253.  
  254. /** Insert description */
  255. class oCMagFrontier
  256. {
  257. public:
  258. oCVisualFX* warningFX;
  259. oCVisualFX* shootFX;
  260. oCNpc* npc;
  261. protected:
  262. int _bitfield;
  263. };
  264.  
  265. /** Gothic's NPC class. */
  266. class oCNpc : public oCVob
  267. {
  268. public:
  269. int idx;
  270. zSTRING name[5];
  271. zSTRING slot; // 0x0188 zSTRING
  272. zSTRING effect; // 0x019C zSTRING
  273. int npcType; // 0x01B0 int
  274. int variousFlags; // 0x01B4 int
  275. int attribute[8]; // 0x01B8 int[NPC_ATR_MAX]
  276. int hitChance[5]; // 0x01D8 int[NPC_HITCHANCE_MAX]
  277. int protection[8]; // 0x01EC int[oEDamageIndex_MAX]
  278. int damage[8]; // 0x020C int[oEDamageIndex_MAX]
  279. int damagetype; // 0x022C int
  280. int guild; // 0x0230 int
  281. int level; // 0x0234 int
  282. int mission[5]; // 0x0238 int[NPC_MIS_MAX]
  283. int fighttactic; // 0x024C int
  284. int fmode; // 0x0250 int
  285. int voice; // 0x0254 int
  286. int voicePitch; // 0x0258 int
  287. int mass; // 0x025C int
  288. int daily_routine; // 0x0260 int
  289. int startAIState; // 0x0264 int
  290. zSTRING spawnPoint; // 0x0268 zSTRING
  291. int spawnDelay; // 0x027C int
  292. int senses; // 0x0280 int
  293. int senses_range; // 0x0284 int
  294. int aiscripts[200]; // 0x0288 int[100]
  295. zSTRING wpname; // 0x0418 zSTRING
  296. zUINT32 experience_points; // 0x042C zUINT32
  297. zUINT32 experience_points_next_level; // 0x0430 zUINT32
  298. zUINT32 learn_points; // 0x0434 zUINT32
  299. int bodyStateInterruptableOverride; // 0x0438 int
  300. int noFocus; // 0x043C zBOOL
  301. int parserEnd; // 0x0440 int
  302.  
  303. int bloodEnabled; // 0x0444 int
  304. int bloodDistance; // 0x0448 int
  305. int bloodAmount; // 0x044C int
  306. int bloodFlow; // 0x0450 int
  307. zSTRING bloodEmitter; // 0x0454 zSTRING
  308. zSTRING bloodTexture; // 0x0468 zSTRING
  309. int didHit; // 0x047C zBOOL
  310. int didParade; // 0x0480 zBOOL
  311. int didShoot; // 0x0484 zBOOL
  312. int hasLockedEnemy; // 0x0488 zBOOL
  313. zBOOL isDefending; // 0x048C zBOOL
  314. zBOOL wasAiming; // 0x0490 zBOOL
  315. int lastAction; // 0x0494 oCNpc::TFAction
  316. oCNpc* enemy; // 0x0498 oCNpc*
  317. int speedTurn; // 0x049C zREAL
  318. int foundFleePoint; // 0x04A0 zBOOL
  319. int reachedFleePoint; // 0x04A4 zBOOL
  320. zVEC3 vecFlee; // 0x04A8 zVEC3
  321. zVEC3 posFlee; // 0x04B4 zVEC3
  322. void* waypointFlee; // 0x04C0 zCWaypoint*
  323. oTRobustTrace rbt;
  324. zCList<oCNpcTimedOverlay> timedOverlays;
  325. zCArray<oCNpcTalent*> talents;
  326. int spellMana; // 0x0574 int
  327. oCMagFrontier magFrontier;
  328. oCNpc_States state;
  329. oCNpcInventory inventory2;
  330. oCItemContainer* trader; // 0x0734 oCItemContainer*
  331. oCNpc* tradeNpc; // 0x0738 oCNpc*
  332. float rangeToPlayer; // 0x073C zREAL
  333. //zCArray<zTSoundHandle> listOfVoiceHandles;
  334. char x[20];
  335. int voiceIndex; // 0x074C int
  336. zCArray<oCVisualFX*> effectList;
  337. int bitfield[5]; // 0x075C oCNpc_bitfieldX_Xxx
  338. int instanz; // 0x0770 int
  339. zSTRING mds_name; // 0x0774 zSTRING
  340. zSTRING body_visualName; // 0x0788 zSTRING
  341. zSTRING head_visualName; // 0x079C zSTRING
  342. zVEC3 model_scale; // 0x07B0 VEC3
  343. float model_fatness; // 0x07BC zREAL
  344. int namenr; // 0x07C0 int
  345. float hpHeal; // 0x07C4 zREAL
  346. float manaHeal; // 0x07C8 zREAL
  347. float swimtime; // 0x07CC zREAL
  348. float divetime; // 0x07D0 zREAL
  349. float divectr; // 0x07D4 zREAL
  350. zCVob* fireVob; // 0x07D8 zCVob*
  351. int fireDamage; // 0x07DC int
  352. float fireDamageTimer; // 0x07E0 zREAL
  353. int attitude; // 0x07E4 int
  354. int tmp_attitude; // 0x07E8 int
  355. float attTimer; // 0x07EC zREAL
  356. int knowsPlayer; // 0x07F0 int
  357. int percList[66]; // 0x07F4 TNpcPerc[NPC_PERC_MAX] { int percID; int percFunc }
  358. int percActive; // 0x08FC int
  359. float percActiveTime; // 0x0900 zREAL
  360. float percActiveDelta; // 0x0904 zREAL
  361. zBOOL overrideFallDownHeight; // 0x0908 zBOOL
  362. float fallDownHeight; // 0x090C zREAL
  363. int fallDownDamage; // 0x0910 int
  364. oCMag_Book* mag_book; // 0x0914 oCMag_Book*
  365. zCList<oCSpell> activeSpells;
  366. int lastHitSpellID; // 0x0920 int
  367. int lastHitSpellCat; // 0x0924 int
  368. zCArray<zSTRING> activeOverlays;
  369. int askbox; // 0x0934 oCAskBox*
  370. int askYes; // 0x0938 int
  371. int askNo; // 0x093C int
  372. float canTalk; // 0x0940 zREAL
  373. oCNpc* talkOther; // 0x0944 oCNpc*
  374. oCInfo* info; // 0x0948 oCInfo*
  375. oCNews* news; // 0x094C oCNews*
  376. int curMission; // 0x0950 oCMission*
  377. oCNewsMemory knownNews;
  378. zCVob* carry_vob; // 0x0960 zCVob*
  379. int interactMob; // 0x0964 oCMobInter*
  380. oCItem* interactItem; // 0x0968 oCItem*
  381. int interactItemCurrentState; // 0x096C int
  382. int interactItemTargetState; // 0x0970 int
  383. int script_aiprio; // 0x0974 int
  384. int old_script_state; // 0x0978 int
  385. int human_ai; // 0x097C oCAIHuman*
  386. int anictrl; // 0x0980 oCAniCtrl_Human*
  387. int route; // 0x0984 zCRoute*
  388. float damageMul; // 0x0988 zREAL
  389. oCNpcMessage* csg; // 0x098C oCNpcMessage*
  390. oCNpcMessage* lastLookMsg; // 0x0990 oCNpcMessage*
  391. oCNpcMessage* lastPointMsg; // 0x0994 oCNpcMessage*
  392. zCArray<zCVob*> vobList;
  393. float vobcheck_time; // 0x09A4 zREAL
  394. float pickvobdelay; // 0x09A8 zREAL
  395. zCVob* focus_vob; // 0x09AC zCVob*
  396. zCArray<TNpcSlot*> invSlot;
  397. zCArray<TNpcSlot*> tmpSlotList;
  398. float fadeAwayTime; // 0x09C8 zREAL
  399. float respawnTime; // 0x09CC zREAL
  400. float selfDist; // 0x09D0 zREAL
  401. int fightRangeBase; // 0x09D4 int
  402. int fightRangeFist; // 0x09D8 int
  403. int fightRangeG; // 0x09DC int
  404. float fight_waitTime; // 0x09E0 zREAL
  405. int fight_waitForAniEnd; // 0x09E4 zTModelAniID
  406. float fight_lastStrafeFrame; // 0x09E8 zREAL
  407. int soundType; // 0x09EC int
  408. zCVob* soundVob; // 0x09F0 zCVob*
  409. zVEC3 soundPosition; // 0x09F4 zVEC3
  410. zCPlayerGroup* playerGroup; // 0x0A00 zCPlayerGroup*
  411.  
  412. public:
  413. //.text:00736720 ; public: void __thiscall oCNpc::CompleteHeal(void)
  414. /** This method heals the NPC completely.
  415. * @usable Ingame only
  416. */
  417. void CompleteHeal(void)
  418. {
  419. XCALL(0x00736720)
  420. };
  421.  
  422. //.text:00736760 ; public: virtual void __thiscall oCNpc:::DoDie(oCNpc*)
  423. /** This method kills a NPC.
  424. * @param Murderer Murderer of the victim (NULL determines, that there is no murderer)
  425. * @usable Ingame only
  426. */
  427. void DoDie(oCNpc* Murderer = NULL)
  428. {
  429. XCALL(0x00736760)
  430. };
  431.  
  432. //.text:0072FF20 ; public: int __thiscall oCNpc::GetAttribute(int)
  433. /** This method returns the value of a selected attribute.
  434. * @param Index Attribute array index
  435. * @returns Value of selected attribute
  436. * @usable Ingame only
  437. */
  438. int GetAttribute(zINT Index)
  439. {
  440. XCALL(0x0072FF20);
  441. };
  442.  
  443. //.text:0072FAB0 ; public: int __thiscall oCNpc::GetAttitude(class oCNpc *)
  444. /** This method returns the attitude towards another NPC
  445. * @returns NPC attitude towards "other" NPC
  446. * @usable Ingame only
  447. */
  448. oCNpc_Attitude GetAttitude(oCNpc* other)
  449. {
  450. XCALL(0x0072FAB0);
  451. };
  452.  
  453. //.text:00749180 ; public: class oCItem * __thiscall oCNpc::GetFromInv(int, int)
  454. /** This method retrieves an Item from the NPCs inventory.
  455. * @param p1 Unknown
  456. * @param p2 Unknown
  457. * @usable Ingame only
  458. */
  459. oCItem* GetFromInv(zINT p1, zINT p2)
  460. {
  461. XCALL(0x00749180);
  462. };
  463.  
  464. //.text:00730750 ; public: int __thiscall oCNpc::GetGuild(void)
  465. /** This method returns the guild of the NPC.
  466. * @returns Current guild's ID
  467. * @usable Ingame only
  468. */
  469. zINT GetGuild(void)
  470. {
  471. XCALL(0x00730750)
  472. };
  473.  
  474. //.text:0072F690 ; public: class zSTRING __thiscall oCNpc::GetGuildName(void)
  475. /** This method returns the guild name of the NPC.
  476. * @returns Current guild's name
  477. * @usable Ingame only
  478. */
  479. zSTRING GetGuildName(void)
  480. {
  481. XCALL(0x0072F690)
  482. };
  483.  
  484. //.text:0072E380 ; public: virtual int __thiscall oCNpc::GetInstance(void)
  485. /** This method returns the internal instance ID of the NPC (important to spawn other NPCs of this type per oCObjectFactory).
  486. * @usable Ingame only
  487. */
  488. zINT GetInstance(void)
  489. {
  490. XCALL(0x0072E380)
  491. };
  492.  
  493. //.text:00739A30 ; public: int __thiscall oCNpc::GetNextWeaponMode(int, int, int)
  494. /** Insert description.
  495. * @usable Ingame only
  496. */
  497. int GetNextWeaponMode(int, int, int)
  498. {
  499. XCALL(0x00739A30)
  500. };
  501.  
  502. //.text:00736740 ; public: int __thiscall oCNpc::IsDead(void)
  503. /** This method returns whether the NPC is dead or not.
  504. * @returns Whether NPC is dead or not.
  505. * @usable Ingame only
  506. */
  507. zINT IsDead(void)
  508. {
  509. XCALL(0x00736740)
  510. };
  511.  
  512. //.text:00736750 ; public: int __thiscall oCNpc::IsUnconscious(void)
  513. /** This method returns whether the NPC is unconscious or not.
  514. * @returns Whether NPC is dead or not.
  515. * @usable Ingame only
  516. */
  517. zINT IsUnconscious(void)
  518. {
  519. XCALL(0x00736750)
  520. };
  521.  
  522. //.text:00762250 ; public: void __thiscall oCNpc::OpenInventory(int)
  523. /** This method opens the players inventory.
  524. * @param p1 Unknown
  525. * @usable Ingame only
  526. */
  527. void OpenScreen_Status(zINT p1)
  528. {
  529. XCALL(0x00762250);
  530. };
  531.  
  532. //.text:0073D8D0 ; public: void __thiscall oCNpc::OpenScreen_Map(int)
  533. /** This method opens the map screen.
  534. * @param p1 Unknown
  535. * @usable Ingame only
  536. */
  537. void OpenScreen_Map(zINT p1)
  538. {
  539. XCALL(0x0073D8D0);
  540. };
  541.  
  542. //.text:0073D980 ; public: void __thiscall oCNpc::OpenScreen_Status(void)
  543. /** This method opens the status screen.
  544. * @usable Ingame only
  545. */
  546. void OpenScreen_Status(void)
  547. {
  548. XCALL(0x0073D980)
  549. };
  550.  
  551. //.text:007380B0 ; public: void __thiscall oCNpc::SetMovLock(int)
  552. /** Insert description.
  553. * @param enabled Determines whether NPC is move locked or not.
  554. * @usable Ingame only
  555. */
  556. void SetMovLock(zINT enabled)
  557. {
  558. XCALL(0x007380B0);
  559. };
  560.  
  561. //.text:0072FFF0 ; public: void __thiscall oCNpc::SetAttribute(int, int)
  562. /** This method sets the value of a selected attribute.
  563. * @param Index Attribute index.
  564. * @param Value The value... what else?
  565. * @usable Ingame only
  566. */
  567. void SetAttribute(zINT Index, zINT Value)
  568. {
  569. XCALL(0x0072FFF0);
  570. };
  571.  
  572. //.text:00730760 ; public: void __thiscall oCNpc::SetGuild(int)
  573. /** This method sets the NPCs guild.
  574. * @param GuildId Id of the guild
  575. * @usable Ingame only
  576. */
  577. void SetGuild(zINT GuildId)
  578. {
  579. XCALL(0x00730760);
  580. };
  581.  
  582. //.text:00738C40 ; public: int __thiscall oCNpc::GetWeaponMode(void)
  583. /** Gets the current NPCs weapon mode (mainly intended for hero)
  584. * @returns Current weapon mode
  585. * @usable Ingame only
  586. */
  587. oCNpc_WeaponMode GetWeaponMode()
  588. {
  589. XCALL(0x00738C40);
  590. };
  591.  
  592. //.text:00738C60 ; public: void __thiscall oCNpc::SetWeaponMode2(class zSTRING const &)
  593. /** Sets the current NPCs weapon mode (seemingly intended for daedalus - use SetWeaponMode instead if possible)
  594. * @param wm Weapon mode to set
  595. * @usable Ingame only
  596. */
  597. void SetWeaponMode2(const zSTRING& wm)
  598. {
  599. XCALL(0x00738C60);
  600. };
  601.  
  602. //.text:00738E80 ; public: virtual void __thiscall oCNpc::SetWeaponMode2(int)
  603. /** Sets the current NPCs weapon mode (seemingly intended for daedalus - use SetWeaponMode instead if possible)
  604. * @param wm Weapon mode to set
  605. * @usable Ingame only
  606. */
  607. void SetWeaponMode2(oCNpc_WeaponMode wm)
  608. {
  609. XCALL(0x00738E80);
  610. };
  611.  
  612. //.text:00739940 ; public: virtual void __thiscall oCNpc::SetWeaponMode(int)
  613. /** Sets the current NPCs weapon mode (mainly intended for hero)
  614. * @param wm Weapon mode to set
  615. * @usable Ingame only
  616. */
  617. void SetWeaponMode(oCNpc_WeaponMode wm)
  618. {
  619. XCALL(0x00739940);
  620. };
  621.  
  622. /** This member function returns the focus Vob.
  623. * @return pointer with focus Vob.
  624. * @usable Ingame only
  625. */
  626. zCVob* GetFocusVob(void)
  627. {
  628. XCALL(0x00732BB0);
  629. };
  630.  
  631. /** This member function returns the focus Npc.
  632. * @return pointer with focus Npc.
  633. * @usable Ingame only
  634. */
  635. oCNpc* GetFocusNpc(void)
  636. {
  637. XCALL(0x00732BF0);
  638. };
  639.  
  640. /** This member function returns the current angle.
  641. * @return zVEC3 with current angle.
  642. * @usable Ingame only
  643. */
  644. zVEC3 GetAngle(void)
  645. {
  646. return zVEC3(this->trafoObjToWorld.m[0][2], this->trafoObjToWorld.m[1][2], this->trafoObjToWorld.m[2][2]);
  647. };
  648.  
  649. /** This member function sets the current angle.
  650. * @param x
  651. * @param y
  652. * @param z
  653. * @usable Ingame only
  654. */
  655. void SetAngle(float x, float y, float z)
  656. {
  657. this->trafoObjToWorld.m[0][2] = x;
  658. this->trafoObjToWorld.m[1][2] = y;
  659. this->trafoObjToWorld.m[2][2] = z;
  660. };
  661.  
  662. /** This member function returns the current position.
  663. * @return zVEC3 with current position.
  664. * @usable Ingame only
  665. */
  666. zVEC3 GetPosition(void)
  667. {
  668. return zVEC3(this->trafoObjToWorld.m[0][3], this->trafoObjToWorld.m[1][3], this->trafoObjToWorld.m[2][3]);
  669. };
  670.  
  671. /** This member function sets the current position.
  672. * @param x
  673. * @param y
  674. * @param z
  675. * @usable Ingame only
  676. */
  677. void SetPosition(float x, float y, float z)
  678. {
  679. this->trafoObjToWorld.m[0][3] = x;
  680. this->trafoObjToWorld.m[1][3] = y;
  681. this->trafoObjToWorld.m[2][3] = z;
  682. };
  683.  
  684. /** This member function delivers the name.
  685. * @return zSTRING with the name.
  686. * @usable Ingame only
  687. */
  688. zSTRING& GetName() { return this->name[0]; };
  689.  
  690. /** This member function returns the current exp of the NPC.
  691. * @return exp
  692. * @usable Ingame only
  693. */
  694. zINT GetEXP(void) { return this->experience_points; };
  695.  
  696. /** This member function sets the current exp of the NPC.
  697. * @return x New exp value
  698. * @usable Ingame only
  699. */
  700. void SetEXP(int x) { this->experience_points = x; };
  701.  
  702. /** This member function returns the current next exp of the NPC.
  703. * @return next exp
  704. * @usable Ingame only
  705. */
  706. zINT GetEXPNext(void) { return this->experience_points_next_level; };
  707.  
  708. /** This member function sets the current next exp of the NPC.
  709. * @return x New next exp value
  710. * @usable Ingame only
  711. */
  712. void SetEXPNext(int x) { this->experience_points_next_level = x; };
  713.  
  714. /** This member function returns the current level of the NPC.
  715. * @return level
  716. * @usable Ingame only
  717. */
  718. zINT GetLevel(void) { return this->level; };
  719.  
  720. /** This member function sets the current level of the NPC.
  721. * @return x New level value
  722. * @usable Ingame only
  723. */
  724. void SetLevel(int x) { this->level = x; };
  725.  
  726. /** Insert description.
  727. * @usable Ingame only
  728. */
  729. zINT GetLearningPoints(void) { return this->learn_points; };
  730.  
  731. /** Insert description.
  732. * @usable Ingame only
  733. */
  734. void SetLearningPoints(int x) { this->learn_points = x; };
  735.  
  736. /** Insert description.
  737. * @usable Ingame only
  738. */
  739. zINT GetHealth(void) { return this->attribute[NPC_ATR_HITPOINTS]; };
  740.  
  741. /** Insert description.
  742. * @usable Ingame only
  743. */
  744. void SetHealth(int x) { this->attribute[NPC_ATR_HITPOINTS] = x; };
  745.  
  746. /** Insert description.
  747. * @usable Ingame only
  748. */
  749. zINT GetMaxHealth(void) { return this->attribute[NPC_ATR_HITPOINTS_MAX]; };
  750.  
  751. /** Insert description.
  752. * @usable Ingame only
  753. */
  754. void SetMaxHealth(int x) { this->attribute[NPC_ATR_HITPOINTS_MAX] = x; };
  755.  
  756. /** Insert description.
  757. * @usable Ingame only
  758. */
  759. zINT GetMana(void) { return this->attribute[NPC_ATR_MANA]; };
  760.  
  761. /** Insert description.
  762. * @usable Ingame only
  763. */
  764. void SetMana(int x) { this->attribute[NPC_ATR_MANA] = x; };
  765.  
  766. /** Insert description.
  767. * @usable Ingame only
  768. */
  769. zINT GetMaxMana(void) { return this->attribute[NPC_ATR_MANA_MAX]; };
  770.  
  771. /** Insert description.
  772. * @usable Ingame only
  773. */
  774. void SetMaxMana(int x) { this->attribute[NPC_ATR_MANA_MAX] = x; };
  775.  
  776. /** Insert description.
  777. * @usable Ingame only
  778. */
  779. zINT GetStrength(void) { return this->attribute[NPC_ATR_STRENGTH]; };
  780.  
  781. /** Insert description.
  782. * @usable Ingame only
  783. */
  784. void SetStrength(int x) { this->attribute[NPC_ATR_STRENGTH] = x; };
  785.  
  786. /** Insert description.
  787. * @usable Ingame only
  788. */
  789. zINT GetDexterity(void) { return this->attribute[NPC_ATR_DEXTERITY]; };
  790.  
  791. /** Insert description.
  792. * @usable Ingame only
  793. */
  794. void SetDexterity(int x) { this->attribute[NPC_ATR_DEXTERITY] = x; };
  795.  
  796. /** Insert description.
  797. * @usable Ingame only
  798. */
  799. zFLOAT GetFatness() { return this->model_fatness; };
  800.  
  801. /** Insert description.
  802. * @usable Ingame only
  803. */
  804. void SetFatness(zFLOAT x) { this->model_fatness = x; };
  805.  
  806. // Begin GX addition 30 Apr 2010
  807.  
  808. //.text:00738720 ; public: class zCModel * __thiscall oCNpc::GetModel(void)
  809. /** Insert description.
  810. * @usable Ingame only
  811. */
  812. zCModel* GetModel()
  813. {
  814. XCALL(0x00738720)
  815. };
  816.  
  817. //.text: ; public: class oCMag_Book * __thiscall oCNpc::GetSpellBook(void)
  818. /** Insert description.
  819. * @usable Ingame only
  820. */
  821. oCMag_Book* GetSpellBook()
  822. {
  823. XCALL(0x0073EA00)
  824. };
  825.  
  826. //.text:00745A20 ; public: virtual void __thiscall oCNpc::Disable(void)
  827. /** Insert description.
  828. * @usable Ingame only
  829. */
  830. void Disable()
  831. {
  832. XCALL(0x00745A20)
  833. };
  834.  
  835. //.text:00745D40 ; public: virtual void __thiscall oCNpc::Enable(class zVEC3 &)
  836. /** Insert description.
  837. * @usable Ingame only
  838. */
  839. void Enable(zVEC3& pos)
  840. {
  841. XCALL(0x00745D40)
  842. };
  843.  
  844. //.text:0075E920 ; int __stdcall oCNpc__SetBodyState(int Value)
  845. /** Insert description.
  846. * @usable Ingame only
  847. */
  848. void SetBodyState(int Value)
  849. {
  850. XCALL(0x00745D40)
  851. };
  852.  
  853. /** Insert description.
  854. * @usable Ingame only
  855. */
  856. void SetName(const zSTRING& Name)
  857. {
  858. //*&& */zSTRING& RealName = this->GetName();
  859. MessageBoxA(0, this->name[0].ToChar(), 0,0);
  860. this->name[0].Clear();
  861. this->name[0].Insert(0, Name);
  862. };
  863.  
  864. // End GX addition 30 Apr 2010
  865.  
  866. // Begin GX addition 9 May 2010
  867.  
  868. //.text:0067B860 ; public: virtual void __thiscall oCNpc::OnDamage(class zCVob *, class zCVob *, float, int, class zVEC3 const &)
  869. /** Insert description.
  870. * @usable Ingame only
  871. */
  872. void OnDamage(zCVob*, zCVob*, float, int, zVEC3&)
  873. {
  874. XCALL(0x0067B860)
  875. };
  876.  
  877. //.text:006660E0 ; public: virtual void __thiscall oCNpc::OnDamage(struct oCNpc::oSDamageDescriptor &)
  878. /** Insert description.
  879. * @usable Ingame only
  880. */
  881. void OnDamage(oSDamageDescriptor &)
  882. {
  883. XCALL(0x006660E0)
  884. };
  885.  
  886. //.text:00739C90 ; public: void __thiscall oCNpc::Equip(class oCItem *)
  887. /** Insert description.
  888. * @usable Ingame only
  889. */
  890. void Equip(class oCItem *)
  891. {
  892. XCALL(0x00739C90)
  893. };
  894.  
  895. //.text:0073A490 ; public: void __thiscall oCNpc::EquipArmor(class oCItem *)
  896. /** Insert description.
  897. * @usable Ingame only
  898. */
  899. void EquipArmor(oCItem *)
  900. {
  901. XCALL(0x0073A490)
  902. };
  903.  
  904. //.text:0074F0B0 ; public: void __thiscall oCNpc::EquipBestArmor(void)
  905. /** Insert description.
  906. * @usable Ingame only
  907. */
  908. void EquipBestArmor(void)
  909. {
  910. XCALL(0x0074F0B0)
  911. };
  912.  
  913. //.text:0074EF30 ; public: void __thiscall oCNpc::EquipBestWeapon(int)
  914. /** Insert description.
  915. * @usable Ingame only
  916. */
  917. void EquipBestWeapon(int)
  918. {
  919. XCALL(0x0074EF30)
  920. };
  921.  
  922. //.text:0073A310 ; public: void __thiscall oCNpc::EquipFarWeapon(class oCItem *)
  923. /** Insert description.
  924. * @usable Ingame only
  925. */
  926. void EquipFarWeapon(oCItem *)
  927. {
  928. XCALL(0x0073A310)
  929. };
  930.  
  931. //.text:007323C0 ; public: void __thiscall oCNpc::EquipItem(class oCItem *)
  932. /** Insert description.
  933. * @usable Ingame only
  934. */
  935. void EquipItem(oCItem *)
  936. {
  937. XCALL(0x007323C0)
  938. };
  939.  
  940. //.text:0073A030 ; public: void __thiscall oCNpc::EquipWeapon(class oCItem *)
  941. /** Insert description.
  942. * @usable Ingame only
  943. */
  944. void EquipWeapon(oCItem *)
  945. {
  946. XCALL(0x0073A030)
  947. };
  948.  
  949. //.text:00744DD0 ; public: virtual int __thiscall oCNpc::DoDropVob(class zCVob *)
  950. /** Insert description.
  951. * @usable Ingame only
  952. */
  953. void DoDropVob(zCVob *)
  954. {
  955. XCALL(0x00744DD0)
  956. };
  957.  
  958. //.text:007449C0 ; public: virtual int __thiscall oCNpc::DoTakeVob(class zCVob *)
  959. /** Insert description.
  960. * @usable Ingame only
  961. */
  962. void DoTakeVob(zCVob *)
  963. {
  964. XCALL(0x007449C0)
  965. };
  966.  
  967. //.text:007446B0 ; public: virtual int __thiscall oCNpc::DoShootArrow(int)
  968. /** Insert description.
  969. * @usable Ingame only
  970. */
  971. void DoShootArrow(int)
  972. {
  973. XCALL(0x007446B0)
  974. };
  975.  
  976. //.text:0073E990 ; public: void __thiscall oCNpc::OpenSpellBook(int)
  977. /** Insert description.
  978. * @usable Ingame only
  979. */
  980. void OpenSpellBook(int)
  981. {
  982. XCALL(0x0073E990)
  983. };
  984.  
  985. //.text:007450B0 ; public: virtual int __thiscall oCNpc::DoThrowVob(class zCVob *, float)
  986. /** Insert description.
  987. * @usable Ingame only
  988. */
  989. void oCNpc::DoThrowVob(zCVob *, float)
  990. {
  991. XCALL(0x007450B0)
  992. };
  993.  
  994. /** Insert description.
  995. * @usable Ingame only
  996. */
  997. oCNpcInventory* GetInventory()
  998. {
  999. return &this->inventory2;
  1000. };
  1001.  
  1002. // End GX addition 30 Apr 2010
  1003.  
  1004. /** This method returns the current oCNpc::Hero instance
  1005. * @usable Ingame only
  1006. */
  1007. inline static oCNpc* GetHero() { return *(oCNpc**)0x00AB2684; };
  1008. };
  1009.  
  1010. #undef __G2EXT_API_HEADER
  1011.  
  1012. #endif // __API_G2_OCNPC_H__
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement