mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
* Shared tasks WIP; lots of logging; shared tasks and tasks work internally the same for now; lots to cleanup yet * Update task_manager.cpp * Add tables * World message handler * Zone message handler * More messaging * More rearranging * Task creation work (wip) * Tweaks * Decoupled things, added a shared task manager, moved logic to the manager, created the shared task object, now creating a sense of state on creation and members, zero validation, happy path * Cleanup unnecessary getter * More work on shared task persistence and state loading * Add int64 support into repositories * More state handling, creation loads all tables * Wrap up shared task state creation and removal * Move more lookup operations to preloading (memory). Restore shared task state during world bootup * Implement shared task updates * Add members other than just leader in task confirmations * Update shared_task_manager.cpp * Hook task cancellation for shared task removal (middleware) * Remove dynamic_zone_id from SharedTasks model in repositories (for now) since we will likely be one to many with DZ objects * Get members to show up in the window on creation * Add opcodes, cleanup * Add opcode handlers * Split some methods out, self removal of shared task and updating members * Implement offline shared task sync * Style changes * Send memberlist on initial login; implement remove player from shared task window * Refactorings, cleanup * Implement make leader in shared tasks window * Implement add player, sync shared task state after add * Add opcodes for remaining clients * Shared task invite dialogue window implementation and response handling (including validation) * Logging * Remove comment * Some cleanup * Pass NPC context through shared task request logic * Remove extra SharedTaskMember fields * Add message constants * Remove static * Only use dz for expedition request This passes expedition creation parameters through DynamicZone instead of injecting ExpeditionRequest since it can hold creation data now * Store expedition leader on dz This shifts to using the leader object that exists in the core dynamic zone object. It will be moved to the dynamic zone table later with other columns that should just be on the dz to make loading easier. Expeditions are probably the only dz type that will use this for window updates and command auth. Other systems on live do fill the window but don't keep it updated * Store expedition name on dz This uses the name stored on dz (for window packets) instead of duplicating it. This will be moved completely to dz table later * Store uuid on dynamic zone This lets dynamic zones generate the uuid instead of expeditions. Other dz type systems may want to make use of this. Lockouts should also be moved to dynamic zones at some point in the future so this will be necessary for that * Move expedition db columns to dz These columns should just belong to the core dynamic zone. This will simplify loading from the database and in the future a separate expedition table may no longer be necessary. * Move window packet methods to dz It makes more sense for these methods to be in the core This will also allow support for other systems to use the window, though live behavior that updates the window for shared task missions when not in an expedition is likely unintended since it's not updated on changes. * Store dynamic zone ids on clients These will now be used for client dynamic zone lookups to remove dependency on any dz type system caches * Move member management to dz This moves server messaging for adding and removing members to internal dynamic zone methods Set default dz member status to Unknown * Move member status caching to dz This moves world member status caching into internal dz methods Zone member updates for created expeditions are now async and sent after world replies with member statuses. Prior to this two memberlist packets were sent to members in other zones on creation to update statuses. This also fixes a bug with member statuses being wrong for offline raid members in the zone that created an expedition. Note that live kicks offline players out of raids so this is only to support emu behavior. * Move member status updates to dz * Set dz member status on all client dzs This also renames the zone entry dz update method and moves window update to a dynamic zone method. Eventually expedition components should just be merged with dz and handled as another dz type * Save instance safe return on characters Add character_instance_safereturns table and repository Previously dz safe return only worked for online characters via the dz kicktimer or offline characters with a workaround that moved them when an expedition was deleted. There were various edge cases that would cause characters to be moved to bind instead (succoring after removal, camping before kick timer, removed while offline, bulk kickplayers removal with some offline) This updates a character's instance safereturn every time they enter a zone. If a character enters world in an instance that expired or are no longer part of they'll be moved to their instance safereturn (if the safereturn data is for the same zone-instance). Bind is still a fallback This may also be used for non-dz instancing so it's named generically This removes the expedition MoveMembersToSafeReturn workaround which deprecates the is_current_member column of dynamic_zone_members and will be removed in a followup patch. * Remove is_current_member from dz members This was only being used in the workaround to move past members to dz safereturns if they were still inside the dz but not online * Let dz check leader in world This moves expedition leader processing in world to the dynamic zone. This is a step in phasing out the separate expedition class for things that can run off the dynamic zone core with simple dz type checks This greatly simplifies checking leader on member and status changes without needing callbacks. Other dz types that may use the dz leader object can just handle it directly on the dz the same as expeditions * Let dz handle member expire warnings This moves expire warning checks to dz. This will make it easier for other dz types to issue expire warnings if needed * Use separate dynamic zone cache Dynamic zones are no longer member objects of expeditions and have been placed into their own cache. This was done so other dz types can be cached without relying on their systems. Client and zone dz Lookups are now independent of any system This continues the process of phasing out a separate expedition cache. Eventually expeditions can just be run directly as dynamic zones internally with a few dz type checks. Add dz serialization methods (cereal) for passing server dz creation Modify #dz list to show cache and database separately. Also adds #dz cache reload. This command will reload expeditions too since they currently hold references to the dz in their own zone cache. Add a dynamic zone processing class to world to process all types and move expedition processing to it * Move expedition makeleader processing to dz * Let dz handle expedition deletions This removes the need for separate expedition cache in world This will greatly simplify world dynamic zone caching and processing. Dynamic zones that are expeditions can just handle this directly. Once lockouts and other components are completely moved to dynamic zones the separate expedition cache in zone will also no longer be necessary * Remove ExpeditionBase class Since world no longer caches expeditions this will not be necessary * Fix windows compile * Implement task dz creation Prototype dz creation for shared tasks * Add and remove shared task members from dz Also keep leader updated (used in choose zone window) * Fix client crash on failed shared task * Fix linux compile and warning * Check client nullptr for dz message This was accidently removed when expedition makeleader was moved * Disable dz creation for solo tasks * Add shared task repository headers to CMakeLists * Add shared task dynamic zones table * Add shared task dz database persistence * Get members from db on shared task dz creation This fixes a case where removing a member from a shared task dz would fail if the member's name was empty. This could happen if the shared task dz was created while a member was offline. This also changes the dz member removal method to only check id. It might be possible to change all dz member validations to only check ids since names are primarily for window updates, but shared task dz member names need to be non-empty anyway to support possible live-like dz window usage in the future. * Add character message methods to world Add simple and eqstr message methods to ClientList Add shared task manager methods to message all members or leader * Add SyncClientSharedTaskState and nested sync strategies to cover M3 work * Fix whitespace * Implement task request cooldown timer This implements the task request cooldown (15 seconds) that live uses when a task is accepted. This will also need to be set when shared tasks are offered (likely due to additional group/raid validations) * Implement shared task selector validation This implements the validation and filtering that occurs before the task selection window is sent to a client for shared tasks To keep things live-like, task selectors that contain a shared task will be run through shared task validation and drop non-shared tasks. Live doesn't mix types in task selections and this makes validation simpler. Also note that live sends shared task selectors via a different opcode than solo tasks but that has not been implemented yet * Add separate shared task select opcodes Live uses separate opcodes for solo and shared task selection windows * Convert ActivityType to enum class * Refactor task selector serialization This adds serializer methods to task and task objective structs for the task selection windows. This combines the duplicate task selector methods to reduce code duplication and simplify serialization * Add shared task selector This sends shared task selection window using the shared task specific opcode and adds an opcode handler for shared task accepts which are sent by client in response to setting selection window to shared task type. * Refactor task objective serialization This adds a serialization method to the task objective struct for serializing objectives in the window list and combines the separate client-based methods to reduce duplicated code. * Add task level spread and player count columns * Implement shared task accept validation This adds a common method for shared task character request queries * Add task replay and request timer columns * Add character task timers table * Use shared task accept time on clients This overrides client task accept time with shared task's creation time. This is needed for accurate window task timers and lockout messages especially for characters added to shared tasks post creation * Implement task timer lockouts This implements replay and request task timers for solo and shared tasks * Add solo and shared task timer validation * Remove logging of padding array This gets interpreted as a c string which may not be null terminated * Implement /kickplayers task This also fixes current CancelTask behavior for leader which was performing kickplayers functionality through the remove task button * Implement /taskquit command * Implement shared task invite validation Remove active invitation before invite accept validation * Remove local client db persistence during SyncClientSharedTaskRemoveLocalIfNotExists * Add missing accept time arg to assign task * Only validate non-zero task invite requirements * Fix task error log crash * Separate task cooldown timer messaging * Use method to check for client shared task * Avoid unneeded task invite validation query Only need to query character data for levels for non-zero level spread * Implement /tasktimers command May want to add some type of throttled caching mechanism for this in the future * Add /tasktimers rate limiter * Intercept shared task completion; more work to come * Change SharedTaskActivityState and SharedTasks time objects to datetime * Add updated_time updates to SharedTaskActivities * Mark shared tasks as complete when all activities are completed * Save a database query on shared task completion and use the active record in memory * Don't record shared task completions to the quest log * Implement RecordSharedTaskCompletion, add tables, repositories * Update shared_task_manager.cpp * Update shared_task_manager.cpp * Add shared task replay timers This is still not feature complete. On live any past members that ever joined the shared task will receive a replay timer when it's completed * Create FindCharactersInSharedTasks that searches through memory * Remove namespace shorthand and formatting * More minor cleanup * Implement PurgeAllSharedTasks via #task command * Add #task purgetimers * Decrease m_keepalive time between processes * Remove type ordering in /tasktimer query * Add comment for task packet reward multiplier This is likely a reward multiplier that changes text color based on value to represent any scaled bonus or penalty * Add replay timers to past members This implements the live behavior that adds replay timers to any previous member of a shared task. This likely exists to avoid possible exploits. Shared task member history is stored in memory and is used to assign replay timers. This history will be lost on world crashes or restarts but is simpler than saving past member state in database. This also makes world send shared task replay timer messages since past members need to be messaged now * Move PurgeTaskTimers client method to tasks.cpp * Remove dz members when purging shared tasks Server dz states need to be updated before shared tasks are deleted * Use exact name in shared task invites This removes the wildcards from shared task invite character queries which was sometimes selecting the wrong character Taskadd validation is called even for invalid characters to allow for proper messages to occur * Clear declined active shared task invitations This also notifies leader for declined shared task invites * Store shared task member names This adds back the character name field to SharedTaskMember. This should make serialization easier in the future and reduce database lookups when names are needed for /task commands * Implement /taskplayerlist command * Replace queries with member name lookups Now that shared task members store names these queries are unnecessary This also adds not-a-member messages for /taskremove and /taskmakeleader * Implement shared task member change packet This avoids sending the full member list to members when a single member is added or removed and lets the client generate chat messages for it. * Serialize shared task member list from world This uses cereal to serialize the full member list from world and removes the zone query workarounds * Initialize client task state array This was causing sql query errors on client state reloads The client task information array was uninitialized resulting in being filled with 0xcdcdcdcd values in msvc debug builds. Under release builds this may have resulted in indeterminate values A better fix would be to refactor some of this legacy code * Add shared task command messages Add messages for non-leader task commands This adds taskadd, taskremove, taskmakeleader, and taskquit messages The leader receives double messages for taskremove like live due to the client generated message as well as the explicit one. It also receives double server messages if the leader /taskremoves self. * Replace some task messages with eqstrs This also updates to use live colors * Avoid shared task invite leader lookup query Since member names are stored now this query is also unnecessary * Avoid reloading client state on shared task accept This was unnecessarily reloading client task state when added to a shared task. This also resulted in all active tasks being resent to shared task members on creation. The shared task itself is the only task that needs to be sent which is handled by AcceptNewTask. * Remove active shared task invite on zone Live doesn't re-send shared task invites after zoning like it does for expeditions so there's no need to keep these around. This fixes active invitations never getting reset on characters that zone or go offline. * Choose new shared task leader if leader removed * Add separate shared task kickplayers method * Enable EVENT_CAST_ON for clients This will be required for a shared task objective (The Creator) in DoN * Revert "Avoid reloading client state on shared task accept" This reverts commit 3af14fee2de8b109ffb6c2b2fc67731e1531a665. Without this clients added to a task after some objectives have been completed don't get updated state. Will need to investigate this later * Disallow looting inside a dz by non-members Non-members of a dynamic zone should not be allowed to loot npcs inside it. This should have been disabled for expeditions already but was still allowed due to an oversight (or live behavior changed). This is less critical for shared tasks since members can be added and removed at will without leaving a dz but still an important feature. * Change load where criteria * Increase task completion emote column size * Use eqstr for task item reward message * Implement radiant and ebon crystal rewards This adds reward columns for radiant and ebon crystals to the tasks table and updates task description serialization * Send task completion emote before rewards This matches live and makes it a little easier to see item rewards when tasks have a long completion emote. This also changes it to send via the same normal message opcode that live uses. * Do not send a shared task in completed task history * Allow EVENT_TASK_STAGE_COMPLETE for quest goals This invokes event_task_stage_complete for task elements flagged with a quest controlled goal method. It should be expected behavior that a completed task stage always fires this event even if a quest controls it * Add SyncSharedTaskZoneClientDoneCountState * Swap return for continue in this case * Formatting * Simplify * Formatting * Formatting * Formatting * Remove errant check * Formatting, add setter for shared tasks * Remove debugging * Comments in PR * More PR follow up * Formatting * Cleanup * Update packet comments * Comments * More cleanup * Send command error message if not in shared task /taskadd is the only command with this feedback on live. Newer live clients also generate this instead of the server sending the message * Implement expire_time on SharedTask object and add a purge on world bootup * Comment * Add SyncClientSharedTaskStateToLocal where clients fall out of sync and no longer have a task locally * Clamp shared task activity updates to max done count and discard updates out of bounds * Fix packet send * Revert packet send * Adjust clamping OOO for completed time check. Add completed tables to purge truncation * Refactor kill update logic so that shared task kill updates only update one client instead of all clients * Cleanup how we're checking for active tasks * Forward task sets that contain shared tasks This forwards task sets that contain a shared task to shared task selector validation like normal task selectors * Change eqstr for empty solo task offers This is the message live appears to use if all task offers are filtered out by solo task validation * Fix max active tasks client message This message starts at the third argument. It was maybe intended to be an npc say message but live just sends it as a normal eqstr with the first two arguments nulled. * Load client task state after zoning complete This fixes a possible race where a character removed from a shared task while zoning would be stuck with an incorrect character activities state after zoning was completed. This was caused by the character loading task state to early on zone entry but never receiving the remove player message from world since they are missing from the world cle until zoning is completed. Loading client state after zone connection is completed makes sure the client has the latest state and available to the world cle * Send message to clients removed while zoning This message should usually only be sent to characters that were removed from a shared task while zoning but will occur for any sync state removals where a message wouldn't have already occured. * Post rebase fix * HG comment for checking active task * Addressing HG comments around zeroing out a shared task id * Remove errant comment * Post rebase database manifest updates * Update eqemu_logsys_log_aliases.h * More rebase catches * Bump database version for last commit Co-authored-by: hg <4683435+hgtw@users.noreply.github.com>
411 lines
17 KiB
C++
411 lines
17 KiB
C++
#ifndef EQEMU_LUA_CLIENT_H
|
|
#define EQEMU_LUA_CLIENT_H
|
|
#ifdef LUA_EQEMU
|
|
|
|
#include "lua_mob.h"
|
|
|
|
class Client;
|
|
class Lua_Expedition;
|
|
class Lua_Group;
|
|
class Lua_Raid;
|
|
class Lua_Inventory;
|
|
class Lua_Packet;
|
|
|
|
namespace luabind {
|
|
struct scope;
|
|
}
|
|
|
|
luabind::scope lua_register_client();
|
|
luabind::scope lua_register_inventory_where();
|
|
|
|
class Lua_Client : public Lua_Mob
|
|
{
|
|
typedef Client NativeType;
|
|
public:
|
|
Lua_Client() { SetLuaPtrData(nullptr); }
|
|
Lua_Client(Client *d) { SetLuaPtrData(reinterpret_cast<Entity*>(d)); }
|
|
virtual ~Lua_Client() { }
|
|
|
|
operator Client*() {
|
|
return reinterpret_cast<Client*>(GetLuaPtrData());
|
|
}
|
|
|
|
void SendSound();
|
|
void Sit();
|
|
void Save();
|
|
void Save(int commit_now);
|
|
void SaveBackup();
|
|
bool Connected();
|
|
bool InZone();
|
|
void Kick();
|
|
void Disconnect();
|
|
bool IsLD();
|
|
void WorldKick();
|
|
void SendToGuildHall();
|
|
void SendToInstance(std::string instance_type, std::string zone_short_name, uint32 instance_version, float x, float y, float z, float heading, std::string instance_identifier, uint32 duration);
|
|
int GetAnon();
|
|
void SetAnon(uint8 anon_flag);
|
|
int GetAFK();
|
|
void SetAFK(uint8 afk_flag);
|
|
void Duck();
|
|
void DyeArmorBySlot(uint8 slot, uint8 red, uint8 green, uint8 blue);
|
|
void DyeArmorBySlot(uint8 slot, uint8 red, uint8 green, uint8 blue, uint8 use_tint);
|
|
void Stand();
|
|
void SetGM(bool v);
|
|
void SetPVP(bool v);
|
|
bool GetPVP();
|
|
bool GetGM();
|
|
void SetBaseClass(int v);
|
|
void SetBaseRace(int v);
|
|
void SetBaseGender(int v);
|
|
int GetClassBitmask();
|
|
int GetRaceBitmask();
|
|
int GetBaseFace();
|
|
int GetLanguageSkill(int skill_id);
|
|
int GetLDoNPointsTheme(int theme);
|
|
int GetBaseSTR();
|
|
int GetBaseSTA();
|
|
int GetBaseCHA();
|
|
int GetBaseDEX();
|
|
int GetBaseINT();
|
|
int GetBaseAGI();
|
|
int GetBaseWIS();
|
|
int GetWeight();
|
|
uint32 GetEXP();
|
|
double GetEXPModifier(uint32 zone_id);
|
|
double GetAAEXPModifier(uint32 zone_id);
|
|
void SetAAEXPModifier(uint32 zone_id, double aa_modifier);
|
|
void SetEXPModifier(uint32 zone_id, double exp_modifier);
|
|
uint32 GetAAExp();
|
|
uint32 GetAAPercent();
|
|
uint32 GetTotalSecondsPlayed();
|
|
void AddLDoNLoss(uint32 theme_id);
|
|
void AddLDoNWin(uint32 theme_id);
|
|
void UpdateLDoNPoints(uint32 theme_id, int points);
|
|
void SetDeity(int v);
|
|
void AddEXP(uint32 add_exp);
|
|
void AddEXP(uint32 add_exp, int conlevel);
|
|
void AddEXP(uint32 add_exp, int conlevel, bool resexp);
|
|
void SetEXP(uint32 set_exp, uint32 set_aaxp);
|
|
void SetEXP(uint32 set_exp, uint32 set_aaxp, bool resexp);
|
|
void SetBindPoint();
|
|
void SetBindPoint(int to_zone);
|
|
void SetBindPoint(int to_zone, int to_instance);
|
|
void SetBindPoint(int to_zone, int to_instance, float new_x);
|
|
void SetBindPoint(int to_zone, int to_instance, float new_x, float new_y);
|
|
void SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z);
|
|
void SetBindPoint(int to_zone, int to_instance, float new_x, float new_y, float new_z, float new_heading);
|
|
float GetBindX();
|
|
float GetBindX(int index);
|
|
float GetBindY();
|
|
float GetBindY(int index);
|
|
float GetBindZ();
|
|
float GetBindZ(int index);
|
|
float GetBindHeading();
|
|
float GetBindHeading(int index);
|
|
uint32 GetBindZoneID();
|
|
uint32 GetBindZoneID(int index);
|
|
float GetTargetRingX();
|
|
float GetTargetRingY();
|
|
float GetTargetRingZ();
|
|
void MovePC(int zone, float x, float y, float z, float heading);
|
|
void MovePCInstance(int zone, int instance, float x, float y, float z, float heading);
|
|
void MoveZone(const char *zone_short_name);
|
|
void MoveZoneGroup(const char *zone_short_name);
|
|
void MoveZoneRaid(const char *zone_short_name);
|
|
void MoveZoneInstance(uint16 instance_id);
|
|
void MoveZoneInstanceGroup(uint16 instance_id);
|
|
void MoveZoneInstanceRaid(uint16 instance_id);
|
|
void ChangeLastName(const char *in);
|
|
int GetFactionLevel(uint32 char_id, uint32 npc_id, uint32 race, uint32 class_, uint32 deity, uint32 faction, Lua_NPC npc);
|
|
void SetFactionLevel(uint32 char_id, uint32 npc_id, int char_class, int char_race, int char_deity);
|
|
void SetFactionLevel2(uint32 char_id, int faction_id, int char_class, int char_race, int char_deity, int value, int temp);
|
|
int GetRawItemAC();
|
|
uint32 AccountID();
|
|
const char *AccountName();
|
|
int Admin();
|
|
uint32 CharacterID();
|
|
int GuildRank();
|
|
uint32 GuildID();
|
|
int GetFace();
|
|
bool TakeMoneyFromPP(uint64 copper);
|
|
bool TakeMoneyFromPP(uint64 copper, bool update_client);
|
|
void AddMoneyToPP(uint32 copper, uint32 silver, uint32 gold, uint32 platinum, bool update_client);
|
|
bool TGB();
|
|
int GetSkillPoints();
|
|
void SetSkillPoints(int skill);
|
|
void IncreaseSkill(int skill_id);
|
|
void IncreaseSkill(int skill_id, int value);
|
|
void IncreaseLanguageSkill(int skill_id);
|
|
void IncreaseLanguageSkill(int skill_id, int value);
|
|
int GetRawSkill(int skill_id);
|
|
bool HasSkill(int skill_id);
|
|
bool CanHaveSkill(int skill_id);
|
|
void SetSkill(int skill_id, int value);
|
|
void AddSkill(int skill_id, int value);
|
|
void CheckSpecializeIncrease(int spell_id);
|
|
void CheckIncreaseSkill(int skill_id, Lua_Mob target);
|
|
void CheckIncreaseSkill(int skill_id, Lua_Mob target, int chance_mod);
|
|
void SetLanguageSkill(int language, int value);
|
|
int MaxSkill(int skill_id);
|
|
bool IsMedding();
|
|
int GetDuelTarget();
|
|
bool IsDueling();
|
|
void SetDuelTarget(int c);
|
|
void SetDueling(bool v);
|
|
void ResetAA();
|
|
void MemSpell(int spell_id, int slot);
|
|
void MemSpell(int spell_id, int slot, bool update_client);
|
|
void UnmemSpell(int slot);
|
|
void UnmemSpell(int slot, bool update_client);
|
|
void UnmemSpellBySpellID(int32 spell_id);
|
|
void UnmemSpellAll();
|
|
void UnmemSpellAll(bool update_client);
|
|
uint16 FindMemmedSpellBySlot(int slot);
|
|
int MemmedCount();
|
|
luabind::object GetLearnableDisciplines(lua_State* L);
|
|
luabind::object GetLearnableDisciplines(lua_State* L, uint8 min_level);
|
|
luabind::object GetLearnableDisciplines(lua_State* L, uint8 min_level, uint8 max_level);
|
|
luabind::object GetLearnedDisciplines(lua_State* L);
|
|
luabind::object GetMemmedSpells(lua_State* L);
|
|
luabind::object GetScribedSpells(lua_State* L);
|
|
luabind::object GetScribeableSpells(lua_State* L);
|
|
luabind::object GetScribeableSpells(lua_State* L, uint8 min_level);
|
|
luabind::object GetScribeableSpells(lua_State* L, uint8 min_level, uint8 max_level);
|
|
void ScribeSpell(int spell_id, int slot);
|
|
void ScribeSpell(int spell_id, int slot, bool update_client);
|
|
void UnscribeSpell(int slot);
|
|
void UnscribeSpell(int slot, bool update_client);
|
|
void UnscribeSpellAll();
|
|
void UnscribeSpellAll(bool update_client);
|
|
void TrainDisc(int itemid);
|
|
void TrainDiscBySpellID(int32 spell_id);
|
|
int GetDiscSlotBySpellID(int32 spell_id);
|
|
void UntrainDisc(int slot);
|
|
void UntrainDisc(int slot, bool update_client);
|
|
void UntrainDiscAll();
|
|
void UntrainDiscAll(bool update_client);
|
|
bool IsStanding();
|
|
bool IsSitting();
|
|
bool IsCrouching();
|
|
void SetFeigned(bool v);
|
|
bool GetFeigned();
|
|
bool AutoSplitEnabled();
|
|
void SetHorseId(int id);
|
|
int GetHorseId();
|
|
void NukeItem(uint32 item_num);
|
|
void NukeItem(uint32 item_num, int where_to_check);
|
|
void SetTint(int slot_id, uint32 color);
|
|
void SetMaterial(int slot_id, uint32 item_id);
|
|
void Undye();
|
|
int GetItemIDAt(int slot_id);
|
|
int GetAugmentIDAt(int slot_id, int aug_slot);
|
|
void DeleteItemInInventory(int slot_id, int quantity);
|
|
void DeleteItemInInventory(int slot_id, int quantity, bool update_client);
|
|
void SummonItem(uint32 item_id);
|
|
void SummonItem(uint32 item_id, int charges);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
|
bool attuned);
|
|
void SummonItem(uint32 item_id, int charges, uint32 aug1, uint32 aug2, uint32 aug3, uint32 aug4, uint32 aug5,
|
|
bool attuned, int to_slot);
|
|
void SetStats(int type, int value);
|
|
void IncStats(int type, int value);
|
|
void DropItem(int slot_id);
|
|
void BreakInvis();
|
|
void LeaveGroup();
|
|
bool IsGrouped();
|
|
bool IsRaidGrouped();
|
|
bool Hungry();
|
|
bool Thirsty();
|
|
int GetInstrumentMod(int spell_id);
|
|
bool DecreaseByID(uint32 type, int amt);
|
|
void Escape();
|
|
void GoFish();
|
|
void ForageItem();
|
|
void ForageItem(bool guarantee);
|
|
float CalcPriceMod(Lua_Mob other, bool reverse);
|
|
void ResetTrade();
|
|
uint32 GetDisciplineTimer(uint32 timer_id);
|
|
void ResetDisciplineTimer(uint32 timer_id);
|
|
void ResetAllDisciplineTimers();
|
|
bool UseDiscipline(int spell_id, int target_id);
|
|
bool HasDisciplineLearned(uint16 spell_id);
|
|
int GetCharacterFactionLevel(int faction_id);
|
|
void SetZoneFlag(int zone_id);
|
|
void ClearZoneFlag(int zone_id);
|
|
bool HasZoneFlag(int zone_id);
|
|
void SendZoneFlagInfo(Lua_Client to);
|
|
void SetAATitle(const char *title);
|
|
int GetClientVersion();
|
|
uint32 GetClientVersionBit();
|
|
void SetTitleSuffix(const char *text);
|
|
void SetAAPoints(int points);
|
|
int GetAAPoints();
|
|
int GetSpentAA();
|
|
void AddAAPoints(int points);
|
|
void RefundAA();
|
|
int GetModCharacterFactionLevel(int faction);
|
|
int GetLDoNWins();
|
|
int GetLDoNLosses();
|
|
int GetLDoNWinsTheme(int theme);
|
|
int GetLDoNLossesTheme(int theme);
|
|
int GetStartZone();
|
|
void SetStartZone(int zone_id);
|
|
void SetStartZone(int zone_id, float x);
|
|
void SetStartZone(int zone_id, float x, float y);
|
|
void SetStartZone(int zone_id, float x, float y, float z);
|
|
void SetStartZone(int zone_id, float x, float y, float z, float heading);
|
|
void KeyRingAdd(uint32 item);
|
|
bool KeyRingCheck(uint32 item);
|
|
void AddPVPPoints(uint32 points);
|
|
void AddCrystals(uint32 radiant, uint32 ebon);
|
|
void SetEbonCrystals(uint32 value);
|
|
void SetRadiantCrystals(uint32 value);
|
|
uint32 GetPVPPoints();
|
|
uint32 GetRadiantCrystals();
|
|
uint32 GetEbonCrystals();
|
|
void QuestReadBook(const char *text, int type);
|
|
void UpdateGroupAAs(int points, uint32 type);
|
|
uint32 GetGroupPoints();
|
|
uint32 GetRaidPoints();
|
|
void LearnRecipe(uint32 recipe);
|
|
int GetEndurance();
|
|
int GetMaxEndurance();
|
|
int GetEndurancePercent();
|
|
void SetEndurance(int endur);
|
|
void SendOPTranslocateConfirm(Lua_Mob caster, int spell_id);
|
|
uint32 GetIP();
|
|
void AddLevelBasedExp(int exp_pct);
|
|
void AddLevelBasedExp(int exp_pct, int max_level);
|
|
void AddLevelBasedExp(int exp_pct, int max_level, bool ignore_mods);
|
|
void IncrementAA(int aa);
|
|
bool GrantAlternateAdvancementAbility(int aa_id, int points);
|
|
bool GrantAlternateAdvancementAbility(int aa_id, int points, bool ignore_cost);
|
|
void MarkSingleCompassLoc(float in_x, float in_y, float in_z);
|
|
void MarkSingleCompassLoc(float in_x, float in_y, float in_z, int count);
|
|
void ClearCompassMark();
|
|
int GetNextAvailableSpellBookSlot();
|
|
int GetNextAvailableSpellBookSlot(int start);
|
|
uint32 GetSpellIDByBookSlot(int book_slot);
|
|
int FindSpellBookSlotBySpellID(int spell_id);
|
|
void UpdateTaskActivity(int task, int activity, int count);
|
|
void AssignTask(int task, int npc_id);
|
|
void AssignTask(int task, int npc_id, bool enforce_level_requirement);
|
|
void FailTask(int task);
|
|
bool IsTaskCompleted(int task);
|
|
bool IsTaskActive(int task);
|
|
bool IsTaskActivityActive(int task, int activity);
|
|
int GetCorpseCount();
|
|
int GetCorpseID(int corpse);
|
|
int GetCorpseItemAt(int corpse, int slot);
|
|
void AssignToInstance(int instance_id);
|
|
void Freeze();
|
|
void UnFreeze();
|
|
int GetAggroCount();
|
|
uint64 GetCarriedMoney();
|
|
uint64 GetAllMoney();
|
|
uint32 GetMoney(uint8 type, uint8 subtype);
|
|
void OpenLFGuildWindow();
|
|
void NotifyNewTitlesAvailable();
|
|
void Signal(uint32 id);
|
|
void AddAlternateCurrencyValue(uint32 currency, int amount);
|
|
void SetAlternateCurrencyValue(uint32 currency, int amount);
|
|
int GetAlternateCurrencyValue(uint32 currency);
|
|
void SendWebLink(const char *site);
|
|
bool HasSpellScribed(int spell_id);
|
|
void SetAccountFlag(std::string flag, std::string val);
|
|
std::string GetAccountFlag(std::string flag);
|
|
int GetAccountAge();
|
|
Lua_Group GetGroup();
|
|
Lua_Raid GetRaid();
|
|
bool PutItemInInventory(int slot_id, Lua_ItemInst inst);
|
|
bool PushItemOnCursor(Lua_ItemInst inst);
|
|
Lua_Inventory GetInventory();
|
|
void SendItemScale(Lua_ItemInst inst);
|
|
void QueuePacket(Lua_Packet app);
|
|
void QueuePacket(Lua_Packet app, bool ack_req);
|
|
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status);
|
|
void QueuePacket(Lua_Packet app, bool ack_req, int client_connection_status, int filter);
|
|
int GetHunger();
|
|
int GetThirst();
|
|
void SetHunger(int in_hunger);
|
|
void SetThirst(int in_thirst);
|
|
void SetConsumption(int in_hunger, int in_thirst);
|
|
void SendMarqueeMessage(uint32 type, uint32 priority, uint32 fade_in, uint32 fade_out, uint32 duration, std::string msg);
|
|
void SendColoredText(uint32 type, std::string msg);
|
|
void PlayMP3(std::string file);
|
|
void QuestReward(Lua_Mob target);
|
|
void QuestReward(Lua_Mob target, uint32 copper);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid, uint32 exp);
|
|
void QuestReward(Lua_Mob target, uint32 copper, uint32 silver, uint32 gold, uint32 platinum, uint32 itemid, uint32 exp, bool faction);
|
|
void QuestReward(Lua_Mob target, luabind::adl::object reward);
|
|
bool IsDead();
|
|
int CalcCurrentWeight();
|
|
int CalcATK();
|
|
void FilteredMessage(Mob *sender, uint32 type, int filter, const char* message);
|
|
void EnableAreaHPRegen(int value);
|
|
void DisableAreaHPRegen();
|
|
void EnableAreaManaRegen(int value);
|
|
void DisableAreaManaRegen();
|
|
void EnableAreaEndRegen(int value);
|
|
void DisableAreaEndRegen();
|
|
void EnableAreaRegens(int value);
|
|
void DisableAreaRegens();
|
|
void SetHideMe(bool hide_me_state);
|
|
void Popup(const char* title, const char* text);
|
|
void Popup(const char* title, const char* text, uint32 popup_id);
|
|
void Popup(const char* title, const char* text, uint32 popup_id, uint32 negative_id);
|
|
void Popup(const char* title, const char* text, uint32 popup_id, uint32 negative_id, uint32 button_type);
|
|
void Popup(const char* title, const char* text, uint32 popup_id, uint32 negative_id, uint32 button_type, uint32 duration);
|
|
void Popup(const char* title, const char* text, uint32 popup_id, uint32 negative_id, uint32 button_type, uint32 duration, const char* button_name_one, const char* button_name_two);
|
|
void Popup(const char* title, const char* text, uint32 popup_id, uint32 negative_id, uint32 button_type, uint32 duration, const char* button_name_one, const char* button_name_two, uint32 sound_controls);
|
|
int CountItem(uint32 item_id);
|
|
void RemoveItem(uint32 item_id);
|
|
void RemoveItem(uint32 item_id, uint32 quantity);
|
|
void SetGMStatus(uint32 newStatus);
|
|
|
|
void SetPrimaryWeaponOrnamentation(uint32 model_id);
|
|
void SetSecondaryWeaponOrnamentation(uint32 model_id);
|
|
|
|
void SetClientMaxLevel(int value);
|
|
int GetClientMaxLevel();
|
|
|
|
Lua_Expedition CreateExpedition(luabind::object expedition_info);
|
|
Lua_Expedition CreateExpedition(std::string zone_name, uint32 version, uint32 duration, std::string expedition_name, uint32 min_players, uint32 max_players);
|
|
Lua_Expedition CreateExpedition(std::string zone_name, uint32 version, uint32 duration, std::string expedition_name, uint32 min_players, uint32 max_players, bool disable_messages);
|
|
Lua_Expedition GetExpedition();
|
|
luabind::object GetExpeditionLockouts(lua_State* L);
|
|
luabind::object GetExpeditionLockouts(lua_State* L, std::string expedition_name);
|
|
std::string GetLockoutExpeditionUUID(std::string expedition_name, std::string event_name);
|
|
void AddExpeditionLockout(std::string expedition_name, std::string event_name, uint32 seconds);
|
|
void AddExpeditionLockout(std::string expedition_name, std::string event_name, uint32 seconds, std::string uuid);
|
|
void AddExpeditionLockoutDuration(std::string expedition_name, std::string event_name, int seconds);
|
|
void AddExpeditionLockoutDuration(std::string expedition_name, std::string event_name, int seconds, std::string uuid);
|
|
void RemoveAllExpeditionLockouts();
|
|
void RemoveAllExpeditionLockouts(std::string expedition_name);
|
|
void RemoveExpeditionLockout(std::string expedition_name, std::string event_name);
|
|
bool HasExpeditionLockout(std::string expedition_name, std::string event_name);
|
|
void MovePCDynamicZone(uint32 zone_id);
|
|
void MovePCDynamicZone(uint32 zone_id, int zone_version);
|
|
void MovePCDynamicZone(uint32 zone_id, int zone_version, bool msg_if_invalid);
|
|
void MovePCDynamicZone(std::string zone_name);
|
|
void MovePCDynamicZone(std::string zone_name, int zone_version);
|
|
void MovePCDynamicZone(std::string zone_name, int zone_version, bool msg_if_invalid);
|
|
void CreateTaskDynamicZone(int task_id, luabind::object dz_table);
|
|
void Fling(float value, float target_x, float target_y, float target_z);
|
|
void Fling(float value, float target_x, float target_y, float target_z, bool ignore_los);
|
|
void Fling(float value, float target_x, float target_y, float target_z, bool ignore_los, bool clipping);
|
|
};
|
|
|
|
#endif
|
|
#endif
|