2020-08-25 18:42:52 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-08-18 20:42:30 +00:00
|
|
|
#include <string>
|
|
|
|
#include <cstring>
|
|
|
|
|
|
|
|
#include "CNProtocol.hpp"
|
|
|
|
#include "CNStructs.hpp"
|
2021-03-16 22:29:13 +00:00
|
|
|
#include "Chunking.hpp"
|
2020-08-18 20:42:30 +00:00
|
|
|
|
2020-09-10 16:40:38 +00:00
|
|
|
#define ACTIVE_MISSION_COUNT 6
|
|
|
|
|
2020-09-15 14:46:52 +00:00
|
|
|
#define PC_MAXHEALTH(level) (925 + 75 * (level))
|
|
|
|
|
2020-08-18 20:42:30 +00:00
|
|
|
struct Player {
|
2020-09-01 22:37:09 +00:00
|
|
|
int accountId;
|
2020-09-22 02:26:12 +00:00
|
|
|
int accountLevel; // permission level (see CN_ACCOUNT_LEVEL enums)
|
2020-08-18 20:42:30 +00:00
|
|
|
int64_t SerialKey;
|
|
|
|
int32_t iID;
|
|
|
|
uint64_t FEKey;
|
|
|
|
|
|
|
|
int level;
|
|
|
|
int HP;
|
2020-08-23 00:52:54 +00:00
|
|
|
int slot; // player slot, not nano slot
|
2020-09-21 19:43:53 +00:00
|
|
|
int16_t mentor;
|
2020-08-26 17:40:10 +00:00
|
|
|
int32_t money;
|
2020-08-27 20:16:52 +00:00
|
|
|
int32_t fusionmatter;
|
2020-09-14 14:27:52 +00:00
|
|
|
int32_t batteryW;
|
|
|
|
int32_t batteryN;
|
2020-08-18 20:42:30 +00:00
|
|
|
sPCStyle PCStyle;
|
|
|
|
sPCStyle2 PCStyle2;
|
2020-11-25 22:36:30 +00:00
|
|
|
sNano Nanos[NANO_COUNT]; // acquired nanos
|
2020-08-23 00:52:54 +00:00
|
|
|
int equippedNanos[3];
|
2020-08-24 21:04:56 +00:00
|
|
|
int activeNano; // active nano (index into Nanos)
|
|
|
|
int8_t iPCState;
|
2020-09-13 20:26:16 +00:00
|
|
|
int32_t iWarpLocationFlag;
|
|
|
|
int64_t aSkywayLocationFlag[2];
|
2020-09-18 07:10:30 +00:00
|
|
|
int32_t iConditionBitFlag;
|
2020-11-08 00:26:44 +00:00
|
|
|
int32_t iSelfConditionBitFlag;
|
2020-09-22 15:30:49 +00:00
|
|
|
int8_t iSpecialState;
|
2020-08-18 20:42:30 +00:00
|
|
|
|
2020-10-12 16:55:41 +00:00
|
|
|
int x, y, z, angle;
|
2020-10-14 04:26:30 +00:00
|
|
|
int lastX, lastY, lastZ, lastAngle;
|
2020-12-14 23:22:27 +00:00
|
|
|
int recallX, recallY, recallZ, recallInstance; // also Lair entrances
|
2020-10-12 16:55:41 +00:00
|
|
|
uint64_t instanceID;
|
2020-08-18 20:42:30 +00:00
|
|
|
sItemBase Equip[AEQUIP_COUNT];
|
2020-08-21 02:10:14 +00:00
|
|
|
sItemBase Inven[AINVEN_COUNT];
|
2020-12-03 23:58:10 +00:00
|
|
|
sItemBase Bank[ABANK_COUNT];
|
2020-08-26 17:40:10 +00:00
|
|
|
sItemTrade Trade[12];
|
|
|
|
int32_t moneyInTrade;
|
2020-08-27 02:35:13 +00:00
|
|
|
bool isTrading;
|
|
|
|
bool isTradeConfirm;
|
2020-09-10 13:01:35 +00:00
|
|
|
|
2020-09-26 22:16:15 +00:00
|
|
|
bool inCombat;
|
2020-11-26 15:01:48 +00:00
|
|
|
bool onMonkey;
|
2020-11-08 00:26:44 +00:00
|
|
|
int nanoDrainRate;
|
2020-10-21 05:24:51 +00:00
|
|
|
int healCooldown;
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-09-27 01:53:03 +00:00
|
|
|
int pointDamage;
|
|
|
|
int groupDamage;
|
2020-12-31 05:54:57 +00:00
|
|
|
int fireRate;
|
2020-09-27 01:53:03 +00:00
|
|
|
int defense;
|
2020-09-26 22:16:15 +00:00
|
|
|
|
2020-09-13 18:45:51 +00:00
|
|
|
int64_t aQuestFlag[16];
|
2020-09-10 16:40:38 +00:00
|
|
|
int tasks[ACTIVE_MISSION_COUNT];
|
2020-09-21 19:43:53 +00:00
|
|
|
int RemainingNPCCount[ACTIVE_MISSION_COUNT][3];
|
2020-09-10 13:01:35 +00:00
|
|
|
sItemBase QInven[AQINVEN_COUNT];
|
2020-09-21 19:43:53 +00:00
|
|
|
int32_t CurrentMissionID;
|
2020-09-22 11:16:09 +00:00
|
|
|
|
|
|
|
sTimeLimitItemDeleteInfo2CL toRemoveVehicle;
|
2020-10-05 00:03:13 +00:00
|
|
|
|
2020-10-04 23:54:08 +00:00
|
|
|
int32_t iIDGroup;
|
|
|
|
int groupCnt;
|
|
|
|
int32_t groupIDs[4];
|
2020-10-09 00:01:35 +00:00
|
|
|
int32_t iGroupConditionBitFlag;
|
2020-10-31 17:12:13 +00:00
|
|
|
|
|
|
|
bool notify;
|
2020-12-04 12:04:59 +00:00
|
|
|
bool hidden;
|
2020-12-28 15:24:24 +00:00
|
|
|
bool unwarpable;
|
2020-10-27 15:28:37 +00:00
|
|
|
|
2020-11-08 18:58:44 +00:00
|
|
|
bool buddiesSynced;
|
2020-10-27 15:28:37 +00:00
|
|
|
int64_t buddyIDs[50];
|
2020-12-05 00:29:08 +00:00
|
|
|
bool isBuddyBlocked[50];
|
2020-11-17 23:16:16 +00:00
|
|
|
|
2020-12-07 18:01:29 +00:00
|
|
|
uint64_t iFirstUseFlag[2];
|
|
|
|
|
2020-11-19 01:37:58 +00:00
|
|
|
ChunkPos chunkPos;
|
2021-03-09 02:40:23 +00:00
|
|
|
std::set<Chunk*> *viewableChunks;
|
2020-11-17 23:16:16 +00:00
|
|
|
time_t lastHeartbeat;
|
2020-12-31 05:54:57 +00:00
|
|
|
|
|
|
|
int suspicionRating;
|
|
|
|
time_t lastShot;
|
2021-03-09 02:40:23 +00:00
|
|
|
std::vector<sItemBase> *buyback;
|
2020-08-18 20:42:30 +00:00
|
|
|
};
|