Mercurial > mm7
view Party.h @ 824:fe4c8b113548
Merge
author | Nomad |
---|---|
date | Tue, 26 Mar 2013 20:06:51 +0200 |
parents | cfc65feef029 |
children | 9c3f28b31b4a |
line wrap: on
line source
#pragma once #include "Player.h" #include "NPC.h" #include "Spells.h" #include "VectorTypes.h" enum PARTY_QUEST_BITS: unsigned __int32 { PARTY_QUEST_EVENMORN_MAP_FOUND = 64, PARTY_QUEST_FOUNTAIN_HARMONDALE = 206, PARTY_QUEST_FOUNTAIN_NIGHON = 207, PARTY_QUEST_FOUNTAIN_PIERPONT = 208, PARTY_QUEST_FOUNTAIN_CELESTIA = 209, PARTY_QUEST_FOUNTAIN_THE_PIT = 210, PARTY_QUEST_FOUNTAIN_EVENMORN_ISLE = 211 }; /* 355 */ enum PARTY_FLAGS_1: __int32 { PARTY_FLAGS_1_FALLING = 0x0008, PARTY_FLAGS_1_ALERT_RED = 0x0010, PARTY_FLAGS_1_ALERT_YELLOW = 0x0020, PARTY_FLAGS_1_STANDING_ON_WATER = 0x0080, PARTY_FLAGS_1_LANDING = 0x0100, PARTY_FLAGS_1_BURNING = 0x200 }; enum PARTY_FLAGS_2: __int32 { PARTY_FLAGS_2_RUNNING = 0x2, }; /* 347 */ enum PARTY_BUFF_INDEX { PARTY_BUFF_RESIST_AIR = 0, PARTY_BUFF_RESIST_BODY = 1, PARTY_BUFF_DAY_OF_GODS = 2, PARTY_BUFF_DETECT_LIFE = 3, PARTY_BUFF_RESIST_EARTH = 4, PARTY_BUFF_FEATHER_FALL = 5, PARTY_BUFF_RESIST_FIRE = 6, PARTY_BUFF_FLY = 7, PARTY_BUFF_HASTE = 8, PARTY_BUFF_HEROISM = 9, PARTY_BUFF_IMMOLATION = 10, PARTY_BUFF_INVISIBILITY = 11, PARTY_BUFF_RESIST_MIND = 12, PARTY_BUFF_PROTECTION_FROM_MAGIC = 13, PARTY_BUFF_SHIELD = 14, PARTY_BUFF_STONE_SKIN = 15, PARTY_BUFF_TORCHLIGHT = 16, PARTY_BUFF_RESIST_WATER = 17, PARTY_BUFF_WATER_WALK = 18, PARTY_BUFF_WIZARD_EYE = 19, }; /* 300 */ enum PartyAction: unsigned __int32 { PARTY_INVALID = 0, PARTY_TurnLeft = 0x1, PARTY_TurnRight = 0x2, PARTY_StrafeLeft = 0x3, PARTY_StrafeRight = 0x4, PARTY_WalkForward = 0x5, PARTY_WalkBackward = 0x6, PARTY_LookUp = 0x7, PARTY_LookDown = 0x8, PARTY_CenterView = 0x9, PARTY_unkA = 0xA, PARTY_unkB = 0xB, PARTY_Jump = 0xC, PARTY_FlyUp = 0xD, PARTY_FlyDown = 0xE, PARTY_Land = 0xF, PARTY_RunForward = 0x10, PARTY_RunBackward = 0x11, PARTY_FastTurnLeft = 0x12, PARTY_FastTurnRight = 0x13, PARTY_dword = 0xFFFFFFFF }; /* 135 */ #pragma pack(push, 1) struct ActionQueue { void Add(PartyAction action); void Reset(); PartyAction Next(); unsigned int uNumActions; PartyAction pActions[30]; }; #pragma pack(pop) enum PartyAlignment: unsigned __int32 { PartyAlignment_Good = 0, PartyAlignment_Neutral = 1, PartyAlignment_Evil = 2 }; /* 208 */ #pragma pack(push, 1) struct Party_stru0 { int field_0[20]; // int field_50[170]; __int64 field_50[85]; __int64 _shop_ban_times[53]; int field_4A0[20]; int field_4F0[38]; char field_588[2]; __int64 _s_times[21]; //5d8 440h+8*51 __int64 field_632[8]; char field_672[6]; // char pIsArtifactFound[8]; }; #pragma pack(pop) /* 207 */ #pragma pack(push, 1) struct Party { Party(): uTimePlayed(0) { Zero(); } void Zero(); void UpdatePlayersAndHirelingsEmotions(); void RestAndHeal(); unsigned int GetPartyFame(); void CreateDefaultParty(char bGiveItems); int Reset(); void ResetPosMiscAndSpellBuffs(); bool HasItem(unsigned int uItemID); void SetHoldingItem(ItemGen *pItem); int GetNextActiveCharacter(); bool _497FC5_check_party_perception_against_level(); bool AddItem(ItemGen *pItem); void Yell(); static void SetGold(unsigned int uNumGold); static void TakeGold(unsigned int uNumGold); static void SetFood(unsigned int uNumFood); static void TakeFood(unsigned int uNumFood); static void GiveFood(unsigned int _this); inline bool WizardEyeActive() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uExpireTime > 0;} inline int WizardEyeSkillLevel() {return pPartyBuffs[PARTY_BUFF_WIZARD_EYE].uSkill;} inline bool TorchlightActive() {return pPartyBuffs[PARTY_BUFF_TORCHLIGHT].uExpireTime > 0;} inline bool FlyActive() {return pPartyBuffs[PARTY_BUFF_FLY].uExpireTime > 0;} inline bool WaterWalkActive() {return pPartyBuffs[PARTY_BUFF_WATER_WALK].uExpireTime > 0;} inline bool ImmolationActive() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uExpireTime > 0;} inline bool ImmolationSkillLevel() {return pPartyBuffs[PARTY_BUFF_IMMOLATION].uSkill;} inline bool FeatherFallActive() {return pPartyBuffs[PARTY_BUFF_FEATHER_FALL].uExpireTime > 0;} inline bool Invisible() {return pPartyBuffs[PARTY_BUFF_INVISIBILITY].uExpireTime > 0;} inline bool GetRedAlert() {return uFlags & PARTY_FLAGS_1_ALERT_RED;} inline void SetRedAlert() {uFlags |= PARTY_FLAGS_1_ALERT_RED;} inline bool GetYellowAlert() {return uFlags & PARTY_FLAGS_1_ALERT_YELLOW;} inline void SetYellowAlert() {uFlags |= PARTY_FLAGS_1_ALERT_YELLOW;} int field_0; unsigned int uPartyHeight; unsigned int uDefaultPartyHeight; int sEyelevel; unsigned int uDefaultEyelevel; int field_14; int y_rotation_granularity; unsigned int uWalkSpeed; int y_rotation_speed; // deg/s int field_24; int field_28; unsigned __int64 uTimePlayed; __int64 uLastRegenerationTime; Party_stru0 field_3C; Vec3_int_ vPosition; int sRotationY; int sRotationX; Vec3_int_ vPrevPosition; int sPrevRotationY; int sPrevRotationX; int sPrevEyelevel; int field_6E0; int field_6E4; int uFallSpeed; int field_6EC; int field_6F0; int field_6F4_packedid; int field_6F8; int field_6FC; int uFallStartY; unsigned int bFlying; char field_708; char field_709; char field_70A; char field_70B; unsigned int uCurrentYear; unsigned int uCurrentMonth; unsigned int uCurrentMonthWeek; unsigned int uDaysPlayed; unsigned int uCurrentHour; unsigned int uCurrentMinute; unsigned int uCurrentTimeSecond; unsigned int uNumFoodRations; int field_72C; int field_730; unsigned int uNumGold; unsigned int uNumGoldInBank; unsigned int uNumDeaths; int field_740; int uNumPrisonTerms; unsigned int uNumBountiesCollected; int field_74C; __int16 field_750[5]; __int16 field_75A[5]; unsigned char days_played_without_rest; unsigned __int8 _quest_bits[64]; unsigned __int8 pArcomageWins[16]; char field_7B5_in_arena_quest; char uNumArenaPageWins; char uNumArenaSquireWins; char uNumArenaKnightWins; char uNumArenaLordWins; char pIsArtifactFound[29]; //7ba char field_7d7[39]; unsigned char _autonote_bits[12]; char field_80A[74]; char field_854[32]; int field_874; int field_878; unsigned int bTurnBasedModeOn; int field_880; int uFlags2; PartyAlignment alignment; SpellBuff pPartyBuffs[20]; Player pPlayers[4]; NPCData pHirelings[2]; ItemGen pPickedItem; unsigned int uFlags; ItemGen StandartItemsInShops[53][12]; ItemGen SpecialItemsInShops[53][12]; //D0EC ItemGen SpellBooksInGuilds[32][12]; char field_1605C[24]; char pHireling1Name[100]; char pHireling2Name[100]; int armageddon_timer; int field_16140; int pTurnBasedPlayerRecoveryTimes[4]; int InTheShopFlags[53]; int uFine; float flt_TorchlightColorR; float flt_TorchlightColorG; float flt_TorchlightColorB; }; #pragma pack(pop) extern Party *pParty; // idb extern struct ActionQueue *pPartyActionQueue;