86 lines
3.4 KiB
C++
86 lines
3.4 KiB
C++
#pragma once
|
|
#include "python_background.h"
|
|
#include "eter_render/RenderCommands3D.h"
|
|
#include "eter_net/Packet.h"
|
|
#include <vector>
|
|
#include <functional>
|
|
#include <string>
|
|
|
|
namespace ava2 {
|
|
void initItem();
|
|
void initPlayer();
|
|
void initchrmgr();
|
|
void initchr();
|
|
void initsnd();
|
|
|
|
using SkillCastCallback = std::function<void(int quickSlot, int skillIndex)>;
|
|
void SetPlayerSkillCastCallback(SkillCastCallback cb);
|
|
void SetSkillCoolTime(int skillIndex, float coolTime);
|
|
void SetSkillCoolTimeAt(int skillIndex,float coolTime,float now);
|
|
void EndSkillCoolTime(uint32_t skillIndex);
|
|
void ClickSkillSlot(int skillSlot);
|
|
void UseGuildSkill(int skillSlot);
|
|
void SetPlayerAffect(uint32_t affect);
|
|
void ResetPlayerAffect(uint32_t affect);
|
|
void SetComboSkillFlag(bool bFlag);
|
|
int AffectIndexToSkillIndex(int affect);
|
|
|
|
struct PlayerItemSlot {
|
|
uint32_t vnum = 0;
|
|
int count = 0;
|
|
std::array<long, 8> sockets{};
|
|
std::array<std::pair<int, int>, 15> attrs{};
|
|
};
|
|
|
|
PlayerItemSlot GetPlayerItem(int slot);
|
|
void SetPlayerItem(int slot, uint32_t vnum, int count);
|
|
void ResetPlayerState();
|
|
void AppendPartyMember(uint32_t pid,const std::string& name);
|
|
void LinkPartyMember(uint32_t pid,uint32_t vid);
|
|
void UnlinkPartyMember(uint32_t pid);
|
|
void UpdatePartyMemberInfo(uint32_t pid,uint8_t state,uint8_t hp);
|
|
void UpdatePartyMemberAffect(uint32_t pid,uint8_t slot,int16_t affect);
|
|
bool GetPartyMemberState(uint32_t pid,uint8_t* state);
|
|
bool PartyMemberPIDToVID(uint32_t pid,uint32_t* vid);
|
|
bool IsPartyMemberByVID(uint32_t vid);
|
|
void RememberChallengeInstance(uint32_t vid);
|
|
void RememberRevengeInstance(uint32_t vid);
|
|
void RememberCantFightInstance(uint32_t vid);
|
|
void ForgetInstance(uint32_t vid);
|
|
void SetKillLOG(const int32_t* log);
|
|
void NEW_ClearSkillData(bool all);
|
|
void ResetItemDatabase();
|
|
bool LoadItemList(const std::string& path);
|
|
bool LoadItemDescriptions(const std::string& path);
|
|
bool LoadItemTable(const std::string& path);
|
|
struct ItemScaleInfo { float scaleX=0,scaleY=0,scaleZ=0,positionX=0,positionY=0,positionZ=0; };
|
|
bool LoadItemScale(const std::string& path);
|
|
bool GetItemScale(uint32_t vnum,uint32_t pos,ItemScaleInfo* out);
|
|
bool GetItemNameAndType(uint32_t vnum,std::string* name,int* type);
|
|
bool IsPlayerEquipmentItem(uint8_t window,uint16_t cell);
|
|
bool GetItemTypeAndSubType(uint32_t vnum,int* type,int* subType);
|
|
void ClearPlayerPythonWindow();
|
|
void SetPlayerSkill(int slot,int index);
|
|
void SetPlayerSkillLevel(int index,int grade,int level);
|
|
void SetPlayerLegacySkillLevel(int index,int level);
|
|
void AddPlayerQuickSlot(int index,uint8_t type,uint8_t pos);
|
|
void DeletePlayerQuickSlot(int index);
|
|
void SwapPlayerQuickSlots(int source,int target);
|
|
void SetPlayerItemCount(uint8_t window,uint16_t cell,uint32_t count);
|
|
void SetPlayerItemData(uint8_t window, uint16_t cell, const TItemData& data);
|
|
TItemData GetPlayerItemData(uint8_t window, uint16_t cell);
|
|
bool UsePlayerItem(int window, int slot, std::string& outEquippedWeaponModel, std::string& outActionMessage);
|
|
bool MovePlayerItem(int srcWindow, int srcSlot, int dstWindow, int dstSlot, int count, std::string& outEquippedWeaponModel);
|
|
std::string GetWeaponModelPathByVnum(uint32_t vnum);
|
|
|
|
std::vector<Render3DDraw> GetAllActiveChrDraws();
|
|
|
|
void SetMainCharacterPosition(float x, float y, float z);
|
|
const std::string& GetMainCharacterName();
|
|
void SetMainCharacterName(const std::string& name);
|
|
long long GetPlayerStatusPoint(int type);
|
|
void SetPlayerStatusPoint(int type, long long value);
|
|
} // namespace ava2
|
|
|
|
|