mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 07:21:48 +00:00
Merge branch 'master' of https://github.com/EQEmu/Server into web_interface
# Conflicts: # zone/attack.cpp # zone/entity.cpp # zone/net.cpp # zone/worldserver.cpp # zone/zone.cpp
This commit is contained in:
commit
aa749f27dc
14
.travis.yml
14
.travis.yml
@ -1,11 +1,17 @@
|
|||||||
language: cpp
|
language: cpp
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
before_install:
|
sudo: false
|
||||||
- sudo apt-get update -qq
|
addons:
|
||||||
- sudo apt-get install -y libmysqlclient-dev libperl-dev libboost-dev liblua5.1-0-dev zlib1g-dev
|
apt:
|
||||||
|
packages:
|
||||||
|
- libmysqlclient-dev
|
||||||
|
- libperl-dev
|
||||||
|
- libboost-dev
|
||||||
|
- liblua5.1-0-dev
|
||||||
|
- zlib1g-dev
|
||||||
script:
|
script:
|
||||||
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON
|
- cmake -G "Unix Makefiles" -DEQEMU_BUILD_TESTS=ON -DEQEMU_ENABLE_BOTS=ON
|
||||||
- make
|
- make -j8
|
||||||
- ./bin/tests
|
- ./bin/tests
|
||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
#EQEMU_BUILD_LUA
|
#EQEMU_BUILD_LUA
|
||||||
#EQEMU_SANITIZE_LUA_LIBS
|
#EQEMU_SANITIZE_LUA_LIBS
|
||||||
#EQEMU_BUILD_CLIENT_FILES
|
#EQEMU_BUILD_CLIENT_FILES
|
||||||
|
#EQEMU_USE_MAP_MMFS
|
||||||
#EQEMU_MAP_DIR
|
#EQEMU_MAP_DIR
|
||||||
|
|
||||||
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
|
#We set a fairly new version (as of 2013) because I found finding perl was a bit... buggy on older ones
|
||||||
@ -277,6 +278,11 @@ IF(EQEMU_BUILD_LUA)
|
|||||||
ADD_DEFINITIONS(-DLUA_EQEMU)
|
ADD_DEFINITIONS(-DLUA_EQEMU)
|
||||||
ENDIF(EQEMU_BUILD_LUA)
|
ENDIF(EQEMU_BUILD_LUA)
|
||||||
|
|
||||||
|
OPTION(EQEMU_USE_MAP_MMFS "Create and use Zone Map MMF files." OFF)
|
||||||
|
IF(EQEMU_USE_MAP_MMFS)
|
||||||
|
ADD_DEFINITIONS(-DUSE_MAP_MMFS)
|
||||||
|
ENDIF(EQEMU_USE_MAP_MMFS)
|
||||||
|
|
||||||
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
|
SET(EQEMU_MAP_DIR "./Maps" CACHE STRING "The dir that maps, water maps, and paths are located in.")
|
||||||
|
|
||||||
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
|
ADD_DEFINITIONS(-DEQDEBUG=${EQEMU_DEBUG_LEVEL})
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
EQEmu
|
EQEmu
|
||||||
===
|
===
|
||||||
|
|
||||||
[](https://travis-ci.org/EQEmu/Server)
|
[](https://travis-ci.org/EQEmu/Server)
|
||||||
|
[](https://ci.appveyor.com/project/KimLS/server/branch/master)
|
||||||
|
|
||||||
Overview
|
Overview
|
||||||
---
|
---
|
||||||
|
|||||||
461
changelog.txt
461
changelog.txt
@ -1,5 +1,466 @@
|
|||||||
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
EQEMu Changelog (Started on Sept 24, 2003 15:50)
|
||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
== 08/14/2016 ==
|
||||||
|
mackal: Implement Linked Spell Reuse Timers
|
||||||
|
- For whatever reason this is a bit unfriendly, but that's how it is on live.
|
||||||
|
- Titanium is especially unfriendly with large differences in reuse times (ex higher canni and the first 4)
|
||||||
|
- Unsure when this went live for spells, but canni was at least linked at OoW launch
|
||||||
|
|
||||||
|
== 08/13/2016 ==
|
||||||
|
Kinglykrab: Implemented optional avoidance cap rules.
|
||||||
|
- Serves to eliminate God-like characters on custom servers with high item stats
|
||||||
|
- Rule Names:
|
||||||
|
- Character:EnableAvoidanceCap (default is false)
|
||||||
|
- Character:AvoidanceCap (default is 750, beyond 1,000 seems to make characters dodge all attacks)
|
||||||
|
|
||||||
|
== 08/02/2016 ==
|
||||||
|
Uleat: Changed 'SendZoneSpawnsBulk' behavior to use near/far criteria (live-like) when sending packets.
|
||||||
|
- Zone-to-Zone client loading will see a small decrease in time (less than 10~15%)
|
||||||
|
- World-to-Zone client loading appears to greatly benefit from this (tested 'devastation' - pre-change: ~22 seconds, post-change: 12~15 seconds)
|
||||||
|
- This change does not affect the final spawning of mobs in the client
|
||||||
|
|
||||||
|
== 07/31/2016 ==
|
||||||
|
mackal: Implement more spell gems!
|
||||||
|
- There are a few things still left to due like make dealing with losing gems nice (reset AAs, going to an older client etc)
|
||||||
|
- Sadly SoF disc release doesn't support gem 10 like one might expect :(
|
||||||
|
- So changed clients:
|
||||||
|
- SoD = 10
|
||||||
|
- UF = 12
|
||||||
|
- RoF/RoF2 = 12. I know the UI supports 16, but the client does not and can cause client crashes
|
||||||
|
- The quest APIs assume you pass a valid spell gem ...
|
||||||
|
|
||||||
|
== 07/28/2016 ==
|
||||||
|
Uleat: Implemented zone memory-mapped file usage
|
||||||
|
- Zone map files are converted to pre-loaded binary files, bypassing the (sometimes) time-consuming raw data transform process
|
||||||
|
- There are three ways to convert files:
|
||||||
|
-- Do nothing! The zone bootup process will check for a mmf file and load it, if found, or create it after the 'normal' transform process is complete
|
||||||
|
-- Use the command line option: zone convert_map <zone_name>.map (for singular conversions)
|
||||||
|
-- Drop the 'convert_maps_to_mmfs.pl' into your server directory and execute it for a batch conversion
|
||||||
|
-- Note: Any zone maps not pre-converted will be processed once a zone is booted up that does not have one
|
||||||
|
- To enable this feature, you must have the 'USE_MAP_MMFS' option checked in cmake and have built binaries on that
|
||||||
|
- To disable this feature, or if you encouter problems, disable the 'USE_MAP_MMFS' option and rebuild your binaries
|
||||||
|
- This feature will test the validity of your zlib library. If you get errors/crashes upon conversion, then your zlib1.dll is most likely suspect (check our forum for solutions)
|
||||||
|
|
||||||
|
== 07/25/2016 ==
|
||||||
|
mackal: Fix up the SpellBuff struct
|
||||||
|
- THERE MAYBE BUGS
|
||||||
|
- there shouldn't though, most of the hackery was from badly named fields causing confusion
|
||||||
|
|
||||||
|
== 07/09/2016 ==
|
||||||
|
Uleat: Important fix for mob pathing
|
||||||
|
- This should fix failed pathing issues (and high cpu usage for zone.exe) for mobs in affect zones
|
||||||
|
- Changed variable 'gridno' type from int16 to int32 to reflect actual return value of fetch (values do exceed 32767 aka int16.max)
|
||||||
|
- Precision loss from int32 to int16 conversion was causing grid id to be changed to quest controlled movement in cases where (gridno & 0x8000 == true)
|
||||||
|
|
||||||
|
== 06/28/2016 ==
|
||||||
|
Noudess: Resurrection effects now block certain buffs like on live.
|
||||||
|
Noudess: Added message about why spells are blocked (rule based)
|
||||||
|
Noudess: Added new rule: Client:UseLiveBlockedMessage
|
||||||
|
Uleat: Fix for bot inventory save failure involving items with unlimited charges
|
||||||
|
|
||||||
|
== 06/13/2016 ==
|
||||||
|
Noudess: Changes personal faction earned min/max to -2000/2000 from -3000/1200
|
||||||
|
|
||||||
|
== 06/06/2016 ==
|
||||||
|
Uleat: Reworked EQEmuDictionary to use class LookupEntry
|
||||||
|
|
||||||
|
== 06/01/2016 ==
|
||||||
|
Uleat: Implemented EQEmu::TintProfile
|
||||||
|
Uleat: Implemented EQEmu::TextureProfile
|
||||||
|
|
||||||
|
== 05/31/2016 ==
|
||||||
|
Uleat: Converted enumeration MaterialSlots to EQEmu::textures::TextureSlot
|
||||||
|
|
||||||
|
== 05/28/2016 ==
|
||||||
|
Uleat: Merged client_version and inventory_version into emu_versions files
|
||||||
|
|
||||||
|
== 05/27/2016 ==
|
||||||
|
Uleat: Renamed EQEmu::Item_Struct to EQEmu::ItemBase (and appropriate files) to coincide with new inventory naming conventions
|
||||||
|
|
||||||
|
== 05/25/2016 ==
|
||||||
|
Uleat: Renamed and moved enumeration SkillUseTypes to EQEmu::skill::SkillType - added class EQEmu::SkillProfile, though not implemented at this time
|
||||||
|
Uleat: Some more work on eq_dictionary
|
||||||
|
|
||||||
|
== 05/21/2016 ==
|
||||||
|
Uleat: Moved struct Item_Struct into namespace EQEmu along with associated enumerations - enumerations into namespace EQEmu::item (run shared_memory)
|
||||||
|
Uleat: Fixed a few possible crash points in linux builds associated with augments/ornamentations
|
||||||
|
|
||||||
|
== 05/18/2016 ==
|
||||||
|
Uleat: Changed client 'constants' files to 'limits'
|
||||||
|
|
||||||
|
== 05/10/2016 ==
|
||||||
|
Uleat: Converted client translators' 'SerializeItem()' to recursive, single buffer methodology. Titanium SerializeItem() now adds a null term between parent items instead of the invoking function
|
||||||
|
Uleat: Converted server 'BulkSendInventoryItems()' to use single buffer methodology
|
||||||
|
Uleat: Added 'ItemInst::Serialize()' overload to make use of the above single buffer methodology
|
||||||
|
|
||||||
|
== 05/08/2016 ==
|
||||||
|
Uleat: Re-coded Titanium client translator 'SerializeItem()' to use coded property assignments over file enumerated ones
|
||||||
|
|
||||||
|
== 04/22/2016 ==
|
||||||
|
Uleat: Reworked ClientVersion into namespace EQEmu; Added InventoryVersion
|
||||||
|
Uleat: Delinked current inventory slot enumeration and constants from EQEmu::constants and global definition (inv2 pre-work)
|
||||||
|
|
||||||
|
== 04/19/2016 ==
|
||||||
|
Uleat: Changed the recent EQEmu rework to eliminate the nested class design (possible cause of VS2015 update crashes - unverified)
|
||||||
|
Uleat: Some more inv2 convergence work
|
||||||
|
|
||||||
|
== 04/15/2016 ==
|
||||||
|
Uleat: Reworked EQDictionary into namespace EQEmu
|
||||||
|
|
||||||
|
== 04/08/2016 ==
|
||||||
|
Uleat: Added Heal Rotation HOTs (Heal Override Targets) that can be set for proactive healing (default HR behavior is reactive)
|
||||||
|
Uleat: Added the ability to save/load/delete Heal Rotations based on targeted member - load is automatic when ^hrcreate is used on a bot that has a saved HR entry
|
||||||
|
|
||||||
|
== 04/07/2016 ==
|
||||||
|
Uleat: Rework of eq_dictionary to facilitate inventory work
|
||||||
|
|
||||||
|
== 04/05/2016 ==
|
||||||
|
Uleat: Moved database query code out of bot.cpp and into the new BotDatabase class
|
||||||
|
|
||||||
|
== 03/25/2016 ==
|
||||||
|
Uleat: Fix for heal rotation 'Stack Overflow' error
|
||||||
|
Kayen: Defensive procs will now only proc once per attack round (instead of every attack chance).
|
||||||
|
Live like modifier added that decreases defensive proc chance if you are higher level then your attacker.
|
||||||
|
|
||||||
|
== 03/24/2016 ==
|
||||||
|
Kayen: Fix for AE taunt to use correct range and hate modifier.
|
||||||
|
Fix for spell effect version of taunt to use correct range.
|
||||||
|
Uleat: Activation of new 'Bots' command system
|
||||||
|
- You will need to re-run cmake to capture the file additions and then re-compile your server binaries
|
||||||
|
- You will also need to manually run eqemu_update.pl and select the bots update option - you should have 2 pending updates: 9001 & 9002
|
||||||
|
- The new command system is accessed with the '^' character - start with '^help' and see where that takes you
|
||||||
|
- More information can be found on the eqemu forums
|
||||||
|
|
||||||
|
== 03/05/2016 ==
|
||||||
|
mackal: Implement extra bind points (secondary recall)
|
||||||
|
For SE_Gate, base2 is which bind to use (starting at 1)
|
||||||
|
For SE_BindAffinity, base1 is which bind to set (starting at 1)
|
||||||
|
For SE_GateCastersBindpoint, base1 is which bind to use (starting at 1)
|
||||||
|
There was actually no spells that don't send to the main bind, but it uses a base1 of 1 which matches with SE_Gate
|
||||||
|
This also doesn't break anything
|
||||||
|
|
||||||
|
== 03/01/2016 ==
|
||||||
|
Uleat: Fix for LDoN treasure 'npcs' not leaving a corpse (please report any issues..)
|
||||||
|
|
||||||
|
== 02/29/2016 ==
|
||||||
|
Uleat: Change in AddItemBonuses - now includes ammo slot for skill mods only. Defined SoD- client SkillModMax packet property (client does not show..but, does enforce.)
|
||||||
|
|
||||||
|
== 02/11/2016 ==
|
||||||
|
Hateborne: Added IgnoreSpellDmgLvlRestriction rule (boolean) to ignore the 5 level spread when checking to add SpellDmg
|
||||||
|
|
||||||
|
== 02/10/2016 ==
|
||||||
|
Hateborne: Added FlatItemExtraSpellAmt rule (boolean) to allow SpellDmg on items to be added as raw damage versus scaled.
|
||||||
|
|
||||||
|
== 01/26/2016 ==
|
||||||
|
Uleat: Fix for Berserker 'Piercing' skill issues. Server Admins: If you run custom skill sets, this patch touches the code segments that you will need to modify if you have changed the default berserker 1H-/2H-piercing skill values.
|
||||||
|
Uleat (Daerath): Fix for precision-loss item weight conversions in older clients.
|
||||||
|
- WARNING: YOU MUST RE-RUN SHARED_MEMORY.EXE BEFORE STARTING SERVER OR ITEM LOSS WILL OCCUR!
|
||||||
|
- Note: Cmake must be re-run to include/exclude the required files
|
||||||
|
|
||||||
|
== 01/13/2016 ==
|
||||||
|
Kinglykrab: Modified #flag so you can refresh your target's account status (GM status level) without them having to relog.
|
||||||
|
- Just target the person whose flag you want to refresh and type #flag.
|
||||||
|
Uleat: Added itemlink functionality to the #summonitem command. Current use is limited to extracting the item id from the link.
|
||||||
|
- Invoking by item link '#summonitem Arrow' produces the same result as by item id '#summonitem 8005'
|
||||||
|
|
||||||
|
== 01/12/2016 ==
|
||||||
|
Athrogate: Adding ClearCompassMark() to Lua.
|
||||||
|
- Lua didn't have ClearCompassMark(). Perl already had this.
|
||||||
|
|
||||||
|
== 01/12/2016 ==
|
||||||
|
Uleat: Fix for tradeskill containers remaining locked after a RoF+ client leaves. Intermediary fix for RoF+ clients accessing tradeskill containers when in use by another player (thanks Natedog!)
|
||||||
|
|
||||||
|
== 12/29/2015 ==
|
||||||
|
Akkadius: Implemented standardized zone controller scripts (Rule Zone, UseZoneController) Defaulted to true
|
||||||
|
- When a zone boots, it will spawn an invisible npc by the name of zone_controller
|
||||||
|
- Lua and Perl scripts can be represented with this npc as zone_controller.pl/lua
|
||||||
|
- This NPC's ID is ruled be define ZONE_CONTROLLER_NPC_ID 10
|
||||||
|
- Two EVENT's uniquely are handled with this NPC/controller (They only work with the zone_controller NPC)
|
||||||
|
- EVENT_SPAWN_ZONE :: All NPC spawns in the zone trigger the controller and pass the following variables:
|
||||||
|
$spawned_entity_id
|
||||||
|
$spawned_npc_id
|
||||||
|
- EVENT_DEATH_ZONE :: All NPC deaths in the zone trigger the controller event and pass the following variables:
|
||||||
|
$killer_id
|
||||||
|
$killer_damage
|
||||||
|
$killer_spell
|
||||||
|
$killer_skill
|
||||||
|
$killed_npc_id
|
||||||
|
|
||||||
|
== 12/28/2015 ==
|
||||||
|
Kinglykrab: Added GetInstanceTimer() to Perl and Lua.
|
||||||
|
- Added GetInstanceTimerByID(instance_id) to Perl and Lua.
|
||||||
|
- Note: If you do not provide an instance id in the method it defaults to instance id 0 and returns 0 for time remaining.
|
||||||
|
- Added UpdateZoneHeader(type, value) to Perl and Lua.
|
||||||
|
- Note: UpdateZoneHeader allows you to manipulate fog color, fog density, and many other zone header settings on the fly in Perl and Lua.
|
||||||
|
|
||||||
|
== 12/21/2015 ==
|
||||||
|
Natedog: Updated item table fields and added a few missing fields for evolving items
|
||||||
|
-DO NOT implement Heirloom items till the inventory code is fixed to allow placing NO DROP
|
||||||
|
items in your shared bank. (but item field located on items table)
|
||||||
|
-NYI - SkillModMax: Max skill point modification from the percent mods. EX:
|
||||||
|
100% 2HSlashing (Max 50) - can only increase 2hslash by 50 MAX! (item field located though)
|
||||||
|
Kinglykrab: Added GetMeleeMitigation() for NPCs and Clients in Perl and Lua.
|
||||||
|
- This allows you to check total item, spell, and AA melee mitigation contribution.
|
||||||
|
|
||||||
|
== 12/19/2015 ==
|
||||||
|
Kinglykrab: Added many methods to Perl and Lua, list below:
|
||||||
|
- SeeInvisible()
|
||||||
|
- SeeInvisibleUndead()
|
||||||
|
- SeeHide()
|
||||||
|
- SeeImprovedHide()
|
||||||
|
- GetNimbusEffect1() - returns first nimbus effect
|
||||||
|
- GetNimbusEffect2() - returns second nimbus effect
|
||||||
|
- GetNimbusEffect3() - returns third nimbus effect
|
||||||
|
- IsTargetable()
|
||||||
|
- HasShieldEquiped()
|
||||||
|
- HasTwoHandBluntEquiped()
|
||||||
|
- HasTwoHanderEquiped()
|
||||||
|
- GetHerosForgeModel() - returns int32 Hero's Forge model
|
||||||
|
- IsEliteMaterialItem() - returns uint32 Hero's Forge Model
|
||||||
|
- GetBaseSize() - returns Mob's base size
|
||||||
|
- HasOwner()
|
||||||
|
- IsPet()
|
||||||
|
- HasPet()
|
||||||
|
- IsSilenced()
|
||||||
|
- IsAmnesiad()
|
||||||
|
|
||||||
|
== 12/16/2015 ==
|
||||||
|
Noudess: Repaired issue with Bind Wounds on someone else. Message was not coming out on client (hold still) and a bind wounds on someone already binding their wounds would interrupt their bind and make them stand. Also removed some duplicate messaging.
|
||||||
|
|
||||||
|
== 12/14/2015 ==
|
||||||
|
Kinglykrab: Added IsBlind() and IsFeared() functionality to Perl and Lua.
|
||||||
|
- Note: Both methods are Mob methods and may be used on NPCs or PCs.
|
||||||
|
Natedog: Added Discipline functions, UpdateInstanceTimer function, and UnmemSpellBySpellID to lua and perl
|
||||||
|
-Examples: http://wiki.eqemulator.org/i?M=Pastebin&Paste=BJ0ygmNM
|
||||||
|
|
||||||
|
== 12/07/2015 ==
|
||||||
|
Uleat: Command aliases are no longer handled through the command_add() function.
|
||||||
|
- To add a command alias, edit the database table `command_settings` - here, you will find three columns: `command`, `access` and `aliases`
|
||||||
|
- Adding command aliases require that the command contain an entry in `command_settings`.`command`
|
||||||
|
- Only 'real' commands go inside of the command_init() function in command.cpp .. if you wish to add aliases, you must enter them into the database
|
||||||
|
- 'Real' commands are loaded first .. then any access/alias data is loaded and applied afterwards
|
||||||
|
- Duplicate aliases will be ignored .. only the first encountered occurrence will be honored - if it does not conflict with an existing command name
|
||||||
|
- Aliases should not contain whitespace and should be '|' (pipe) delimited
|
||||||
|
- The restriction on the number of aliases has been removed .. though each alias will still be limited to the access level of the parent command
|
||||||
|
- If you need need more name space for aliases, simply edit the `command_settings` table and increase the size of the `aliases` column
|
||||||
|
- The old `commands` table has been renamed to `commands_old` for reference
|
||||||
|
- All of the current 'standard' commands have been added to the new `command_settings` table
|
||||||
|
|
||||||
|
- YOU WILL NEED TO VERIFY/IMPORT OLD ACCESS VALUES AS THIS CHANGE REVERTS ALL COMMAND ACCESS VALUES TO THEIR PEQDB DEFAULTS
|
||||||
|
|
||||||
|
== 11/30/2015 ==
|
||||||
|
Uleat: Changed criteria for a few bots scripts from count to null/not null in hopes of fixing special case failures
|
||||||
|
|
||||||
|
== 11/22/2015 ==
|
||||||
|
Uleat: Fix for loginserver project compile failure
|
||||||
|
|
||||||
|
== 11/7/2015 ==
|
||||||
|
Akkadius: Implemented #repopclose [distance in units] - Used for development purposes, defaults to 500 units
|
||||||
|
- Real case use: Large zones with 700 NPC's and you are making fast quick tweaks to nearby NPC's you can refresh just the NPC's around you instead of all in the zone
|
||||||
|
- This can be quite the time saver
|
||||||
|
- This command will depop all NPC's and only respawn the NPC's that are 500 units around you or unless you specify otherwise
|
||||||
|
|
||||||
|
== 11/2/2015 ==
|
||||||
|
Akkadius: Performance boost (exponential) - Adjusted default idle cast check timers in rules
|
||||||
|
- Spells:AI_IdleNoSpellMinRecast 500 (Now 6000) 6 seconds
|
||||||
|
- Spells:AI_IdleNoSpellMaxRecast 2000 (Now 60000) 60 seconds
|
||||||
|
- Database version 9089 will take care of this update automatically only if you used the default values
|
||||||
|
- The CPU cost of NPC's checking the entire entity list to cast beneficial spells (Heals/Buffs) becomes extremely high when higher NPC count zones exist (Based off of process profiling)
|
||||||
|
- Distance checks for every single NPC to every single other NPC who are casting beneficial spells occur every .5 - 2 seconds unless npc_spells dictates other values, which most of the time it does not
|
||||||
|
- Zones that once fluctuated from 1-8% CPU with no activity (Idle but players present) now idle at .5% based on my testings due
|
||||||
|
to this change in conjunction with the past few performance commits, these are zones that have 600-800 NPC's in them
|
||||||
|
- These values normally are overidden by the spells table (npc_spells), fields (idle_no_sp_recast_min, idle_no_sp_recast_max)
|
||||||
|
|
||||||
|
== 11/1/2015 ==
|
||||||
|
Akkadius: Made many performance optimizing oriented code changes in the source
|
||||||
|
- Added Rate limit the rate in which signals are processed for NPC's (.5 seconds instead of .01 seconds)
|
||||||
|
Akkadius: Added Perl Export Settings which should heavily reduce the Perl footprint
|
||||||
|
- Normally when any sub EVENT_ gets triggered, all kinds of variables have to get exported every single time an event is triggered and
|
||||||
|
this can make Perl very slow when events are triggered constantly
|
||||||
|
- The two most taxing variable exports are the item variables ($itemcount{} $hasitem{} $oncursor{}) and qglobals ($qglobals{})
|
||||||
|
- qglobals can pose to be an issue quickly when global qglobals build up, it is highly recommend to use the GetGlobal() and SetGlobal()
|
||||||
|
methods instead as they don't reference the hashmap $qglobals{} that is rebuilt every single time a sub event is triggered
|
||||||
|
- A stress test conducted with 10,000 samples shows an excess of time taken to export variables: http://i.imgur.com/NEpW1tS.png
|
||||||
|
- After the Perl Export Settings table is implemented, and all exports are shut off you see the following test result:
|
||||||
|
http://i.imgur.com/Du5hth9.png
|
||||||
|
- The difference of eliminating uneeded exports brings the overhead and footprint of 10,000 triggers from 54 seconds to 2 seconds
|
||||||
|
- In a 10,000 sample test (10,000 sub event triggers), exporting item variables adds 12 seconds alone, when item variables are only needed in
|
||||||
|
EVENT_ITEM and EVENT_SAY a majority of the time if at all
|
||||||
|
- In a 10,000 sample test (10,000 sub event triggers), exporting qglobals with approximately 1,000 global qglobals in the database creates
|
||||||
|
about 11-20 seconds of delay on its own (Depending on hardware of course)
|
||||||
|
- I've written a parser that has determined which of these exports are needed in which sub routines and have turned off all of the unneeded
|
||||||
|
exports in sub routines that do not need them and used it to create the default table that will be installed in the database.
|
||||||
|
- The export table is called 'perl_event_export_settings' and it resembles the following structure and contains all current 81 EVENTS
|
||||||
|
- If an entry doesn't exist in this table and a new subroutine is added to the source, all exports will be on by default for that routine
|
||||||
|
|
||||||
|
+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
|
||||||
|
| event_id | event_description | export_qglobals | export_mob | export_zone | export_item | export_event |
|
||||||
|
+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
|
||||||
|
| 0 | EVENT_SAY | 1 | 1 | 1 | 1 | 1 |
|
||||||
|
| 1 | EVENT_ITEM | 1 | 1 | 1 | 0 | 1 |
|
||||||
|
| 2 | EVENT_DEATH | 1 | 1 | 1 | 0 | 1 |
|
||||||
|
| 3 | EVENT_SPAWN | 1 | 1 | 1 | 0 | 1 |
|
||||||
|
| 4 | EVENT_ATTACK | 0 | 1 | 1 | 0 | 1 |
|
||||||
|
| 5 | EVENT_COMBAT | 1 | 1 | 1 | 0 | 1 |
|
||||||
|
+----------+-----------------------------------------+-----------------+------------+-------------+-------------+--------------+
|
||||||
|
|
||||||
|
- If a change is made to this table while the server is live and running, you can hot reload all zone process settings via:
|
||||||
|
#reloadperlexportsettings
|
||||||
|
- For those who wonder what "exports" are, they are reference to variables that are made available at runtime of the sub event, such as:
|
||||||
|
(export_qglobals) (Heavy) : $qglobals https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L916
|
||||||
|
(export_item) (Heavy) : $itemcount{} $hasitem{} $oncursor{} https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1103
|
||||||
|
(export_zone) : $zoneid, $instanceid, $zoneln etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1083
|
||||||
|
(export_mob) : $x, $y, $z, $h, $hpratio etc. https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1032
|
||||||
|
(export_event) : (event specific) IE: EVENT_SAY ($text) https://github.com/EQEmu/Server/blob/master/zone/embparser.cpp#L1141
|
||||||
|
|
||||||
|
== 10/16/2015 ==
|
||||||
|
Uleat: Added command '#bot clearfollowdistance [ <target> | spawned | all ]' to coincide with the activation of the load/save feature for follow_distance
|
||||||
|
|
||||||
|
== 10/13/2015 ==
|
||||||
|
Uleat: Important update to 2015_09_30_bots.sql - fix for orphaned entries causing crashes during the conversion process
|
||||||
|
Note: Please visit the thread below if you encounter issues during the conversion process
|
||||||
|
|
||||||
|
== 10/12/2015 ==
|
||||||
|
Uleat: Implemented 'bots' database versioning
|
||||||
|
Note: See thread for more information: http://www.eqemulator.org/forums/showthread.php?t=40091
|
||||||
|
|
||||||
|
Kayen: Feign death will now break when hit by casted spells, consisted with live.
|
||||||
|
Implemented suport for AA/spell effect which provides a chance to avoid FD breaking from spells.
|
||||||
|
|
||||||
|
== 10/10/2015 ==
|
||||||
|
Kayen: Updated mechanics to be consistent with live regarding how invisible breaks when the client is the target of a spell.
|
||||||
|
Invisible will drop whenever a client is hit with a detrimental spell, regardless of if resisted, if it does damage or AOE.
|
||||||
|
Hide skill now also follows the same rules as above.
|
||||||
|
Implemented support for Rogue AA - Nerves of Steel which gives a chance for hide NOT to break
|
||||||
|
when client is hit with an AOE spell.
|
||||||
|
|
||||||
|
== 09/25/2015 ==
|
||||||
|
Uleat: Implemented 'Inventory Snapshot' feature to track online player inventories at timed intervals.
|
||||||
|
rules:
|
||||||
|
'Character:ActiveInvSnapshots' - active (true) or inactive (false - default)
|
||||||
|
'Character:InvSnapshotMinIntervalM' - minimum time between snapshots (in minutes)
|
||||||
|
'Character:InvSnapshotMinRetryM' - minimum time to attempt a retry after a failed snapshot (in minutes)
|
||||||
|
'Character:InvSnapshotHistoryD' - minimum time to keep snapshot entries (in days)
|
||||||
|
commands:
|
||||||
|
'#invsnapshot' - Takes a snapshot of target client's inventory (feature active or inactive)
|
||||||
|
'#clearinvsnapshots [use rule]' - Clears snapshot entries based on bool argument ([true] - honors the 'InvSnapshotHistoryD' rule, [false] - erases all)
|
||||||
|
|
||||||
|
== 08/02/2015 ==
|
||||||
|
Shendare: VS2013 query StringFormat glitches when "%f" is passed for the int GetRunSpeed().
|
||||||
|
Shendare: In CreateNewNPCCommand(), the npc_type_id and spawngroupid are created in the database, but never set in the spawn class, so later it can't delete them with #npcspawn remove or #npcspawn delete.
|
||||||
|
|
||||||
|
== 07/27/2015 ==
|
||||||
|
Uleat: Reworked the QS Audit code in Handle_OP_ShopPlayerBuy (\zone\client_packet.cpp) to help eliminate potential for exception errors
|
||||||
|
|
||||||
|
== 07/22/2015 ==
|
||||||
|
mackal: Corrected some hate value calcs based on updated http://www.eqemulator.org/forums/showthread.php?t=39819
|
||||||
|
|
||||||
|
Rule Aggro:MaxStunProcAggro to Aggro:MaxScalingProcAggro since the cap applies to more than stuns
|
||||||
|
|
||||||
|
== 07/16/2015 ==
|
||||||
|
mackal: Rework spell aggro based on http://www.eqemulator.org/forums/showthread.php?t=39819
|
||||||
|
|
||||||
|
== 07/15/2015 ==
|
||||||
|
Hateborne: Added optional ability to enforce task level requirements in perl and lua via an added, optional parameter to $client->AssignTask and quest::assigntask.
|
||||||
|
Use cases:
|
||||||
|
quest::assigntask(703); # this still assigns the task as normal, no functional change
|
||||||
|
quest::assigntask(703, 1); # this will assign the task, provided the character meets the db-stored level requirements
|
||||||
|
$client->AssignTask(703, $npc->GetID()); # still assigns the task as normal, no functional change
|
||||||
|
$client->AssignTask(703, $npc->GetID(), 1); # this will assign the task, provided the character meets the db-stored level requirements
|
||||||
|
== 07/06/2015 ==
|
||||||
|
mackal: Implement Triple Attack Skill
|
||||||
|
Parses showed about rand(1000) for the chance, may need more investigating
|
||||||
|
Corrected Double Attack chances as well
|
||||||
|
Running optional 2015_07_06_TripleAttack.sql will set current toons to their max skill
|
||||||
|
This is optional because the admins might want to go a different route.
|
||||||
|
|
||||||
|
== 07/05/2015 ==
|
||||||
|
mackal: Rewrite NPC combat attack round logic
|
||||||
|
An NPC "quading" is really just an NPC with innate dual wield that doubles on both hands
|
||||||
|
The old rules allowed NPCs to hit 6 times in one round
|
||||||
|
NPCs also seem to have their own skill progression for DW/DA
|
||||||
|
See: http://www.eqemulator.org/forums/showthread.php?t=38708
|
||||||
|
You can set Combat:UseLiveCombatRounds to false to use the old rules
|
||||||
|
PC Double Attack rates kind of follow the same thing but still needs to be implemented
|
||||||
|
Kinglykrab: WARNING: summonburriedplayercorpse is now summonburiedplayercorpse, getplayerburriedcorpsecount is now getplayerburiedcorpsecount, summon_burried_player_corpse is now summon_buried_player_corpse, and get_player_burried_corpse_count is now get_player_buried_corpse_count FIX THESE IN YOUR SCRIPTS OR THEY WILL NOT WORK!!!!
|
||||||
|
Added bot saylinks (thanks Uleat!)
|
||||||
|
Command aliases for #augmentitem (#aug), #findnpctype (#fn), #findspell (#fs)
|
||||||
|
Bot command changes: #bot sow -> #bot speed, #bot magepet -> #bot setpet, #bot resurrectme -> #bot resurrect
|
||||||
|
Changed all occurrences of burried to buried in the code.
|
||||||
|
client_packet.cpp was referencing old columns in character_corpses, not sure how we didn't already see this before.
|
||||||
|
|
||||||
|
== 7/4/2015 ==
|
||||||
|
mackal: Reworked the activated avoidace skills (riposte, dodge, etc) based on dev quotes
|
||||||
|
This also fixes the order things are checked (avoidance skills, THEN hit/miss)
|
||||||
|
Also riposte immunity from the increase riposte chance spell effect.
|
||||||
|
|
||||||
|
== 7/2/2015 ==
|
||||||
|
KLS/Demonstar55: AA system has been rewritten fixing a ton of bugs and extending functionality while making it easier to create new AA points.
|
||||||
|
KLS/Demonstar55: New tables are needed and so older data will need to be migrated to the new system.
|
||||||
|
KLS/Demonstar55: The SQL saves the old aa points spent/avail/character_alt_abilities data if any server ops want to do something different than PEQ did with it.
|
||||||
|
KLS/Demonstar55: Will try to get a wiki entry written up next week some time explaining the system but it's really not hard to follow the db tables in the meantime.
|
||||||
|
|
||||||
|
== 7/1/2015 ==
|
||||||
|
Akkadius: Fix an issue where emote messages would overflow the buffer of 256 by increasing the size and changing some of the initialization
|
||||||
|
Akkadius: Added a custom Health Update message that will display in the middle of the players screen, to enable this server wide you must enable rule 'Character:MarqueeHPUpdates'
|
||||||
|
Example: https://www.youtube.com/watch?v=KUVdbPxLIn0
|
||||||
|
Akkadius: (Haynar) Fixed some runspeed issues with Perl and LUA scripts
|
||||||
|
Akkadius: (Haynar) Updated #showstats and #npcstats for new speed calcs to display speeds again in familiar float format.
|
||||||
|
Akkadius: (Haynar) Improved client movement while AI Controlled, such as feared and charmed. Movement will be much smoother from clients perspective.
|
||||||
|
|
||||||
|
== 06/12/2015 ==
|
||||||
|
Uleat: Adjusted SessionStats to better reflect a sister implementation
|
||||||
|
|
||||||
|
== 06/07/2015 ==
|
||||||
|
Uleat: Implemented optional rule for using disenchanted bags. Action triggers at the same point that temporary items are removed.
|
||||||
|
Optional SQL: utils/sql/git/optional/2015_06_07_TransformSummonedBagsRule.sql
|
||||||
|
mackal: changes to AA packets since more fields have been identified
|
||||||
|
mackal: fix exploit with expendable AAs punching holes in the aa_array and staying around longer than they are welcomed
|
||||||
|
|
||||||
|
== 05/25/2015 ==
|
||||||
|
Akkadius: Implemented disjointed zone based time, this can be triggered via quest methods
|
||||||
|
Akkadius: Added parameter to LUA and Perl method settime(hour, minute, [update_world = true])
|
||||||
|
- If update_world is false, the zone will then unsubscribe itself from regular worldserver time synchronizations
|
||||||
|
- Basically this localizes the zones time and keeps it from syncing with world updates
|
||||||
|
Akkadius: Added DB ver 9082 with update to add npc_types texture columns if table does not currently have them
|
||||||
|
|
||||||
|
== 05/22/2015 ==
|
||||||
|
Uleat: Added null-term declaration for character names in ENCODE(OP_CharInfo) - where appropriate
|
||||||
|
|
||||||
|
== 05/20/2015 ==
|
||||||
|
demonstar55: Bard instrument mods should be more consistent with live. Zoning will keep instrument mod for long duration buffs (selo's)
|
||||||
|
Still need to have procs/doom effects to inherit the instrument mods from their source buff/whatever
|
||||||
|
|
||||||
|
== 05/18/2015 ==
|
||||||
|
KLS: Changed how fishing locates water to hopefully be a bit more accurate at the expense of a bit more cpu power per line cast.
|
||||||
|
|
||||||
|
== 05/15/2015 ==
|
||||||
|
Uleat: Added check to EntityList::CheckSpawnQueue() to bypass dereference if returned iterator is npc_list.end() - should fix the debug assertion failure crash
|
||||||
|
|
||||||
|
== 04/30/2015 ==
|
||||||
|
demonstar55: Implement mob and client melee push
|
||||||
|
You can set Combat:MeleePush to false to turn off or change Combat:MeleePushChance to increase the chance an NPC can be pushed
|
||||||
|
PCs are always pushed, need to do more testing to verify.
|
||||||
|
|
||||||
|
== 04/22/2015 ==
|
||||||
|
Uleat: Probable fix for 'Debug Assertion Failure' in Client::GarbleMessage() when calling the 'isalpha' macro.
|
||||||
|
ref: https://connect.microsoft.com/VisualStudio/feedback/details/932876/calling-isdigit-with-a-signed-char-1-results-in-a-assert-failure-in-debug-compiles
|
||||||
|
|
||||||
|
== 03/29/2015 ==
|
||||||
|
Secrets: Identified the Target Ring fields for RoF/RoF2.
|
||||||
|
Secrets: Added a perl accessor for the last target ring position received from the client. Usage: $client->GetTargetRingX(), $client->GetTargetRingY(), $client->GetTargetRingZ()
|
||||||
|
|
||||||
|
== 03/12/2015 ==
|
||||||
|
Akkadius: [eqemu_update.pl V7] Add Option 9) LUA Modules - Download latest LUA Modules (Required for Lua)
|
||||||
|
|
||||||
|
== 03/11/2015 ==
|
||||||
|
Akkadius: [eqemu_update.pl] Add Option 7) Plugins - Download latest Perl plugins
|
||||||
|
Akkadius: [eqemu_update.pl] Add Option 8) Quests - Download latest PEQ quests and stage updates
|
||||||
|
Akkadius: [eqemu_update.pl] Set version 5 of script
|
||||||
|
|
||||||
|
== 03/10/2015 ==
|
||||||
|
Akkadius: [eqemu_update.pl] Add Option 6) Download Latest map and water files
|
||||||
|
|
||||||
== 03/04/2015 ==
|
== 03/04/2015 ==
|
||||||
Akkadius: Fix Spell Book Deletion
|
Akkadius: Fix Spell Book Deletion
|
||||||
|
|
||||||
|
|||||||
@ -32,6 +32,7 @@ EQEmuLogSys Log;
|
|||||||
void ExportSpells(SharedDatabase *db);
|
void ExportSpells(SharedDatabase *db);
|
||||||
void ExportSkillCaps(SharedDatabase *db);
|
void ExportSkillCaps(SharedDatabase *db);
|
||||||
void ExportBaseData(SharedDatabase *db);
|
void ExportBaseData(SharedDatabase *db);
|
||||||
|
void ExportDBStrings(SharedDatabase *db);
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
RegisterExecutablePlatform(ExePlatformClientExport);
|
RegisterExecutablePlatform(ExePlatformClientExport);
|
||||||
@ -44,12 +45,12 @@ int main(int argc, char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQEmuConfig *config = EQEmuConfig::get();
|
auto Config = EQEmuConfig::get();
|
||||||
|
|
||||||
SharedDatabase database;
|
SharedDatabase database;
|
||||||
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
||||||
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
|
if(!database.Connect(Config->DatabaseHost.c_str(), Config->DatabaseUsername.c_str(),
|
||||||
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
|
Config->DatabasePassword.c_str(), Config->DatabaseDB.c_str(), Config->DatabasePort)) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
|
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
|
||||||
"database connection");
|
"database connection");
|
||||||
return 1;
|
return 1;
|
||||||
@ -62,6 +63,7 @@ int main(int argc, char **argv) {
|
|||||||
ExportSpells(&database);
|
ExportSpells(&database);
|
||||||
ExportSkillCaps(&database);
|
ExportSkillCaps(&database);
|
||||||
ExportBaseData(&database);
|
ExportBaseData(&database);
|
||||||
|
ExportDBStrings(&database);
|
||||||
|
|
||||||
Log.CloseFileLogs();
|
Log.CloseFileLogs();
|
||||||
|
|
||||||
@ -194,7 +196,38 @@ void ExportBaseData(SharedDatabase *db) {
|
|||||||
|
|
||||||
fprintf(f, "%s\n", line.c_str());
|
fprintf(f, "%s\n", line.c_str());
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ExportDBStrings(SharedDatabase *db) {
|
||||||
|
Log.Out(Logs::General, Logs::Status, "Exporting DB Strings...");
|
||||||
|
|
||||||
|
FILE *f = fopen("export/dbstr_us.txt", "w");
|
||||||
|
if(!f) {
|
||||||
|
Log.Out(Logs::General, Logs::Error, "Unable to open export/dbstr_us.txt to write, skipping.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "Major^Minor^String(New)\n");
|
||||||
|
const std::string query = "SELECT * FROM db_str ORDER BY id, type";
|
||||||
|
auto results = db->QueryDatabase(query);
|
||||||
|
if(results.Success()) {
|
||||||
|
for(auto row = results.begin(); row != results.end(); ++row) {
|
||||||
|
std::string line;
|
||||||
|
unsigned int fields = results.ColumnCount();
|
||||||
|
for(unsigned int rowIndex = 0; rowIndex < fields; ++rowIndex) {
|
||||||
|
if(rowIndex != 0)
|
||||||
|
line.push_back('^');
|
||||||
|
|
||||||
|
if(row[rowIndex] != nullptr) {
|
||||||
|
line += row[rowIndex];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fprintf(f, "%s\n", line.c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|||||||
@ -30,6 +30,7 @@ EQEmuLogSys Log;
|
|||||||
void ImportSpells(SharedDatabase *db);
|
void ImportSpells(SharedDatabase *db);
|
||||||
void ImportSkillCaps(SharedDatabase *db);
|
void ImportSkillCaps(SharedDatabase *db);
|
||||||
void ImportBaseData(SharedDatabase *db);
|
void ImportBaseData(SharedDatabase *db);
|
||||||
|
void ImportDBStrings(SharedDatabase *db);
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
RegisterExecutablePlatform(ExePlatformClientImport);
|
RegisterExecutablePlatform(ExePlatformClientImport);
|
||||||
@ -42,12 +43,12 @@ int main(int argc, char **argv) {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const EQEmuConfig *config = EQEmuConfig::get();
|
auto Config = EQEmuConfig::get();
|
||||||
|
|
||||||
SharedDatabase database;
|
SharedDatabase database;
|
||||||
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
Log.Out(Logs::General, Logs::Status, "Connecting to database...");
|
||||||
if(!database.Connect(config->DatabaseHost.c_str(), config->DatabaseUsername.c_str(),
|
if(!database.Connect(Config->DatabaseHost.c_str(), Config->DatabaseUsername.c_str(),
|
||||||
config->DatabasePassword.c_str(), config->DatabaseDB.c_str(), config->DatabasePort)) {
|
Config->DatabasePassword.c_str(), Config->DatabaseDB.c_str(), Config->DatabasePort)) {
|
||||||
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
|
Log.Out(Logs::General, Logs::Error, "Unable to connect to the database, cannot continue without a "
|
||||||
"database connection");
|
"database connection");
|
||||||
return 1;
|
return 1;
|
||||||
@ -59,6 +60,7 @@ int main(int argc, char **argv) {
|
|||||||
ImportSpells(&database);
|
ImportSpells(&database);
|
||||||
ImportSkillCaps(&database);
|
ImportSkillCaps(&database);
|
||||||
ImportBaseData(&database);
|
ImportBaseData(&database);
|
||||||
|
ImportDBStrings(&database);
|
||||||
|
|
||||||
Log.CloseFileLogs();
|
Log.CloseFileLogs();
|
||||||
|
|
||||||
@ -202,7 +204,6 @@ void ImportSkillCaps(SharedDatabase *db) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int class_id, skill_id, level, cap;
|
int class_id, skill_id, level, cap;
|
||||||
class_id = atoi(split[0].c_str());
|
class_id = atoi(split[0].c_str());
|
||||||
skill_id = atoi(split[1].c_str());
|
skill_id = atoi(split[1].c_str());
|
||||||
@ -262,3 +263,56 @@ void ImportBaseData(SharedDatabase *db) {
|
|||||||
|
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ImportDBStrings(SharedDatabase *db) {
|
||||||
|
Log.Out(Logs::General, Logs::Status, "Importing DB Strings...");
|
||||||
|
|
||||||
|
FILE *f = fopen("import/dbstr_us.txt", "r");
|
||||||
|
if(!f) {
|
||||||
|
Log.Out(Logs::General, Logs::Error, "Unable to open import/dbstr_us.txt to read, skipping.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string delete_sql = "DELETE FROM db_str";
|
||||||
|
db->QueryDatabase(delete_sql);
|
||||||
|
|
||||||
|
char buffer[2048];
|
||||||
|
bool first = true;
|
||||||
|
while(fgets(buffer, 2048, f)) {
|
||||||
|
if(first) {
|
||||||
|
first = false;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int i = 0; i < 2048; ++i) {
|
||||||
|
if(buffer[i] == '\n') {
|
||||||
|
buffer[i] = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
auto split = SplitString(buffer, '^');
|
||||||
|
|
||||||
|
if(split.size() < 2) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string sql;
|
||||||
|
int id, type;
|
||||||
|
std::string value;
|
||||||
|
|
||||||
|
id = atoi(split[0].c_str());
|
||||||
|
type = atoi(split[1].c_str());
|
||||||
|
|
||||||
|
if(split.size() >= 3) {
|
||||||
|
value = ::EscapeString(split[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
sql = StringFormat("INSERT INTO db_str(id, type, value) VALUES(%u, %u, '%s')",
|
||||||
|
id, type, value.c_str());
|
||||||
|
|
||||||
|
db->QueryDatabase(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(f);
|
||||||
|
}
|
||||||
|
|||||||
@ -21,6 +21,12 @@ IF(MYSQL_ROOT)
|
|||||||
NAMES mysql.h
|
NAMES mysql.h
|
||||||
PATHS ${MYSQL_ROOT}/include
|
PATHS ${MYSQL_ROOT}/include
|
||||||
PATH_SUFFIXES mysql
|
PATH_SUFFIXES mysql
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
FIND_PATH(MySQL_INCLUDE_DIR
|
||||||
|
NAMES mysql.h
|
||||||
|
PATH_SUFFIXES mysql
|
||||||
)
|
)
|
||||||
ELSE(MYSQL_ROOT)
|
ELSE(MYSQL_ROOT)
|
||||||
FIND_PATH(MySQL_INCLUDE_DIR
|
FIND_PATH(MySQL_INCLUDE_DIR
|
||||||
@ -30,49 +36,46 @@ ELSE(MYSQL_ROOT)
|
|||||||
ENDIF(MYSQL_ROOT)
|
ENDIF(MYSQL_ROOT)
|
||||||
|
|
||||||
# Library
|
# Library
|
||||||
SET(MySQL_NAMES mysqlclient_r mysqlclient)
|
SET(MySQL_NAMES libmysql)
|
||||||
IF(MYSQL_ROOT)
|
IF(MYSQL_ROOT)
|
||||||
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
|
FIND_LIBRARY(MySQL_LIBRARY
|
||||||
NAMES ${MySQL_NAMES}
|
NAMES ${MySQL_NAMES}
|
||||||
PATHS ${MYSQL_ROOT}/lib/debug /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
PATHS ${MYSQL_ROOT}/lib
|
||||||
PATH_SUFFIXES mysql
|
PATH_SUFFIXES mysql
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
)
|
)
|
||||||
|
|
||||||
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
|
FIND_LIBRARY(MySQL_LIBRARY
|
||||||
NAMES ${MySQL_NAMES}
|
NAMES ${MySQL_NAMES}
|
||||||
PATHS ${MYSQL_ROOT}/lib /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
|
||||||
PATH_SUFFIXES mysql
|
PATH_SUFFIXES mysql
|
||||||
)
|
)
|
||||||
ELSE(MYSQL_ROOT)
|
ELSE(MYSQL_ROOT)
|
||||||
FIND_LIBRARY(MySQL_LIBRARY_DEBUG
|
FIND_LIBRARY(MySQL_LIBRARY
|
||||||
NAMES ${MySQL_NAMES}
|
NAMES ${MySQL_NAMES} mysqlclient_r mysqlclient
|
||||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
|
||||||
PATH_SUFFIXES mysql
|
|
||||||
)
|
|
||||||
|
|
||||||
FIND_LIBRARY(MySQL_LIBRARY_RELEASE
|
|
||||||
NAMES ${MySQL_NAMES}
|
|
||||||
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
|
||||||
PATH_SUFFIXES mysql
|
PATH_SUFFIXES mysql
|
||||||
)
|
)
|
||||||
ENDIF(MYSQL_ROOT)
|
ENDIF(MYSQL_ROOT)
|
||||||
|
|
||||||
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
|
IF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||||
SET(MySQL_FOUND TRUE)
|
SET(MySQL_FOUND TRUE)
|
||||||
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
|
SET( MySQL_LIBRARIES ${MySQL_LIBRARY} )
|
||||||
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
|
ELSE (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||||
SET(MySQL_FOUND FALSE)
|
SET(MySQL_FOUND FALSE)
|
||||||
SET( MySQL_LIBRARIES )
|
SET( MySQL_LIBRARIES )
|
||||||
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY_DEBUG AND MySQL_LIBRARY_RELEASE)
|
ENDIF (MySQL_INCLUDE_DIR AND MySQL_LIBRARY)
|
||||||
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments and set MySQL_FOUND to TRUE if
|
# handle the QUIETLY and REQUIRED arguments and set MySQL_FOUND to TRUE if
|
||||||
# all listed variables are TRUE
|
# all listed variables are TRUE
|
||||||
INCLUDE(FindPackageHandleStandardArgs)
|
INCLUDE(FindPackageHandleStandardArgs)
|
||||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY_DEBUG MySQL_LIBRARY_RELEASE MySQL_INCLUDE_DIR)
|
FIND_PACKAGE_HANDLE_STANDARD_ARGS(MySQL DEFAULT_MSG MySQL_LIBRARY MySQL_INCLUDE_DIR)
|
||||||
|
|
||||||
IF(MySQL_FOUND)
|
IF(MySQL_FOUND)
|
||||||
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_DEBUG} ${MySQL_LIBRARY_RELEASE} )
|
SET( MySQL_LIBRARY_RELEASE ${MySQL_LIBRARY} )
|
||||||
|
SET( MySQL_LIBRARY_DEBUG ${MySQL_LIBRARY} )
|
||||||
|
SET( MySQL_LIBRARIES ${MySQL_LIBRARY_RELEASE} ${MySQL_LIBRARY_DEBUG} )
|
||||||
ELSE(MySQL_FOUND)
|
ELSE(MySQL_FOUND)
|
||||||
SET( MySQL_LIBRARIES )
|
SET( MySQL_LIBRARIES )
|
||||||
ENDIF(MySQL_FOUND)
|
ENDIF(MySQL_FOUND)
|
||||||
|
|||||||
@ -11,15 +11,20 @@ SET(common_sources
|
|||||||
database_conversions.cpp
|
database_conversions.cpp
|
||||||
database_instances.cpp
|
database_instances.cpp
|
||||||
dbcore.cpp
|
dbcore.cpp
|
||||||
|
deity.cpp
|
||||||
|
emu_constants.cpp
|
||||||
|
emu_legacy.cpp
|
||||||
|
emu_limits.cpp
|
||||||
emu_opcodes.cpp
|
emu_opcodes.cpp
|
||||||
emu_tcp_connection.cpp
|
emu_tcp_connection.cpp
|
||||||
emu_tcp_server.cpp
|
emu_tcp_server.cpp
|
||||||
eq_dictionary.cpp
|
emu_versions.cpp
|
||||||
eqdb.cpp
|
eqdb.cpp
|
||||||
eqdb_res.cpp
|
eqdb_res.cpp
|
||||||
eqemu_exception.cpp
|
eqemu_exception.cpp
|
||||||
eqemu_config.cpp
|
eqemu_config.cpp
|
||||||
eqemu_logsys.cpp
|
eqemu_logsys.cpp
|
||||||
|
eq_limits.cpp
|
||||||
eq_packet.cpp
|
eq_packet.cpp
|
||||||
eq_stream.cpp
|
eq_stream.cpp
|
||||||
eq_stream_factory.cpp
|
eq_stream_factory.cpp
|
||||||
@ -32,7 +37,10 @@ SET(common_sources
|
|||||||
guilds.cpp
|
guilds.cpp
|
||||||
ipc_mutex.cpp
|
ipc_mutex.cpp
|
||||||
item.cpp
|
item.cpp
|
||||||
|
item_base.cpp
|
||||||
|
light_source.cpp
|
||||||
md5.cpp
|
md5.cpp
|
||||||
|
memory_buffer.cpp
|
||||||
memory_mapped_file.cpp
|
memory_mapped_file.cpp
|
||||||
misc.cpp
|
misc.cpp
|
||||||
misc_functions.cpp
|
misc_functions.cpp
|
||||||
@ -51,6 +59,7 @@ SET(common_sources
|
|||||||
races.cpp
|
races.cpp
|
||||||
rdtsc.cpp
|
rdtsc.cpp
|
||||||
rulesys.cpp
|
rulesys.cpp
|
||||||
|
say_link.cpp
|
||||||
serverinfo.cpp
|
serverinfo.cpp
|
||||||
shareddb.cpp
|
shareddb.cpp
|
||||||
skills.cpp
|
skills.cpp
|
||||||
@ -59,6 +68,7 @@ SET(common_sources
|
|||||||
struct_strategy.cpp
|
struct_strategy.cpp
|
||||||
tcp_connection.cpp
|
tcp_connection.cpp
|
||||||
tcp_server.cpp
|
tcp_server.cpp
|
||||||
|
textures.cpp
|
||||||
timeoutmgr.cpp
|
timeoutmgr.cpp
|
||||||
timer.cpp
|
timer.cpp
|
||||||
unix.cpp
|
unix.cpp
|
||||||
@ -69,11 +79,17 @@ SET(common_sources
|
|||||||
platform.cpp
|
platform.cpp
|
||||||
patches/patches.cpp
|
patches/patches.cpp
|
||||||
patches/sod.cpp
|
patches/sod.cpp
|
||||||
|
patches/sod_limits.cpp
|
||||||
patches/sof.cpp
|
patches/sof.cpp
|
||||||
|
patches/sof_limits.cpp
|
||||||
patches/rof.cpp
|
patches/rof.cpp
|
||||||
|
patches/rof_limits.cpp
|
||||||
patches/rof2.cpp
|
patches/rof2.cpp
|
||||||
|
patches/rof2_limits.cpp
|
||||||
patches/titanium.cpp
|
patches/titanium.cpp
|
||||||
|
patches/titanium_limits.cpp
|
||||||
patches/uf.cpp
|
patches/uf.cpp
|
||||||
|
patches/uf_limits.cpp
|
||||||
SocketLib/Base64.cpp
|
SocketLib/Base64.cpp
|
||||||
SocketLib/File.cpp
|
SocketLib/File.cpp
|
||||||
SocketLib/HttpdCookies.cpp
|
SocketLib/HttpdCookies.cpp
|
||||||
@ -106,12 +122,15 @@ SET(common_headers
|
|||||||
database.h
|
database.h
|
||||||
dbcore.h
|
dbcore.h
|
||||||
deity.h
|
deity.h
|
||||||
|
emu_constants.h
|
||||||
|
emu_legacy.h
|
||||||
|
emu_limits.h
|
||||||
emu_opcodes.h
|
emu_opcodes.h
|
||||||
emu_oplist.h
|
emu_oplist.h
|
||||||
emu_tcp_connection.h
|
emu_tcp_connection.h
|
||||||
emu_tcp_server.h
|
emu_tcp_server.h
|
||||||
|
emu_versions.h
|
||||||
eq_constants.h
|
eq_constants.h
|
||||||
eq_dictionary.h
|
|
||||||
eq_packet_structs.h
|
eq_packet_structs.h
|
||||||
eqdb.h
|
eqdb.h
|
||||||
eqdb_res.h
|
eqdb_res.h
|
||||||
@ -119,6 +138,7 @@ SET(common_headers
|
|||||||
eqemu_config.h
|
eqemu_config.h
|
||||||
eqemu_config_elements.h
|
eqemu_config_elements.h
|
||||||
eqemu_logsys.h
|
eqemu_logsys.h
|
||||||
|
eq_limits.h
|
||||||
eq_packet.h
|
eq_packet.h
|
||||||
eq_stream.h
|
eq_stream.h
|
||||||
eq_stream_factory.h
|
eq_stream_factory.h
|
||||||
@ -139,13 +159,15 @@ SET(common_headers
|
|||||||
guilds.h
|
guilds.h
|
||||||
ipc_mutex.h
|
ipc_mutex.h
|
||||||
item.h
|
item.h
|
||||||
|
item_base.h
|
||||||
item_fieldlist.h
|
item_fieldlist.h
|
||||||
item_struct.h
|
|
||||||
languages.h
|
languages.h
|
||||||
|
light_source.h
|
||||||
linked_list.h
|
linked_list.h
|
||||||
loottable.h
|
loottable.h
|
||||||
mail_oplist.h
|
mail_oplist.h
|
||||||
md5.h
|
md5.h
|
||||||
|
memory_buffer.h
|
||||||
memory_mapped_file.h
|
memory_mapped_file.h
|
||||||
misc.h
|
misc.h
|
||||||
misc_functions.h
|
misc_functions.h
|
||||||
@ -168,6 +190,7 @@ SET(common_headers
|
|||||||
rdtsc.h
|
rdtsc.h
|
||||||
rulesys.h
|
rulesys.h
|
||||||
ruletypes.h
|
ruletypes.h
|
||||||
|
say_link.h
|
||||||
seperator.h
|
seperator.h
|
||||||
serverinfo.h
|
serverinfo.h
|
||||||
servertalk.h
|
servertalk.h
|
||||||
@ -179,6 +202,7 @@ SET(common_headers
|
|||||||
tcp_basic_server.h
|
tcp_basic_server.h
|
||||||
tcp_connection.h
|
tcp_connection.h
|
||||||
tcp_server.h
|
tcp_server.h
|
||||||
|
textures.h
|
||||||
timeoutmgr.h
|
timeoutmgr.h
|
||||||
timer.h
|
timer.h
|
||||||
types.h
|
types.h
|
||||||
@ -192,37 +216,38 @@ SET(common_headers
|
|||||||
zone_numbers.h
|
zone_numbers.h
|
||||||
patches/patches.h
|
patches/patches.h
|
||||||
patches/sod.h
|
patches/sod.h
|
||||||
patches/sod_constants.h
|
# patches/sod_itemfields.h
|
||||||
patches/sod_itemfields.h
|
patches/sod_limits.h
|
||||||
patches/sod_ops.h
|
patches/sod_ops.h
|
||||||
patches/sod_structs.h
|
patches/sod_structs.h
|
||||||
patches/sof.h
|
patches/sof.h
|
||||||
patches/sof_constants.h
|
# patches/sof_itemfields.h
|
||||||
patches/sof_itemfields.h
|
patches/sof_limits.h
|
||||||
patches/sof_opcode_list.h
|
# patches/sof_opcode_list.h
|
||||||
patches/sof_ops.h
|
patches/sof_ops.h
|
||||||
patches/sof_structs.h
|
patches/sof_structs.h
|
||||||
patches/ss_declare.h
|
patches/ss_declare.h
|
||||||
patches/ss_define.h
|
patches/ss_define.h
|
||||||
patches/ss_register.h
|
patches/ss_register.h
|
||||||
patches/rof.h
|
patches/rof.h
|
||||||
patches/rof_constants.h
|
# patches/rof_itemfields.h
|
||||||
patches/rof_itemfields.h
|
patches/rof_limits.h
|
||||||
patches/rof_ops.h
|
patches/rof_ops.h
|
||||||
patches/rof_structs.h
|
patches/rof_structs.h
|
||||||
patches/rof2.h
|
patches/rof2.h
|
||||||
patches/rof2_constants.h
|
# patches/rof2_itemfields.h
|
||||||
patches/rof2_itemfields.h
|
patches/rof2_limits.h
|
||||||
patches/rof2_ops.h
|
patches/rof2_ops.h
|
||||||
patches/rof2_structs.h
|
patches/rof2_structs.h
|
||||||
patches/titanium.h
|
patches/titanium.h
|
||||||
patches/titanium_constants.h
|
# patches/titanium_itemfields_a.h
|
||||||
patches/titanium_itemfields.h
|
# patches/titanium_itemfields_b.h
|
||||||
|
patches/titanium_limits.h
|
||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/uf.h
|
patches/uf.h
|
||||||
patches/uf_constants.h
|
# patches/uf_itemfields.h
|
||||||
patches/uf_itemfields.h
|
patches/uf_limits.h
|
||||||
patches/uf_ops.h
|
patches/uf_ops.h
|
||||||
patches/uf_structs.h
|
patches/uf_structs.h
|
||||||
SocketLib/Base64.h
|
SocketLib/Base64.h
|
||||||
@ -245,46 +270,53 @@ SET(common_headers
|
|||||||
SOURCE_GROUP(Patches FILES
|
SOURCE_GROUP(Patches FILES
|
||||||
patches/patches.h
|
patches/patches.h
|
||||||
patches/sod.h
|
patches/sod.h
|
||||||
patches/sod_itemfields.h
|
# patches/sod_itemfields.h
|
||||||
|
patches/sod_limits.h
|
||||||
patches/sod_ops.h
|
patches/sod_ops.h
|
||||||
patches/sod_constants.h
|
|
||||||
patches/sod_structs.h
|
patches/sod_structs.h
|
||||||
patches/sof.h
|
patches/sof.h
|
||||||
patches/sof_itemfields.h
|
# patches/sof_itemfields.h
|
||||||
patches/sof_opcode_list.h
|
patches/sof_limits.h
|
||||||
|
# patches/sof_opcode_list.h
|
||||||
patches/sof_ops.h
|
patches/sof_ops.h
|
||||||
patches/sof_constants.h
|
|
||||||
patches/sof_structs.h
|
patches/sof_structs.h
|
||||||
patches/ss_declare.h
|
patches/ss_declare.h
|
||||||
patches/ss_define.h
|
patches/ss_define.h
|
||||||
patches/ss_register.h
|
patches/ss_register.h
|
||||||
patches/rof.h
|
patches/rof.h
|
||||||
patches/rof_itemfields.h
|
# patches/rof_itemfields.h
|
||||||
|
patches/rof_limits.h
|
||||||
patches/rof_ops.h
|
patches/rof_ops.h
|
||||||
patches/rof_constants.h
|
|
||||||
patches/rof_structs.h
|
patches/rof_structs.h
|
||||||
patches/rof2.h
|
patches/rof2.h
|
||||||
patches/rof2_itemfields.h
|
# patches/rof2_itemfields.h
|
||||||
|
patches/rof2_limits.h
|
||||||
patches/rof2_ops.h
|
patches/rof2_ops.h
|
||||||
patches/rof2_constants.h
|
|
||||||
patches/rof2_structs.h
|
patches/rof2_structs.h
|
||||||
patches/titanium.h
|
patches/titanium.h
|
||||||
patches/titanium_itemfields.h
|
# patches/titanium_itemfields_a.h
|
||||||
|
# patches/titanium_itemfields_b.h
|
||||||
|
patches/titanium_limits.h
|
||||||
patches/titanium_ops.h
|
patches/titanium_ops.h
|
||||||
patches/titanium_constants.h
|
|
||||||
patches/titanium_structs.h
|
patches/titanium_structs.h
|
||||||
patches/uf.h
|
patches/uf.h
|
||||||
patches/uf_itemfields.h
|
# patches/uf_itemfields.h
|
||||||
|
patches/uf_limits.h
|
||||||
patches/uf_ops.h
|
patches/uf_ops.h
|
||||||
patches/uf_constants.h
|
|
||||||
patches/uf_structs.h
|
patches/uf_structs.h
|
||||||
patches/patches.cpp
|
patches/patches.cpp
|
||||||
patches/sod.cpp
|
patches/sod.cpp
|
||||||
|
patches/sod_limits.cpp
|
||||||
patches/sof.cpp
|
patches/sof.cpp
|
||||||
|
patches/sof_limits.cpp
|
||||||
patches/rof.cpp
|
patches/rof.cpp
|
||||||
|
patches/rof_limits.cpp
|
||||||
patches/rof2.cpp
|
patches/rof2.cpp
|
||||||
|
patches/rof2_limits.cpp
|
||||||
patches/titanium.cpp
|
patches/titanium.cpp
|
||||||
|
patches/titanium_limits.cpp
|
||||||
patches/uf.cpp
|
patches/uf.cpp
|
||||||
|
patches/uf_limits.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
SOURCE_GROUP(SocketLib FILES
|
SOURCE_GROUP(SocketLib FILES
|
||||||
|
|||||||
@ -22,10 +22,10 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef _WINDOWS
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
@ -67,6 +67,8 @@ public:
|
|||||||
|
|
||||||
uint8 ReadUInt8() { uint8 value = *(uint8 *)(pBuffer + _rpos); _rpos += sizeof(uint8); return value; }
|
uint8 ReadUInt8() { uint8 value = *(uint8 *)(pBuffer + _rpos); _rpos += sizeof(uint8); return value; }
|
||||||
uint8 ReadUInt8(uint32 Offset) const { uint8 value = *(uint8 *)(pBuffer + Offset); return value; }
|
uint8 ReadUInt8(uint32 Offset) const { uint8 value = *(uint8 *)(pBuffer + Offset); return value; }
|
||||||
|
uint16 ReadUInt16() { uint16 value = *(uint16 *)(pBuffer + _rpos); _rpos += sizeof(uint16); return value; }
|
||||||
|
uint16 ReadUInt16(uint32 Offset) const { uint16 value = *(uint16 *)(pBuffer + Offset); return value; }
|
||||||
uint32 ReadUInt32() { uint32 value = *(uint32 *)(pBuffer + _rpos); _rpos += sizeof(uint32); return value; }
|
uint32 ReadUInt32() { uint32 value = *(uint32 *)(pBuffer + _rpos); _rpos += sizeof(uint32); return value; }
|
||||||
uint32 ReadUInt32(uint32 Offset) const { uint32 value = *(uint32 *)(pBuffer + Offset); return value; }
|
uint32 ReadUInt32(uint32 Offset) const { uint32 value = *(uint32 *)(pBuffer + Offset); return value; }
|
||||||
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
|
void ReadString(char *str) { uint32 len = static_cast<uint32>(strlen((char *)(pBuffer + _rpos))) + 1; memcpy(str, pBuffer + _rpos, len); _rpos += len; }
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -18,275 +18,576 @@
|
|||||||
#include "../common/global_define.h"
|
#include "../common/global_define.h"
|
||||||
#include "../common/classes.h"
|
#include "../common/classes.h"
|
||||||
|
|
||||||
const char* GetEQClassName(uint8 class_, uint8 level) {
|
const char* GetClassIDName(uint8 class_id, uint8 level)
|
||||||
switch(class_) {
|
{
|
||||||
case WARRIOR:
|
switch (class_id) {
|
||||||
if (level >= 70)
|
case WARRIOR:
|
||||||
return "Vanquisher";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Vanquisher";
|
||||||
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Overlord"; //Baron-Sprite: LEAVE MY CLASSES ALONE.
|
||||||
return "Warlord";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Warlord";
|
||||||
return "Myrmidon";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Myrmidon";
|
||||||
return "Champion";
|
else if (level >= 51)
|
||||||
else
|
return "Champion";
|
||||||
return "Warrior";
|
else
|
||||||
case CLERIC:
|
return "Warrior";
|
||||||
if (level >= 70)
|
case CLERIC:
|
||||||
return "Prelate";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Prelate";
|
||||||
return "Archon";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Archon";
|
||||||
return "High Priest";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "High Priest";
|
||||||
return "Templar";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Templar";
|
||||||
return "Vicar";
|
else if (level >= 51)
|
||||||
else
|
return "Vicar";
|
||||||
return "Cleric";
|
else
|
||||||
case PALADIN:
|
return "Cleric";
|
||||||
if (level >= 70)
|
case PALADIN:
|
||||||
return "Lord";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Lord";
|
||||||
return "Lord Protector";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Lord Protector";
|
||||||
return "Crusader";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Crusader";
|
||||||
return "Knight";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Knight";
|
||||||
return "Cavalier";
|
else if (level >= 51)
|
||||||
else
|
return "Cavalier";
|
||||||
return "Paladin";
|
else
|
||||||
case RANGER:
|
return "Paladin";
|
||||||
if (level >= 70)
|
case RANGER:
|
||||||
return "Plainswalker";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Plainswalker";
|
||||||
return "Forest Stalker";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Forest Stalker";
|
||||||
return "Warder";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Warder";
|
||||||
return "Outrider";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Outrider";
|
||||||
return "Pathfinder";
|
else if (level >= 51)
|
||||||
else
|
return "Pathfinder";
|
||||||
return "Ranger";
|
else
|
||||||
case SHADOWKNIGHT:
|
return "Ranger";
|
||||||
if (level >= 70)
|
case SHADOWKNIGHT:
|
||||||
return "Scourge Knight";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Scourge Knight";
|
||||||
return "Dread Lord";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Dread Lord";
|
||||||
return "Grave Lord";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Grave Lord";
|
||||||
return "Revenant";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Revenant";
|
||||||
return "Reaver";
|
else if (level >= 51)
|
||||||
else
|
return "Reaver";
|
||||||
return "Shadowknight";
|
else
|
||||||
case DRUID:
|
return "Shadowknight";
|
||||||
if (level >= 70)
|
case DRUID:
|
||||||
return "Natureguard";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Natureguard";
|
||||||
return "Storm Warden";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Storm Warden";
|
||||||
return "Hierophant";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Hierophant";
|
||||||
return "Preserver";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Preserver";
|
||||||
return "Wanderer";
|
else if (level >= 51)
|
||||||
else
|
return "Wanderer";
|
||||||
return "Druid";
|
else
|
||||||
case MONK:
|
return "Druid";
|
||||||
if (level >= 70)
|
case MONK:
|
||||||
return "Stone Fist";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Stone Fist";
|
||||||
return "Transcendent";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Transcendent";
|
||||||
return "Grandmaster";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Grandmaster";
|
||||||
return "Master";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Master";
|
||||||
return "Disciple";
|
else if (level >= 51)
|
||||||
else
|
return "Disciple";
|
||||||
return "Monk";
|
else
|
||||||
case BARD:
|
return "Monk";
|
||||||
if (level >= 70)
|
case BARD:
|
||||||
return "Performer";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Performer";
|
||||||
return "Maestro";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Maestro";
|
||||||
return "Virtuoso";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Virtuoso";
|
||||||
return "Troubadour";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Troubadour";
|
||||||
return "Minstrel";
|
else if (level >= 51)
|
||||||
else
|
return "Minstrel";
|
||||||
return "Bard";
|
else
|
||||||
case ROGUE:
|
return "Bard";
|
||||||
if (level >= 70)
|
case ROGUE:
|
||||||
return "Nemesis";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Nemesis";
|
||||||
return "Deceiver";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Deceiver";
|
||||||
return "Assassin";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Assassin";
|
||||||
return "Blackguard";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Blackguard";
|
||||||
return "Rake";
|
else if (level >= 51)
|
||||||
else
|
return "Rake";
|
||||||
return "Rogue";
|
else
|
||||||
case SHAMAN:
|
return "Rogue";
|
||||||
if (level >= 70)
|
case SHAMAN:
|
||||||
return "Soothsayer";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Soothsayer";
|
||||||
return "Prophet";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Prophet";
|
||||||
return "Oracle";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Oracle";
|
||||||
return "Luminary";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Luminary";
|
||||||
return "Mystic";
|
else if (level >= 51)
|
||||||
else
|
return "Mystic";
|
||||||
return "Shaman";
|
else
|
||||||
case NECROMANCER:
|
return "Shaman";
|
||||||
if (level >= 70)
|
case NECROMANCER:
|
||||||
return "Wraith";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Wraith";
|
||||||
return "Arch Lich";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Arch Lich";
|
||||||
return "Warlock";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Warlock";
|
||||||
return "Defiler";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Defiler";
|
||||||
return "Heretic";
|
else if (level >= 51)
|
||||||
else
|
return "Heretic";
|
||||||
return "Necromancer";
|
else
|
||||||
case WIZARD:
|
return "Necromancer";
|
||||||
if (level >= 70)
|
case WIZARD:
|
||||||
return "Grand Arcanist";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Grand Arcanist";
|
||||||
return "Arcanist";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Arcanist";
|
||||||
return "Sorcerer";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Sorcerer";
|
||||||
return "Evoker";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Evoker";
|
||||||
return "Channeler";
|
else if (level >= 51)
|
||||||
else
|
return "Channeler";
|
||||||
return "Wizard";
|
else
|
||||||
case MAGICIAN:
|
return "Wizard";
|
||||||
if (level >= 70)
|
case MAGICIAN:
|
||||||
return "Arch Magus";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Arch Magus";
|
||||||
return "Arch Convoker";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Arch Convoker";
|
||||||
return "Arch Mage";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Arch Mage";
|
||||||
return "Conjurer";
|
else if (level >= 55)
|
||||||
if (level >= 51)
|
return "Conjurer";
|
||||||
return "Elementalist";
|
if (level >= 51)
|
||||||
else
|
return "Elementalist";
|
||||||
return "Magician";
|
else
|
||||||
case ENCHANTER:
|
return "Magician";
|
||||||
if (level >= 70)
|
case ENCHANTER:
|
||||||
return "Bedazzler";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Bedazzler";
|
||||||
return "Coercer";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Coercer";
|
||||||
return "Phantasmist";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Phantasmist";
|
||||||
return "Beguiler";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Beguiler";
|
||||||
return "Illusionist";
|
else if (level >= 51)
|
||||||
else
|
return "Illusionist";
|
||||||
return "Enchanter";
|
else
|
||||||
case BEASTLORD:
|
return "Enchanter";
|
||||||
if (level >= 70)
|
case BEASTLORD:
|
||||||
return "Wildblood";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Wildblood";
|
||||||
return "Feral Lord";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Feral Lord";
|
||||||
return "Savage Lord";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Savage Lord";
|
||||||
return "Animist";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Animist";
|
||||||
return "Primalist";
|
else if (level >= 51)
|
||||||
else
|
return "Primalist";
|
||||||
return "Beastlord";
|
else
|
||||||
case BERSERKER:
|
return "Beastlord";
|
||||||
if (level >= 70)
|
case BERSERKER:
|
||||||
return "Ravager";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Ravager";
|
||||||
return "Fury";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Fury";
|
||||||
return "Rager";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Rager";
|
||||||
return "Vehement";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Vehement";
|
||||||
return "Brawler";
|
else if (level >= 51)
|
||||||
else
|
return "Brawler";
|
||||||
return "Berserker";
|
else
|
||||||
case BANKER:
|
return "Berserker";
|
||||||
if (level >= 70)
|
case BANKER:
|
||||||
return "Master Banker";
|
if (level >= 70)
|
||||||
else if (level >= 65)
|
return "Master Banker";
|
||||||
return "Elder Banker";
|
else if (level >= 65)
|
||||||
else if (level >= 60)
|
return "Elder Banker";
|
||||||
return "Oldest Banker";
|
else if (level >= 60)
|
||||||
else if (level >= 55)
|
return "Oldest Banker";
|
||||||
return "Older Banker";
|
else if (level >= 55)
|
||||||
else if (level >= 51)
|
return "Older Banker";
|
||||||
return "Old Banker";
|
else if (level >= 51)
|
||||||
else
|
return "Old Banker";
|
||||||
return "Banker";
|
else
|
||||||
case WARRIORGM:
|
return "Banker";
|
||||||
return "Warrior Guildmaster";
|
case WARRIORGM:
|
||||||
case CLERICGM:
|
return "Warrior Guildmaster";
|
||||||
return "Cleric Guildmaster";
|
case CLERICGM:
|
||||||
case PALADINGM:
|
return "Cleric Guildmaster";
|
||||||
return "Paladin Guildmaster";
|
case PALADINGM:
|
||||||
case RANGERGM:
|
return "Paladin Guildmaster";
|
||||||
return "Ranger Guildmaster";
|
case RANGERGM:
|
||||||
case SHADOWKNIGHTGM:
|
return "Ranger Guildmaster";
|
||||||
return "Shadowknight Guildmaster";
|
case SHADOWKNIGHTGM:
|
||||||
case DRUIDGM:
|
return "Shadowknight Guildmaster";
|
||||||
return "Druid Guildmaster";
|
case DRUIDGM:
|
||||||
case MONKGM:
|
return "Druid Guildmaster";
|
||||||
return "Monk Guildmaster";
|
case MONKGM:
|
||||||
case BARDGM:
|
return "Monk Guildmaster";
|
||||||
return "Bard Guildmaster";
|
case BARDGM:
|
||||||
case ROGUEGM:
|
return "Bard Guildmaster";
|
||||||
return "Rogue Guildmaster";
|
case ROGUEGM:
|
||||||
case SHAMANGM:
|
return "Rogue Guildmaster";
|
||||||
return "Shaman Guildmaster";
|
case SHAMANGM:
|
||||||
case NECROMANCERGM:
|
return "Shaman Guildmaster";
|
||||||
return "Necromancer Guildmaster";
|
case NECROMANCERGM:
|
||||||
case WIZARDGM:
|
return "Necromancer Guildmaster";
|
||||||
return "Wizard Guildmaster";
|
case WIZARDGM:
|
||||||
case MAGICIANGM:
|
return "Wizard Guildmaster";
|
||||||
return "Magician Guildmaster";
|
case MAGICIANGM:
|
||||||
case ENCHANTERGM:
|
return "Magician Guildmaster";
|
||||||
return "Enchanter Guildmaster";
|
case ENCHANTERGM:
|
||||||
case BEASTLORDGM:
|
return "Enchanter Guildmaster";
|
||||||
return "Beastlord Guildmaster";
|
case BEASTLORDGM:
|
||||||
case BERSERKERGM:
|
return "Beastlord Guildmaster";
|
||||||
return "Berserker Guildmaster";
|
case BERSERKERGM:
|
||||||
case MERCHANT:
|
return "Berserker Guildmaster";
|
||||||
return "Merchant";
|
case MERCHANT:
|
||||||
case ADVENTURERECRUITER:
|
return "Merchant";
|
||||||
return "Adventure Recruiter";
|
case ADVENTURERECRUITER:
|
||||||
case ADVENTUREMERCHANT:
|
return "Adventure Recruiter";
|
||||||
return "Adventure Merchant";
|
case ADVENTUREMERCHANT:
|
||||||
case CORPSE_CLASS:
|
return "Adventure Merchant";
|
||||||
return "Corpse Class";
|
case CORPSE_CLASS:
|
||||||
case TRIBUTE_MASTER:
|
return "Corpse Class";
|
||||||
return "Tribute Master";
|
case TRIBUTE_MASTER:
|
||||||
case GUILD_TRIBUTE_MASTER:
|
return "Tribute Master";
|
||||||
return "Guild Tribute Master";
|
case GUILD_TRIBUTE_MASTER:
|
||||||
default:
|
return "Guild Tribute Master";
|
||||||
return "Unknown";
|
default:
|
||||||
|
return "Unknown";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* GetPlayerClassName(uint32 player_class_value, uint8 level)
|
||||||
|
{
|
||||||
|
return GetClassIDName(GetClassIDFromPlayerClassValue(player_class_value), level);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetPlayerClassValue(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
case CLERIC:
|
||||||
|
case PALADIN:
|
||||||
|
case RANGER:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case DRUID:
|
||||||
|
case MONK:
|
||||||
|
case BARD:
|
||||||
|
case ROGUE:
|
||||||
|
case SHAMAN:
|
||||||
|
case NECROMANCER:
|
||||||
|
case WIZARD:
|
||||||
|
case MAGICIAN:
|
||||||
|
case ENCHANTER:
|
||||||
|
case BEASTLORD:
|
||||||
|
case BERSERKER:
|
||||||
|
return class_id;
|
||||||
|
default:
|
||||||
|
return PLAYER_CLASS_UNKNOWN; // watch
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 GetPlayerClassBit(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
return PLAYER_CLASS_WARRIOR_BIT;
|
||||||
|
case CLERIC:
|
||||||
|
return PLAYER_CLASS_CLERIC_BIT;
|
||||||
|
case PALADIN:
|
||||||
|
return PLAYER_CLASS_PALADIN_BIT;
|
||||||
|
case RANGER:
|
||||||
|
return PLAYER_CLASS_RANGER_BIT;
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
return PLAYER_CLASS_SHADOWKNIGHT_BIT;
|
||||||
|
case DRUID:
|
||||||
|
return PLAYER_CLASS_DRUID_BIT;
|
||||||
|
case MONK:
|
||||||
|
return PLAYER_CLASS_MONK_BIT;
|
||||||
|
case BARD:
|
||||||
|
return PLAYER_CLASS_BARD_BIT;
|
||||||
|
case ROGUE:
|
||||||
|
return PLAYER_CLASS_ROGUE_BIT;
|
||||||
|
case SHAMAN:
|
||||||
|
return PLAYER_CLASS_SHAMAN_BIT;
|
||||||
|
case NECROMANCER:
|
||||||
|
return PLAYER_CLASS_NECROMANCER_BIT;
|
||||||
|
case WIZARD:
|
||||||
|
return PLAYER_CLASS_WIZARD_BIT;
|
||||||
|
case MAGICIAN:
|
||||||
|
return PLAYER_CLASS_MAGICIAN_BIT;
|
||||||
|
case ENCHANTER:
|
||||||
|
return PLAYER_CLASS_ENCHANTER_BIT;
|
||||||
|
case BEASTLORD:
|
||||||
|
return PLAYER_CLASS_BEASTLORD_BIT;
|
||||||
|
case BERSERKER:
|
||||||
|
return PLAYER_CLASS_BERSERKER_BIT;
|
||||||
|
default:
|
||||||
|
return PLAYER_CLASS_UNKNOWN_BIT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value)
|
||||||
|
{
|
||||||
|
switch (player_class_value) {
|
||||||
|
case PLAYER_CLASS_WARRIOR:
|
||||||
|
case PLAYER_CLASS_CLERIC:
|
||||||
|
case PLAYER_CLASS_PALADIN:
|
||||||
|
case PLAYER_CLASS_RANGER:
|
||||||
|
case PLAYER_CLASS_SHADOWKNIGHT:
|
||||||
|
case PLAYER_CLASS_DRUID:
|
||||||
|
case PLAYER_CLASS_MONK:
|
||||||
|
case PLAYER_CLASS_BARD:
|
||||||
|
case PLAYER_CLASS_ROGUE:
|
||||||
|
case PLAYER_CLASS_SHAMAN:
|
||||||
|
case PLAYER_CLASS_NECROMANCER:
|
||||||
|
case PLAYER_CLASS_WIZARD:
|
||||||
|
case PLAYER_CLASS_MAGICIAN:
|
||||||
|
case PLAYER_CLASS_ENCHANTER:
|
||||||
|
case PLAYER_CLASS_BEASTLORD:
|
||||||
|
case PLAYER_CLASS_BERSERKER:
|
||||||
|
return player_class_value;
|
||||||
|
default:
|
||||||
|
return PLAYER_CLASS_UNKNOWN; // watch
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit)
|
||||||
|
{
|
||||||
|
switch (player_class_bit) {
|
||||||
|
case PLAYER_CLASS_WARRIOR_BIT:
|
||||||
|
return WARRIOR;
|
||||||
|
case PLAYER_CLASS_CLERIC_BIT:
|
||||||
|
return CLERIC;
|
||||||
|
case PLAYER_CLASS_PALADIN_BIT:
|
||||||
|
return PALADIN;
|
||||||
|
case PLAYER_CLASS_RANGER_BIT:
|
||||||
|
return RANGER;
|
||||||
|
case PLAYER_CLASS_SHADOWKNIGHT_BIT:
|
||||||
|
return SHADOWKNIGHT;
|
||||||
|
case PLAYER_CLASS_DRUID_BIT:
|
||||||
|
return DRUID;
|
||||||
|
case PLAYER_CLASS_MONK_BIT:
|
||||||
|
return MONK;
|
||||||
|
case PLAYER_CLASS_BARD_BIT:
|
||||||
|
return BARD;
|
||||||
|
case PLAYER_CLASS_ROGUE_BIT:
|
||||||
|
return ROGUE;
|
||||||
|
case PLAYER_CLASS_SHAMAN_BIT:
|
||||||
|
return SHAMAN;
|
||||||
|
case PLAYER_CLASS_NECROMANCER_BIT:
|
||||||
|
return NECROMANCER;
|
||||||
|
case PLAYER_CLASS_WIZARD_BIT:
|
||||||
|
return WIZARD;
|
||||||
|
case PLAYER_CLASS_MAGICIAN_BIT:
|
||||||
|
return MAGICIAN;
|
||||||
|
case PLAYER_CLASS_ENCHANTER_BIT:
|
||||||
|
return ENCHANTER;
|
||||||
|
case PLAYER_CLASS_BEASTLORD_BIT:
|
||||||
|
return BEASTLORD;
|
||||||
|
case PLAYER_CLASS_BERSERKER_BIT:
|
||||||
|
return BERSERKER;
|
||||||
|
default:
|
||||||
|
return PLAYER_CLASS_UNKNOWN; // watch
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsFighterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
case PALADIN:
|
||||||
|
case RANGER:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case MONK:
|
||||||
|
case BARD:
|
||||||
|
case ROGUE:
|
||||||
|
case BEASTLORD:
|
||||||
|
case BERSERKER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsSpellFighterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case PALADIN:
|
||||||
|
case RANGER:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case BEASTLORD:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsNonSpellFighterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
case MONK:
|
||||||
|
case BARD:
|
||||||
|
case ROGUE:
|
||||||
|
case BERSERKER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsCasterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case CLERIC:
|
||||||
|
case DRUID:
|
||||||
|
case SHAMAN:
|
||||||
|
case NECROMANCER:
|
||||||
|
case WIZARD:
|
||||||
|
case MAGICIAN:
|
||||||
|
case ENCHANTER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsINTCasterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case NECROMANCER:
|
||||||
|
case WIZARD:
|
||||||
|
case MAGICIAN:
|
||||||
|
case ENCHANTER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsWISCasterClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case CLERIC:
|
||||||
|
case DRUID:
|
||||||
|
case SHAMAN:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsPlateClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
case CLERIC:
|
||||||
|
case PALADIN:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case BARD:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsChainClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case RANGER:
|
||||||
|
case ROGUE:
|
||||||
|
case SHAMAN:
|
||||||
|
case BERSERKER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsLeatherClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case DRUID:
|
||||||
|
case MONK:
|
||||||
|
case BEASTLORD:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsClothClass(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case NECROMANCER:
|
||||||
|
case WIZARD:
|
||||||
|
case MAGICIAN:
|
||||||
|
case ENCHANTER:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 ClassArmorType(uint8 class_id)
|
||||||
|
{
|
||||||
|
switch (class_id) {
|
||||||
|
case WARRIOR:
|
||||||
|
case CLERIC:
|
||||||
|
case PALADIN:
|
||||||
|
case SHADOWKNIGHT:
|
||||||
|
case BARD:
|
||||||
|
return ARMOR_TYPE_PLATE;
|
||||||
|
case RANGER:
|
||||||
|
case ROGUE:
|
||||||
|
case SHAMAN:
|
||||||
|
case BERSERKER:
|
||||||
|
return ARMOR_TYPE_CHAIN;
|
||||||
|
case DRUID:
|
||||||
|
case MONK:
|
||||||
|
case BEASTLORD:
|
||||||
|
return ARMOR_TYPE_LEATHER;
|
||||||
|
case NECROMANCER:
|
||||||
|
case WIZARD:
|
||||||
|
case MAGICIAN:
|
||||||
|
case ENCHANTER:
|
||||||
|
return ARMOR_TYPE_CLOTH;
|
||||||
|
default:
|
||||||
|
return ARMOR_TYPE_UNKNOWN;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
142
common/classes.h
142
common/classes.h
@ -1,5 +1,5 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -17,26 +17,25 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef CLASSES_CH
|
#ifndef CLASSES_CH
|
||||||
#define CLASSES_CH
|
#define CLASSES_CH
|
||||||
|
|
||||||
#include "../common/types.h"
|
#include "../common/types.h"
|
||||||
|
|
||||||
#define Array_Class_UNKNOWN 0
|
#define WARRIOR 1
|
||||||
#define WARRIOR 1
|
#define CLERIC 2
|
||||||
#define CLERIC 2
|
#define PALADIN 3
|
||||||
#define PALADIN 3
|
#define RANGER 4
|
||||||
#define RANGER 4
|
#define SHADOWKNIGHT 5
|
||||||
#define SHADOWKNIGHT 5
|
#define DRUID 6
|
||||||
#define DRUID 6
|
#define MONK 7
|
||||||
#define MONK 7
|
#define BARD 8
|
||||||
#define BARD 8
|
#define ROGUE 9
|
||||||
#define ROGUE 9
|
#define SHAMAN 10
|
||||||
#define SHAMAN 10
|
#define NECROMANCER 11
|
||||||
#define NECROMANCER 11
|
#define WIZARD 12
|
||||||
#define WIZARD 12
|
#define MAGICIAN 13
|
||||||
#define MAGICIAN 13
|
#define ENCHANTER 14
|
||||||
#define ENCHANTER 14
|
#define BEASTLORD 15
|
||||||
#define BEASTLORD 15
|
#define BERSERKER 16
|
||||||
#define BERSERKER 16
|
|
||||||
#define PLAYER_CLASS_COUNT 16 // used for array defines, must be the count of playable classes
|
|
||||||
#define WARRIORGM 20
|
#define WARRIORGM 20
|
||||||
#define CLERICGM 21
|
#define CLERICGM 21
|
||||||
#define PALADINGM 22
|
#define PALADINGM 22
|
||||||
@ -58,33 +57,92 @@
|
|||||||
#define DISCORD_MERCHANT 59
|
#define DISCORD_MERCHANT 59
|
||||||
#define ADVENTURERECRUITER 60
|
#define ADVENTURERECRUITER 60
|
||||||
#define ADVENTUREMERCHANT 61
|
#define ADVENTUREMERCHANT 61
|
||||||
#define LDON_TREASURE 62 //objects you can use /open on first seen in LDONs
|
#define LDON_TREASURE 62 // objects you can use /open on first seen in LDONs
|
||||||
#define CORPSE_CLASS 62 //only seen on Danvi's Corpse in Akheva so far..
|
#define CORPSE_CLASS 62 // only seen on Danvi's Corpse in Akheva so far..
|
||||||
#define TRIBUTE_MASTER 63
|
#define TRIBUTE_MASTER 63
|
||||||
#define GUILD_TRIBUTE_MASTER 64 //not sure
|
#define GUILD_TRIBUTE_MASTER 64 // not sure
|
||||||
#define NORRATHS_KEEPERS_MERCHANT 67
|
#define NORRATHS_KEEPERS_MERCHANT 67
|
||||||
#define DARK_REIGN_MERCHANT 68
|
#define DARK_REIGN_MERCHANT 68
|
||||||
#define FELLOWSHIP_MASTER 69
|
#define FELLOWSHIP_MASTER 69
|
||||||
#define ALT_CURRENCY_MERCHANT 70
|
#define ALT_CURRENCY_MERCHANT 70
|
||||||
#define MERCERNARY_MASTER 71
|
#define MERCERNARY_MASTER 71
|
||||||
#define warrior_1 1
|
|
||||||
#define monk_1 64
|
|
||||||
#define paladin_1 4
|
|
||||||
#define shadow_1 16
|
|
||||||
#define bard_1 128
|
|
||||||
#define cleric_1 2
|
|
||||||
#define necromancer_1 1024
|
|
||||||
#define ranger_1 8
|
|
||||||
#define druid_1 32
|
|
||||||
#define mage_1 4096
|
|
||||||
#define wizard_1 2048
|
|
||||||
#define enchanter_1 8192
|
|
||||||
#define rogue_1 256
|
|
||||||
#define shaman_1 512
|
|
||||||
#define beastlord_1 16384
|
|
||||||
#define berserker_1 32768
|
|
||||||
#define call_1 65536
|
|
||||||
|
|
||||||
const char* GetEQClassName(uint8 class_, uint8 level = 0);
|
|
||||||
|
// player class values
|
||||||
|
#define PLAYER_CLASS_UNKNOWN 0
|
||||||
|
#define PLAYER_CLASS_WARRIOR 1
|
||||||
|
#define PLAYER_CLASS_CLERIC 2
|
||||||
|
#define PLAYER_CLASS_PALADIN 3
|
||||||
|
#define PLAYER_CLASS_RANGER 4
|
||||||
|
#define PLAYER_CLASS_SHADOWKNIGHT 5
|
||||||
|
#define PLAYER_CLASS_DRUID 6
|
||||||
|
#define PLAYER_CLASS_MONK 7
|
||||||
|
#define PLAYER_CLASS_BARD 8
|
||||||
|
#define PLAYER_CLASS_ROGUE 9
|
||||||
|
#define PLAYER_CLASS_SHAMAN 10
|
||||||
|
#define PLAYER_CLASS_NECROMANCER 11
|
||||||
|
#define PLAYER_CLASS_WIZARD 12
|
||||||
|
#define PLAYER_CLASS_MAGICIAN 13
|
||||||
|
#define PLAYER_CLASS_ENCHANTER 14
|
||||||
|
#define PLAYER_CLASS_BEASTLORD 15
|
||||||
|
#define PLAYER_CLASS_BERSERKER 16
|
||||||
|
|
||||||
|
#define PLAYER_CLASS_COUNT 16
|
||||||
|
|
||||||
|
|
||||||
|
// player class bits
|
||||||
|
#define PLAYER_CLASS_UNKNOWN_BIT 0
|
||||||
|
#define PLAYER_CLASS_WARRIOR_BIT 1
|
||||||
|
#define PLAYER_CLASS_CLERIC_BIT 2
|
||||||
|
#define PLAYER_CLASS_PALADIN_BIT 4
|
||||||
|
#define PLAYER_CLASS_RANGER_BIT 8
|
||||||
|
#define PLAYER_CLASS_SHADOWKNIGHT_BIT 16
|
||||||
|
#define PLAYER_CLASS_DRUID_BIT 32
|
||||||
|
#define PLAYER_CLASS_MONK_BIT 64
|
||||||
|
#define PLAYER_CLASS_BARD_BIT 128
|
||||||
|
#define PLAYER_CLASS_ROGUE_BIT 256
|
||||||
|
#define PLAYER_CLASS_SHAMAN_BIT 512
|
||||||
|
#define PLAYER_CLASS_NECROMANCER_BIT 1024
|
||||||
|
#define PLAYER_CLASS_WIZARD_BIT 2048
|
||||||
|
#define PLAYER_CLASS_MAGICIAN_BIT 4096
|
||||||
|
#define PLAYER_CLASS_ENCHANTER_BIT 8192
|
||||||
|
#define PLAYER_CLASS_BEASTLORD_BIT 16384
|
||||||
|
#define PLAYER_CLASS_BERSERKER_BIT 32768
|
||||||
|
|
||||||
|
#define PLAYER_CLASS_ALL_MASK 65535 // was 65536
|
||||||
|
|
||||||
|
|
||||||
|
#define ARMOR_TYPE_UNKNOWN 0
|
||||||
|
#define ARMOR_TYPE_CLOTH 1
|
||||||
|
#define ARMOR_TYPE_LEATHER 2
|
||||||
|
#define ARMOR_TYPE_CHAIN 3
|
||||||
|
#define ARMOR_TYPE_PLATE 4
|
||||||
|
|
||||||
|
#define ARMOR_TYPE_FIRST ARMOR_TYPE_UNKNOWN
|
||||||
|
#define ARMOR_TYPE_LAST ARMOR_TYPE_PLATE
|
||||||
|
#define ARMOR_TYPE_COUNT 5
|
||||||
|
|
||||||
|
|
||||||
|
const char* GetClassIDName(uint8 class_id, uint8 level = 0);
|
||||||
|
const char* GetPlayerClassName(uint32 player_class_value, uint8 level = 0);
|
||||||
|
|
||||||
|
uint32 GetPlayerClassValue(uint8 class_id);
|
||||||
|
uint32 GetPlayerClassBit(uint8 class_id);
|
||||||
|
|
||||||
|
uint8 GetClassIDFromPlayerClassValue(uint32 player_class_value);
|
||||||
|
uint8 GetClassIDFromPlayerClassBit(uint32 player_class_bit);
|
||||||
|
|
||||||
|
bool IsFighterClass(uint8 class_id);
|
||||||
|
bool IsSpellFighterClass(uint8 class_id);
|
||||||
|
bool IsNonSpellFighterClass(uint8 class_id);
|
||||||
|
bool IsCasterClass(uint8 class_id);
|
||||||
|
bool IsINTCasterClass(uint8 class_id);
|
||||||
|
bool IsWISCasterClass(uint8 class_id);
|
||||||
|
|
||||||
|
bool IsPlateClass(uint8 class_id);
|
||||||
|
bool IsChainClass(uint8 class_id);
|
||||||
|
bool IsLeatherClass(uint8 class_id);
|
||||||
|
bool IsClothClass(uint8 class_id);
|
||||||
|
uint8 ClassArmorType(uint8 class_id);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -1,153 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef CLIENTVERSIONS_H
|
|
||||||
#define CLIENTVERSIONS_H
|
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
|
|
||||||
static const uint32 BIT_Client62 = 1;
|
|
||||||
static const uint32 BIT_Titanium = 2;
|
|
||||||
static const uint32 BIT_SoF = 4;
|
|
||||||
static const uint32 BIT_SoD = 8;
|
|
||||||
static const uint32 BIT_UF = 16;
|
|
||||||
static const uint32 BIT_RoF = 32;
|
|
||||||
static const uint32 BIT_RoF2 = 64;
|
|
||||||
|
|
||||||
static const uint32 BIT_TitaniumAndEarlier = 0x00000003;
|
|
||||||
static const uint32 BIT_SoFAndLater = 0xFFFFFFFC;
|
|
||||||
static const uint32 BIT_SoDAndLater = 0xFFFFFFF8;
|
|
||||||
static const uint32 BIT_UFAndLater = 0xFFFFFFF0;
|
|
||||||
static const uint32 BIT_RoFAndLater = 0xFFFFFFE0;
|
|
||||||
static const uint32 BIT_RoF2AndLater = 0xFFFFFFC0;
|
|
||||||
static const uint32 BIT_AllClients = 0xFFFFFFFF;
|
|
||||||
|
|
||||||
enum class ClientVersion
|
|
||||||
{
|
|
||||||
Unknown = 0,
|
|
||||||
Client62, // Build: 'Aug 4 2005 15:40:59'
|
|
||||||
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
|
||||||
SoF, // Build: 'Sep 7 2007 09:11:49'
|
|
||||||
SoD, // Build: 'Dec 19 2008 15:22:49'
|
|
||||||
UF, // Build: 'Jun 8 2010 16:44:32'
|
|
||||||
RoF, // Build: 'Dec 10 2012 17:35:44'
|
|
||||||
RoF2, // Build: 'May 10 2013 23:30:08'
|
|
||||||
|
|
||||||
MobNPC,
|
|
||||||
MobMerc,
|
|
||||||
MobBot,
|
|
||||||
MobPet,
|
|
||||||
};
|
|
||||||
|
|
||||||
#define CLIENT_VERSION_COUNT 12
|
|
||||||
#define LAST_PC_CLIENT ClientVersion::RoF2
|
|
||||||
#define LAST_NPC_CLIENT ClientVersion::MobPet
|
|
||||||
|
|
||||||
|
|
||||||
static const char* ClientVersionName(ClientVersion version)
|
|
||||||
{
|
|
||||||
switch (version)
|
|
||||||
{
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
return "Unknown";
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
return "Client62";
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
return "Titanium";
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
return "SoF";
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
return "SoD";
|
|
||||||
case ClientVersion::UF:
|
|
||||||
return "UF";
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
return "RoF";
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
return "RoF2";
|
|
||||||
case ClientVersion::MobNPC:
|
|
||||||
return "MobNPC";
|
|
||||||
case ClientVersion::MobMerc:
|
|
||||||
return "MobMerc";
|
|
||||||
case ClientVersion::MobBot:
|
|
||||||
return "MobBot";
|
|
||||||
case ClientVersion::MobPet:
|
|
||||||
return "MobPet";
|
|
||||||
default:
|
|
||||||
return "<ERROR> Invalid ClientVersion";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
static uint32 ClientBitFromVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
switch (clientVersion)
|
|
||||||
{
|
|
||||||
case ClientVersion::Unknown:
|
|
||||||
case ClientVersion::Client62:
|
|
||||||
return 0;
|
|
||||||
case ClientVersion::Titanium:
|
|
||||||
case ClientVersion::SoF:
|
|
||||||
case ClientVersion::SoD:
|
|
||||||
case ClientVersion::UF:
|
|
||||||
case ClientVersion::RoF:
|
|
||||||
case ClientVersion::RoF2:
|
|
||||||
case ClientVersion::MobNPC:
|
|
||||||
case ClientVersion::MobMerc:
|
|
||||||
case ClientVersion::MobBot:
|
|
||||||
case ClientVersion::MobPet:
|
|
||||||
return ((uint32)1 << (static_cast<unsigned int>(clientVersion) - 1));
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static ClientVersion ClientVersionFromBit(uint32 clientVersionBit)
|
|
||||||
{
|
|
||||||
switch (clientVersionBit)
|
|
||||||
{
|
|
||||||
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown):
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)):
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)):
|
|
||||||
return ClientVersion::Titanium;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)):
|
|
||||||
return ClientVersion::SoF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)):
|
|
||||||
return ClientVersion::SoD;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)):
|
|
||||||
return ClientVersion::UF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)):
|
|
||||||
return ClientVersion::RoF;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)):
|
|
||||||
return ClientVersion::RoF2;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobNPC) - 1)):
|
|
||||||
return ClientVersion::MobNPC;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobMerc) - 1)):
|
|
||||||
return ClientVersion::MobMerc;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobBot) - 1)):
|
|
||||||
return ClientVersion::MobBot;
|
|
||||||
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::MobPet) - 1)):
|
|
||||||
return ClientVersion::MobPet;
|
|
||||||
default:
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif /* CLIENTVERSIONS_H */
|
|
||||||
@ -1,5 +1,6 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -13,36 +14,42 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef COMMON_DATA_VERIFICATION_H
|
#ifndef COMMON_DATA_VERIFICATION_H
|
||||||
#define COMMON_DATA_VERIFICATION_H
|
#define COMMON_DATA_VERIFICATION_H
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
||||||
namespace EQEmu
|
namespace EQEmu
|
||||||
{
|
{
|
||||||
|
template <typename T>
|
||||||
|
T Clamp(const T& value, const T& lower, const T& upper) {
|
||||||
|
return std::max(lower, std::min(value, upper));
|
||||||
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T Clamp(const T& value, const T& lower, const T& upper) {
|
T ClampLower(const T& value, const T& lower) {
|
||||||
return std::max(lower, std::min(value, upper));
|
return std::max(lower, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ClampLower(const T& value, const T& lower) {
|
T ClampUpper(const T& value, const T& upper) {
|
||||||
return std::max(lower, value);
|
return std::min(value, upper);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
T ClampUpper(const T& value, const T& upper) {
|
bool ValueWithin(const T& value, const T& lower, const T& upper) {
|
||||||
return std::min(value, upper);
|
return value >= lower && value <= upper;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T1, typename T2, typename T3>
|
||||||
bool ValueWithin(const T& value, const T& lower, const T& upper) {
|
bool ValueWithin(const T1& value, const T2& lower, const T3& upper) {
|
||||||
return value >= lower && value <= upper;
|
return value >= (T1)lower && value <= (T1)upper;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} /*EQEmu*/
|
||||||
|
|
||||||
#endif
|
#endif /*COMMON_DATA_VERIFICATION_H*/
|
||||||
|
|||||||
@ -23,6 +23,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <algorithm>
|
||||||
#include <mysqld_error.h>
|
#include <mysqld_error.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -48,7 +49,6 @@
|
|||||||
extern Client client;
|
extern Client client;
|
||||||
|
|
||||||
Database::Database () {
|
Database::Database () {
|
||||||
DBInitVars();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -57,7 +57,6 @@ Establish a connection to a mysql database with the supplied parameters
|
|||||||
|
|
||||||
Database::Database(const char* host, const char* user, const char* passwd, const char* database, uint32 port)
|
Database::Database(const char* host, const char* user, const char* passwd, const char* database, uint32 port)
|
||||||
{
|
{
|
||||||
DBInitVars();
|
|
||||||
Connect(host, user, passwd, database, port);
|
Connect(host, user, passwd, database, port);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,25 +73,12 @@ bool Database::Connect(const char* host, const char* user, const char* passwd, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::DBInitVars() {
|
|
||||||
varcache_array = 0;
|
|
||||||
varcache_max = 0;
|
|
||||||
varcache_lastupdate = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Close the connection to the database
|
Close the connection to the database
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Database::~Database()
|
Database::~Database()
|
||||||
{
|
{
|
||||||
unsigned int x;
|
|
||||||
if (varcache_array) {
|
|
||||||
for (x=0; x<varcache_max; x++) {
|
|
||||||
safe_delete_array(varcache_array[x]);
|
|
||||||
}
|
|
||||||
safe_delete_array(varcache_array);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -313,7 +299,10 @@ bool Database::DeleteCharacter(char *name) {
|
|||||||
std::string query = StringFormat("SELECT `id` from `character_data` WHERE `name` = '%s'", name);
|
std::string query = StringFormat("SELECT `id` from `character_data` WHERE `name` = '%s'", name);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) { charid = atoi(row[0]); }
|
for (auto row = results.begin(); row != results.end(); ++row) { charid = atoi(row[0]); }
|
||||||
if (charid <= 0){ std::cerr << "Database::DeleteCharacter :: Character not found, stopping delete...\n"; return false; }
|
if (charid <= 0){
|
||||||
|
Log.Out(Logs::General, Logs::Error, "Database::DeleteCharacter :: Character (%s) not found, stopping delete...", name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
query = StringFormat("DELETE FROM `quest_globals` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `quest_globals` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `character_activities` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `character_activities` WHERE `charid` = '%d'", charid); QueryDatabase(query);
|
||||||
@ -349,7 +338,7 @@ bool Database::DeleteCharacter(char *name) {
|
|||||||
query = StringFormat("DELETE FROM `character_leadership_abilities` WHERE `id` = %u", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `character_leadership_abilities` WHERE `id` = %u", charid); QueryDatabase(query);
|
||||||
query = StringFormat("DELETE FROM `character_alt_currency` WHERE `char_id` = '%d'", charid); QueryDatabase(query);
|
query = StringFormat("DELETE FROM `character_alt_currency` WHERE `char_id` = '%d'", charid); QueryDatabase(query);
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
query = StringFormat("DELETE FROM `guild_members` WHERE `char_id` = '%d' AND GetMobTypeById(%i) = 'C'", charid);
|
query = StringFormat("DELETE FROM `guild_members` WHERE `char_id` = '%d' AND GetMobTypeById(%i) = 'C'", charid); // note: only use of GetMobTypeById()
|
||||||
#else
|
#else
|
||||||
query = StringFormat("DELETE FROM `guild_members` WHERE `char_id` = '%d'", charid);
|
query = StringFormat("DELETE FROM `guild_members` WHERE `char_id` = '%d'", charid);
|
||||||
#endif
|
#endif
|
||||||
@ -636,11 +625,17 @@ bool Database::SaveCharacterCreate(uint32 character_id, uint32 account_id, Playe
|
|||||||
);
|
);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
/* Save Bind Points */
|
/* Save Bind Points */
|
||||||
query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, is_home)"
|
query = StringFormat("REPLACE INTO `character_bind` (id, zone_id, instance_id, x, y, z, heading, slot)"
|
||||||
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i), "
|
" VALUES (%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
|
"(%u, %u, %u, %f, %f, %f, %f, %i), "
|
||||||
"(%u, %u, %u, %f, %f, %f, %f, %i)",
|
"(%u, %u, %u, %f, %f, %f, %f, %i)",
|
||||||
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading, 0,
|
character_id, pp->binds[0].zoneId, 0, pp->binds[0].x, pp->binds[0].y, pp->binds[0].z, pp->binds[0].heading, 0,
|
||||||
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading, 1
|
character_id, pp->binds[1].zoneId, 0, pp->binds[1].x, pp->binds[1].y, pp->binds[1].z, pp->binds[1].heading, 1,
|
||||||
|
character_id, pp->binds[2].zoneId, 0, pp->binds[2].x, pp->binds[2].y, pp->binds[2].z, pp->binds[2].heading, 2,
|
||||||
|
character_id, pp->binds[3].zoneId, 0, pp->binds[3].x, pp->binds[3].y, pp->binds[3].z, pp->binds[3].heading, 3,
|
||||||
|
character_id, pp->binds[4].zoneId, 0, pp->binds[4].x, pp->binds[4].y, pp->binds[4].z, pp->binds[4].heading, 4
|
||||||
); results = QueryDatabase(query);
|
); results = QueryDatabase(query);
|
||||||
|
|
||||||
/* Save Skills */
|
/* Save Skills */
|
||||||
@ -705,7 +700,7 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
|||||||
|
|
||||||
/* Insert starting inventory... */
|
/* Insert starting inventory... */
|
||||||
std::string invquery;
|
std::string invquery;
|
||||||
for (int16 i=EmuConstants::EQUIPMENT_BEGIN; i<=EmuConstants::BANK_BAGS_END;) {
|
for (int16 i = EQEmu::legacy::EQUIPMENT_BEGIN; i <= EQEmu::legacy::BANK_BAGS_END;) {
|
||||||
const ItemInst* newinv = inv->GetItem(i);
|
const ItemInst* newinv = inv->GetItem(i);
|
||||||
if (newinv) {
|
if (newinv) {
|
||||||
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
invquery = StringFormat("INSERT INTO `inventory` (charid, slotid, itemid, charges, color) VALUES (%u, %i, %u, %i, %u)",
|
||||||
@ -714,16 +709,16 @@ bool Database::StoreCharacter(uint32 account_id, PlayerProfile_Struct* pp, Inven
|
|||||||
auto results = QueryDatabase(invquery);
|
auto results = QueryDatabase(invquery);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == MainCursor) {
|
if (i == EQEmu::legacy::SlotCursor) {
|
||||||
i = EmuConstants::GENERAL_BAGS_BEGIN;
|
i = EQEmu::legacy::GENERAL_BAGS_BEGIN;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (i == EmuConstants::CURSOR_BAG_END) {
|
else if (i == EQEmu::legacy::CURSOR_BAG_END) {
|
||||||
i = EmuConstants::BANK_BEGIN;
|
i = EQEmu::legacy::BANK_BEGIN;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (i == EmuConstants::BANK_END) {
|
else if (i == EQEmu::legacy::BANK_END) {
|
||||||
i = EmuConstants::BANK_BAGS_BEGIN;
|
i = EQEmu::legacy::BANK_BAGS_BEGIN;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
i++;
|
i++;
|
||||||
@ -851,141 +846,65 @@ void Database::GetCharName(uint32 char_id, char* name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::LoadVariables() {
|
bool Database::LoadVariables() {
|
||||||
char *query = nullptr;
|
auto results = QueryDatabase(StringFormat("SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= %d", varcache.last_update));
|
||||||
|
|
||||||
auto results = QueryDatabase(query, LoadVariables_MQ(&query));
|
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
|
||||||
safe_delete_array(query);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
safe_delete_array(query);
|
|
||||||
return LoadVariables_result(std::move(results));
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32 Database::LoadVariables_MQ(char** query)
|
|
||||||
{
|
|
||||||
return MakeAnyLenString(query, "SELECT varname, value, unix_timestamp() FROM variables where unix_timestamp(ts) >= %d", varcache_lastupdate);
|
|
||||||
}
|
|
||||||
|
|
||||||
// always returns true? not sure about this.
|
|
||||||
bool Database::LoadVariables_result(MySQLRequestResult results)
|
|
||||||
{
|
|
||||||
uint32 i = 0;
|
|
||||||
LockMutex lock(&Mvarcache);
|
|
||||||
|
|
||||||
if (results.RowCount() == 0)
|
if (results.RowCount() == 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (!varcache_array) {
|
LockMutex lock(&Mvarcache);
|
||||||
varcache_max = results.RowCount();
|
|
||||||
varcache_array = new VarCache_Struct*[varcache_max];
|
|
||||||
for (i=0; i<varcache_max; i++)
|
|
||||||
varcache_array[i] = 0;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
uint32 tmpnewmax = varcache_max + results.RowCount();
|
|
||||||
VarCache_Struct** tmp = new VarCache_Struct*[tmpnewmax];
|
|
||||||
for (i=0; i<tmpnewmax; i++)
|
|
||||||
tmp[i] = 0;
|
|
||||||
for (i=0; i<varcache_max; i++)
|
|
||||||
tmp[i] = varcache_array[i];
|
|
||||||
VarCache_Struct** tmpdel = varcache_array;
|
|
||||||
varcache_array = tmp;
|
|
||||||
varcache_max = tmpnewmax;
|
|
||||||
delete [] tmpdel;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row)
|
std::string key, value;
|
||||||
{
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
varcache_lastupdate = atoi(row[2]);
|
varcache.last_update = atoi(row[2]); // ahh should we be comparing if this is newer?
|
||||||
for (i=0; i<varcache_max; i++) {
|
key = row[0];
|
||||||
if (varcache_array[i]) {
|
value = row[1];
|
||||||
if (strcasecmp(varcache_array[i]->varname, row[0]) == 0) {
|
std::transform(std::begin(key), std::end(key), std::begin(key), ::tolower); // keys are lower case, DB doesn't have to be
|
||||||
delete varcache_array[i];
|
varcache.Add(key, value);
|
||||||
varcache_array[i] = (VarCache_Struct*) new uint8[sizeof(VarCache_Struct) + strlen(row[1]) + 1];
|
|
||||||
strn0cpy(varcache_array[i]->varname, row[0], sizeof(varcache_array[i]->varname));
|
|
||||||
strcpy(varcache_array[i]->value, row[1]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
varcache_array[i] = (VarCache_Struct*) new uint8[sizeof(VarCache_Struct) + strlen(row[1]) + 1];
|
|
||||||
strcpy(varcache_array[i]->varname, row[0]);
|
|
||||||
strcpy(varcache_array[i]->value, row[1]);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 max_used = 0;
|
|
||||||
for (i=0; i<varcache_max; i++) {
|
|
||||||
if (varcache_array[i]) {
|
|
||||||
if (i > max_used)
|
|
||||||
max_used = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
varcache_max = max_used + 1;
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets variable from 'variables' table
|
// Gets variable from 'variables' table
|
||||||
bool Database::GetVariable(const char* varname, char* varvalue, uint16 varvalue_len) {
|
bool Database::GetVariable(std::string varname, std::string &varvalue)
|
||||||
varvalue[0] = '\0';
|
{
|
||||||
|
varvalue.clear();
|
||||||
|
|
||||||
LockMutex lock(&Mvarcache);
|
LockMutex lock(&Mvarcache);
|
||||||
if (strlen(varname) <= 1)
|
|
||||||
return false;
|
|
||||||
for (uint32 i=0; i<varcache_max; i++) {
|
|
||||||
|
|
||||||
if (varcache_array[i]) {
|
if (varname.empty())
|
||||||
if (strcasecmp(varcache_array[i]->varname, varname) == 0) {
|
return false;
|
||||||
snprintf(varvalue, varvalue_len, "%s", varcache_array[i]->value);
|
|
||||||
varvalue[varvalue_len-1] = 0;
|
std::transform(std::begin(varname), std::end(varname), std::begin(varname), ::tolower); // all keys are lower case
|
||||||
return true;
|
auto tmp = varcache.Get(varname);
|
||||||
}
|
if (tmp) {
|
||||||
}
|
varvalue = *tmp;
|
||||||
else
|
return true;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::SetVariable(const char* varname_in, const char* varvalue_in) {
|
bool Database::SetVariable(const std::string varname, const std::string &varvalue)
|
||||||
|
{
|
||||||
char *varname,*varvalue;
|
std::string escaped_name = EscapeString(varname);
|
||||||
|
std::string escaped_value = EscapeString(varvalue);
|
||||||
varname=(char *)malloc(strlen(varname_in)*2+1);
|
std::string query = StringFormat("Update variables set value='%s' WHERE varname like '%s'", escaped_value.c_str(), escaped_name.c_str());
|
||||||
varvalue=(char *)malloc(strlen(varvalue_in)*2+1);
|
|
||||||
DoEscapeString(varname, varname_in, strlen(varname_in));
|
|
||||||
DoEscapeString(varvalue, varvalue_in, strlen(varvalue_in));
|
|
||||||
|
|
||||||
std::string query = StringFormat("Update variables set value='%s' WHERE varname like '%s'", varvalue, varname);
|
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
if (!results.Success())
|
if (!results.Success())
|
||||||
{
|
|
||||||
free(varname);
|
|
||||||
free(varvalue);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
|
|
||||||
if (results.RowsAffected() == 1)
|
if (results.RowsAffected() == 1)
|
||||||
{
|
{
|
||||||
LoadVariables(); // refresh cache
|
LoadVariables(); // refresh cache
|
||||||
free(varname);
|
|
||||||
free(varvalue);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
query = StringFormat("Insert Into variables (varname, value) values ('%s', '%s')", varname, varvalue);
|
query = StringFormat("Insert Into variables (varname, value) values ('%s', '%s')", escaped_name.c_str(), escaped_value.c_str());
|
||||||
results = QueryDatabase(query);
|
results = QueryDatabase(query);
|
||||||
free(varname);
|
|
||||||
free(varvalue);
|
|
||||||
|
|
||||||
if (results.RowsAffected() != 1)
|
if (results.RowsAffected() != 1)
|
||||||
return false;
|
return false;
|
||||||
@ -1183,21 +1102,16 @@ bool Database::CheckNameFilter(const char* name, bool surname)
|
|||||||
{
|
{
|
||||||
std::string str_name = name;
|
std::string str_name = name;
|
||||||
|
|
||||||
if(surname)
|
// the minimum 4 is enforced by the client too
|
||||||
|
if (!name || strlen(name) < 4)
|
||||||
{
|
{
|
||||||
// the minimum 4 is enforced by the client too
|
return false;
|
||||||
if(!name || strlen(name) < 3)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
// Given name length is enforced by the client too
|
||||||
|
if (!surname && strlen(name) > 15)
|
||||||
{
|
{
|
||||||
// the minimum 4 is enforced by the client too
|
return false;
|
||||||
if(!name || strlen(name) < 4 || strlen(name) > 15)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < str_name.size(); i++)
|
for (size_t i = 0; i < str_name.size(); i++)
|
||||||
@ -1384,7 +1298,7 @@ bool Database::MoveCharacterToZone(const char* charname, const char* zonename) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Database::MoveCharacterToZone(uint32 iCharID, const char* iZonename) {
|
bool Database::MoveCharacterToZone(uint32 iCharID, const char* iZonename) {
|
||||||
std::string query = StringFormat("UPDATE `character_data` SET `zone_id` = %i, `x` = -1, `y` = -1, `z` = -1 WHERE `id` = %i", iZonename, GetZoneID(iZonename), iCharID);
|
std::string query = StringFormat("UPDATE `character_data` SET `zone_id` = %i, `x` = -1, `y` = -1, `z` = -1 WHERE `id` = %i", GetZoneID(iZonename), iCharID);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
@ -1560,11 +1474,12 @@ void Database::SetFirstLogon(uint32 CharID, uint8 firstlogon) {
|
|||||||
QueryDatabase(query);
|
QueryDatabase(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::AddReport(std::string who, std::string against, std::string lines) {
|
void Database::AddReport(std::string who, std::string against, std::string lines)
|
||||||
char *escape_str = new char[lines.size()*2+1];
|
{
|
||||||
|
auto escape_str = new char[lines.size() * 2 + 1];
|
||||||
DoEscapeString(escape_str, lines.c_str(), lines.size());
|
DoEscapeString(escape_str, lines.c_str(), lines.size());
|
||||||
|
|
||||||
std::string query = StringFormat("INSERT INTO reports (name, reported, reported_text) VALUES('%s', '%s', '%s')", who.c_str(), against.c_str(), escape_str);
|
std::string query = StringFormat("INSERT INTO reports (name, reported, reported_text) VALUES('%s', '%s', '%s')", EscapeString(who).c_str(), EscapeString(against).c_str(), escape_str);
|
||||||
QueryDatabase(query);
|
QueryDatabase(query);
|
||||||
safe_delete_array(escape_str);
|
safe_delete_array(escape_str);
|
||||||
}
|
}
|
||||||
@ -2173,3 +2088,51 @@ void Database::LoadLogSettings(EQEmuLogSys::LogSettings* log_settings)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Database::ClearInvSnapshots(bool use_rule)
|
||||||
|
{
|
||||||
|
uint32 del_time = time(nullptr);
|
||||||
|
if (use_rule) { del_time -= RuleI(Character, InvSnapshotHistoryD) * 86400; }
|
||||||
|
|
||||||
|
std::string query = StringFormat("DELETE FROM inventory_snapshots WHERE time_index <= %lu", (unsigned long)del_time);
|
||||||
|
QueryDatabase(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
struct TimeOfDay_Struct Database::LoadTime(time_t &realtime)
|
||||||
|
{
|
||||||
|
|
||||||
|
TimeOfDay_Struct eqTime;
|
||||||
|
std::string query = StringFormat("SELECT minute,hour,day,month,year,realtime FROM eqtime limit 1");
|
||||||
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
|
if (!results.Success() || results.RowCount() == 0){
|
||||||
|
Log.Out(Logs::Detail, Logs::World_Server, "Loading EQ time of day failed. Using defaults.");
|
||||||
|
eqTime.minute = 0;
|
||||||
|
eqTime.hour = 9;
|
||||||
|
eqTime.day = 1;
|
||||||
|
eqTime.month = 1;
|
||||||
|
eqTime.year = 3100;
|
||||||
|
realtime = time(0);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
auto row = results.begin();
|
||||||
|
|
||||||
|
eqTime.minute = atoi(row[0]);
|
||||||
|
eqTime.hour = atoi(row[1]);
|
||||||
|
eqTime.day = atoi(row[2]);
|
||||||
|
eqTime.month = atoi(row[3]);
|
||||||
|
eqTime.year = atoi(row[4]);
|
||||||
|
realtime = atoi(row[5]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return eqTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Database::SaveTime(int8 minute, int8 hour, int8 day, int8 month, int16 year)
|
||||||
|
{
|
||||||
|
std::string query = StringFormat("UPDATE eqtime set minute = %d, hour = %d, day = %d, month = %d, year = %d, realtime = %d limit 1", minute, hour, day, month, year, time(0));
|
||||||
|
auto results = QueryDatabase(query);
|
||||||
|
|
||||||
|
return results.Success();
|
||||||
|
|
||||||
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
#include "global_define.h"
|
#include "global_define.h"
|
||||||
#include "eqemu_logsys.h"
|
#include "eqemu_logsys.h"
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "dbcore.h"
|
#include "dbcore.h"
|
||||||
#include "linked_list.h"
|
#include "linked_list.h"
|
||||||
@ -66,8 +67,14 @@ struct npcDecayTimes_Struct {
|
|||||||
|
|
||||||
|
|
||||||
struct VarCache_Struct {
|
struct VarCache_Struct {
|
||||||
char varname[26];
|
std::map<std::string, std::string> m_cache;
|
||||||
char value[0];
|
uint32 last_update;
|
||||||
|
VarCache_Struct() : last_update(0) { }
|
||||||
|
void Add(const std::string &key, const std::string &value) { m_cache[key] = value; }
|
||||||
|
const std::string *Get(const std::string &key) {
|
||||||
|
auto it = m_cache.find(key);
|
||||||
|
return (it != m_cache.end() ? &it->second : nullptr);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class PTimerList;
|
class PTimerList;
|
||||||
@ -87,7 +94,7 @@ class Database : public DBcore {
|
|||||||
public:
|
public:
|
||||||
Database();
|
Database();
|
||||||
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
Database(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
||||||
bool Connect(const char* host, const char* user, const char* passwd, const char* database,uint32 port);
|
bool Connect(const char* host, const char* user, const char* passwd, const char* database, uint32 port);
|
||||||
~Database();
|
~Database();
|
||||||
|
|
||||||
/* Character Creation */
|
/* Character Creation */
|
||||||
@ -209,17 +216,14 @@ public:
|
|||||||
/* Database Conversions 'database_conversions.cpp' */
|
/* Database Conversions 'database_conversions.cpp' */
|
||||||
|
|
||||||
bool CheckDatabaseConversions();
|
bool CheckDatabaseConversions();
|
||||||
bool CheckDatabaseConvertBotsPostPPDeblob();
|
|
||||||
bool CheckDatabaseConvertCorpseDeblob();
|
bool CheckDatabaseConvertCorpseDeblob();
|
||||||
bool CheckDatabaseConvertPPDeblob();
|
bool CheckDatabaseConvertPPDeblob();
|
||||||
|
|
||||||
/* Database Variables */
|
/* Database Variables */
|
||||||
|
|
||||||
bool GetVariable(const char* varname, char* varvalue, uint16 varvalue_len);
|
bool GetVariable(std::string varname, std::string &varvalue);
|
||||||
bool SetVariable(const char* varname, const char* varvalue);
|
bool SetVariable(const std::string varname, const std::string &varvalue);
|
||||||
bool LoadVariables();
|
bool LoadVariables();
|
||||||
uint32 LoadVariables_MQ(char** query);
|
|
||||||
bool LoadVariables_result(MySQLRequestResult results);
|
|
||||||
|
|
||||||
/* General Queries */
|
/* General Queries */
|
||||||
|
|
||||||
@ -241,6 +245,8 @@ public:
|
|||||||
uint8 GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level);
|
uint8 GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level);
|
||||||
|
|
||||||
void AddReport(std::string who, std::string against, std::string lines);
|
void AddReport(std::string who, std::string against, std::string lines);
|
||||||
|
struct TimeOfDay_Struct LoadTime(time_t &realtime);
|
||||||
|
bool SaveTime(int8 minute, int8 hour, int8 day, int8 month, int16 year);
|
||||||
void ClearMerchantTemp();
|
void ClearMerchantTemp();
|
||||||
void ClearPTimers(uint32 charid);
|
void ClearPTimers(uint32 charid);
|
||||||
void SetFirstLogon(uint32 CharID, uint8 firstlogon);
|
void SetFirstLogon(uint32 CharID, uint8 firstlogon);
|
||||||
@ -248,18 +254,16 @@ public:
|
|||||||
void SetLFP(uint32 CharID, bool LFP);
|
void SetLFP(uint32 CharID, bool LFP);
|
||||||
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
|
void SetLoginFlags(uint32 CharID, bool LFP, bool LFG, uint8 firstlogon);
|
||||||
|
|
||||||
|
void ClearInvSnapshots(bool use_rule = true);
|
||||||
|
|
||||||
/* EQEmuLogSys */
|
/* EQEmuLogSys */
|
||||||
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
|
void LoadLogSettings(EQEmuLogSys::LogSettings* log_settings);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DBInitVars();
|
|
||||||
|
|
||||||
std::map<uint32,std::string> zonename_array;
|
std::map<uint32,std::string> zonename_array;
|
||||||
|
|
||||||
Mutex Mvarcache;
|
Mutex Mvarcache;
|
||||||
uint32 varcache_max;
|
VarCache_Struct varcache;
|
||||||
VarCache_Struct** varcache_array;
|
|
||||||
uint32 varcache_lastupdate;
|
|
||||||
|
|
||||||
/* Groups, utility methods. */
|
/* Groups, utility methods. */
|
||||||
void ClearAllGroupLeaders();
|
void ClearAllGroupLeaders();
|
||||||
|
|||||||
@ -186,7 +186,7 @@ namespace Convert {
|
|||||||
/*002*/ uint32 HP;
|
/*002*/ uint32 HP;
|
||||||
/*006*/ uint32 Mana;
|
/*006*/ uint32 Mana;
|
||||||
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
/*010*/ Convert::SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||||
/*510*/ uint32 Items[_MaterialCount];
|
/*510*/ uint32 Items[EQEmu::textures::TextureCount];
|
||||||
/*546*/ char Name[64];
|
/*546*/ char Name[64];
|
||||||
/*610*/
|
/*610*/
|
||||||
};
|
};
|
||||||
@ -227,9 +227,9 @@ namespace Convert {
|
|||||||
/*0304*/ uint8 ability_time_minutes;
|
/*0304*/ uint8 ability_time_minutes;
|
||||||
/*0305*/ uint8 ability_time_hours; //place holder
|
/*0305*/ uint8 ability_time_hours; //place holder
|
||||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||||
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
|
/*0312*/ uint32 item_material[EQEmu::textures::TextureCount]; // Item texture/material of worn/held items
|
||||||
/*0348*/ uint8 unknown0348[44];
|
/*0348*/ uint8 unknown0348[44];
|
||||||
/*0392*/ Convert::Color_Struct item_tint[_MaterialCount];
|
/*0392*/ Convert::Color_Struct item_tint[EQEmu::textures::TextureCount];
|
||||||
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
/*0428*/ Convert::AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||||
/*2352*/ char servername[32]; // length probably not right
|
/*2352*/ char servername[32]; // length probably not right
|
||||||
@ -330,7 +330,7 @@ namespace Convert {
|
|||||||
/*7212*/ uint32 tribute_points;
|
/*7212*/ uint32 tribute_points;
|
||||||
/*7216*/ uint32 unknown7252;
|
/*7216*/ uint32 unknown7252;
|
||||||
/*7220*/ uint32 tribute_active; //1=active
|
/*7220*/ uint32 tribute_active; //1=active
|
||||||
/*7224*/ Convert::Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
|
/*7224*/ Convert::Tribute_Struct tributes[EQEmu::legacy::TRIBUTE_SIZE];
|
||||||
/*7264*/ Convert::Disciplines_Struct disciplines;
|
/*7264*/ Convert::Disciplines_Struct disciplines;
|
||||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||||
/*7744*/ char unknown7780[160];
|
/*7744*/ char unknown7780[160];
|
||||||
@ -470,7 +470,6 @@ static inline void loadbar(unsigned int x, unsigned int n, unsigned int w = 50)
|
|||||||
|
|
||||||
bool Database::CheckDatabaseConversions() {
|
bool Database::CheckDatabaseConversions() {
|
||||||
CheckDatabaseConvertPPDeblob();
|
CheckDatabaseConvertPPDeblob();
|
||||||
CheckDatabaseConvertBotsPostPPDeblob();
|
|
||||||
CheckDatabaseConvertCorpseDeblob();
|
CheckDatabaseConvertCorpseDeblob();
|
||||||
|
|
||||||
/* Fetch Automatic Upgrade Script */
|
/* Fetch Automatic Upgrade Script */
|
||||||
@ -494,7 +493,7 @@ bool Database::CheckDatabaseConversions() {
|
|||||||
/* Check for a new version of this script, the arg passed
|
/* Check for a new version of this script, the arg passed
|
||||||
would have to be higher than the copy they have downloaded
|
would have to be higher than the copy they have downloaded
|
||||||
locally and they will re fetch */
|
locally and they will re fetch */
|
||||||
system("perl eqemu_update.pl V 2");
|
system("perl eqemu_update.pl V 14");
|
||||||
|
|
||||||
/* Run Automatic Database Upgrade Script */
|
/* Run Automatic Database Upgrade Script */
|
||||||
system("perl eqemu_update.pl ran_from_world");
|
system("perl eqemu_update.pl ran_from_world");
|
||||||
@ -1417,7 +1416,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||||
/* Run Material Color Convert */
|
/* Run Material Color Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < _MaterialCount; i++){
|
for (i = 0; i < EQEmu::textures::TextureCount; i++){
|
||||||
if (pp->item_tint[i].color > 0){
|
if (pp->item_tint[i].color > 0){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
rquery = StringFormat("REPLACE INTO `character_material` (id, slot, blue, green, red, use_tint, color) VALUES (%u, %u, %u, %u, %u, %u, %u)", character_id, i, pp->item_tint[i].rgb.blue, pp->item_tint[i].rgb.green, pp->item_tint[i].rgb.red, pp->item_tint[i].rgb.use_tint, pp->item_tint[i].color);
|
||||||
@ -1429,7 +1428,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
if (rquery != ""){ results = QueryDatabase(rquery); }
|
if (rquery != ""){ results = QueryDatabase(rquery); }
|
||||||
/* Run Tribute Convert */
|
/* Run Tribute Convert */
|
||||||
first_entry = 0; rquery = "";
|
first_entry = 0; rquery = "";
|
||||||
for (i = 0; i < EmuConstants::TRIBUTE_SIZE; i++){
|
for (i = 0; i < EQEmu::legacy::TRIBUTE_SIZE; i++){
|
||||||
if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != 4294967295){
|
if (pp->tributes[i].tribute > 0 && pp->tributes[i].tribute != 4294967295){
|
||||||
if (first_entry != 1){
|
if (first_entry != 1){
|
||||||
rquery = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
rquery = StringFormat("REPLACE INTO `character_tribute` (id, tier, tribute) VALUES (%u, %u, %u)", character_id, pp->tributes[i].tier, pp->tributes[i].tribute);
|
||||||
@ -1491,163 +1490,6 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::CheckDatabaseConvertBotsPostPPDeblob(){
|
|
||||||
#ifdef BOTS
|
|
||||||
int runbotsconvert = 0;
|
|
||||||
|
|
||||||
/* Check For Legacy Bot References */
|
|
||||||
std::string rquery = StringFormat("SHOW CREATE VIEW `vwBotCharacterMobs`");
|
|
||||||
auto results = QueryDatabase(rquery);
|
|
||||||
if (results.RowCount() == 1){
|
|
||||||
auto row = results.begin();
|
|
||||||
std::string table_check = row[1];
|
|
||||||
|
|
||||||
if (table_check.find("character_data") == -1){
|
|
||||||
runbotsconvert = 1;
|
|
||||||
printf("\n\n::: Legacy Bot Views and Function Detected... \n");
|
|
||||||
printf("----------------------------------------------------------\n\n");
|
|
||||||
printf(" Database currently has bot view/function linkage to obselete \n");
|
|
||||||
printf(" table references and will now be converted...\n\n");
|
|
||||||
printf(" It is recommended that you backup your database \n");
|
|
||||||
printf(" before continuing the automatic conversion process...\n\n");
|
|
||||||
printf("----------------------------------------------------------\n\n");
|
|
||||||
std::cout << "Press ENTER to continue....." << std::endl << std::endl;
|
|
||||||
std::cin.ignore(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runbotsconvert == 1){
|
|
||||||
printf("Running bot views/function database conversion... \n");
|
|
||||||
|
|
||||||
/* Update view `vwbotcharactermobs` */
|
|
||||||
rquery = StringFormat("DROP VIEW `vwBotCharacterMobs`;");
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
rquery = StringFormat(
|
|
||||||
"CREATE VIEW `vwBotCharacterMobs` AS\n"
|
|
||||||
"SELECT _utf8'C' AS mobtype,\n" // Natedog: '_utf8'
|
|
||||||
"c.`id`,\n"
|
|
||||||
"c.`name`,\n"
|
|
||||||
"c.`class`,\n"
|
|
||||||
"c.`level`,\n"
|
|
||||||
"c.`last_login`,\n"
|
|
||||||
"c.`zone_id`\n"
|
|
||||||
"FROM `character_data` AS c\n"
|
|
||||||
"UNION ALL\n"
|
|
||||||
"SELECT _utf8'B' AS mobtype,\n" // Natedog: '_utf8'
|
|
||||||
"b.`BotID` AS id,\n"
|
|
||||||
"b.`Name` AS name,\n"
|
|
||||||
"b.`Class` AS class,\n"
|
|
||||||
"b.`BotLevel` AS level,\n"
|
|
||||||
"0 AS timelaston,\n"
|
|
||||||
"0 AS zoneid\n"
|
|
||||||
"FROM bots AS b;"
|
|
||||||
);
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
|
|
||||||
/* Update function `GetMobType` */
|
|
||||||
rquery = StringFormat("DROP FUNCTION IF EXISTS `GetMobType`;");
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
rquery = StringFormat(
|
|
||||||
"CREATE FUNCTION `GetMobType` (mobname VARCHAR(64)) RETURNS CHAR(1)\n"
|
|
||||||
"BEGIN\n"
|
|
||||||
" DECLARE Result CHAR(1);\n"
|
|
||||||
"\n"
|
|
||||||
" SET Result = NULL;\n"
|
|
||||||
"\n"
|
|
||||||
" IF (SELECT COUNT(*) FROM `character_data` WHERE `name` = mobname) > 0 THEN\n"
|
|
||||||
" SET Result = 'C';\n"
|
|
||||||
" ELSEIF (SELECT COUNT(*) FROM `bots` WHERE `Name` = mobname) > 0 THEN\n"
|
|
||||||
" SET Result = 'B';\n"
|
|
||||||
" END IF;\n "
|
|
||||||
"\n"
|
|
||||||
" RETURN Result;\n"
|
|
||||||
"END"
|
|
||||||
);
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
|
|
||||||
/* Update view `vwgroups` */
|
|
||||||
rquery = StringFormat("DROP VIEW IF EXISTS `vwGroups`;");
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
rquery = StringFormat(
|
|
||||||
"CREATE VIEW `vwGroups` AS\n"
|
|
||||||
"SELECT g.`groupid` AS groupid,\n"
|
|
||||||
"GetMobType(g.`name`) AS mobtype,\n"
|
|
||||||
"g.`name` AS name,\n"
|
|
||||||
"g.`charid` AS mobid,\n"
|
|
||||||
"IFNULL(c.`level`, b.`BotLevel`) AS level\n"
|
|
||||||
"FROM `group_id` AS g\n"
|
|
||||||
"LEFT JOIN `character_data` AS c ON g.`name` = c.`name`\n"
|
|
||||||
"LEFT JOIN `bots` AS b ON g.`name` = b.`Name`;"
|
|
||||||
);
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
|
|
||||||
/* Update view `vwbotgroups` */
|
|
||||||
rquery = StringFormat("DROP VIEW IF EXISTS `vwBotGroups`;");
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
rquery = StringFormat(
|
|
||||||
"CREATE VIEW `vwBotGroups` AS\n"
|
|
||||||
"SELECT g.`BotGroupId`,\n"
|
|
||||||
"g.`BotGroupName`,\n"
|
|
||||||
"g.`BotGroupLeaderBotId`,\n"
|
|
||||||
"b.`Name` AS BotGroupLeaderName,\n"
|
|
||||||
"b.`BotOwnerCharacterId`,\n"
|
|
||||||
"c.`name` AS BotOwnerCharacterName\n"
|
|
||||||
"FROM `botgroup` AS g\n"
|
|
||||||
"JOIN `bots` AS b ON g.`BotGroupLeaderBotId` = b.`BotID`\n"
|
|
||||||
"JOIN `character_data` AS c ON b.`BotOwnerCharacterID` = c.`id`\n"
|
|
||||||
"ORDER BY b.`BotOwnerCharacterId`, g.`BotGroupName`;"
|
|
||||||
);
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
|
|
||||||
/* Update view `vwguildmembers` */
|
|
||||||
rquery = StringFormat("DROP VIEW IF EXISTS `vwGuildMembers`;");
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
|
|
||||||
rquery = StringFormat(
|
|
||||||
"CREATE VIEW `vwGuildMembers` AS\n"
|
|
||||||
"SELECT 'C' AS mobtype,\n"
|
|
||||||
"cm.`char_id`,\n"
|
|
||||||
"cm.`guild_id`,\n"
|
|
||||||
"cm.`rank`,\n"
|
|
||||||
"cm.`tribute_enable`,\n"
|
|
||||||
"cm.`total_tribute`,\n"
|
|
||||||
"cm.`last_tribute`,\n"
|
|
||||||
"cm.`banker`,\n"
|
|
||||||
"cm.`public_note`,\n"
|
|
||||||
"cm.`alt`\n"
|
|
||||||
"FROM `guild_members` AS cm\n"
|
|
||||||
"UNION ALL\n"
|
|
||||||
"SELECT 'B' AS mobtype,\n"
|
|
||||||
"bm.`char_id`,\n"
|
|
||||||
"bm.`guild_id`,\n"
|
|
||||||
"bm.`rank`,\n"
|
|
||||||
"bm.`tribute_enable`,\n"
|
|
||||||
"bm.`total_tribute`,\n"
|
|
||||||
"bm.`last_tribute`,\n"
|
|
||||||
"bm.`banker`,\n"
|
|
||||||
"bm.`public_note`,\n"
|
|
||||||
"bm.`alt`\n"
|
|
||||||
"FROM `botguildmembers` AS bm;"
|
|
||||||
);
|
|
||||||
results = QueryDatabase(rquery);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runbotsconvert == 1){
|
|
||||||
printf("\n\nBot views/function conversion complete, continuing world bootup...\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Database::CheckDatabaseConvertCorpseDeblob(){
|
bool Database::CheckDatabaseConvertCorpseDeblob(){
|
||||||
Convert::DBPlayerCorpse_Struct_temp* dbpc;
|
Convert::DBPlayerCorpse_Struct_temp* dbpc;
|
||||||
Convert::classic_db_temp::DBPlayerCorpse_Struct_temp* dbpc_c;
|
Convert::classic_db_temp::DBPlayerCorpse_Struct_temp* dbpc_c;
|
||||||
|
|||||||
@ -98,14 +98,14 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
|||||||
|
|
||||||
pStatus = Error;
|
pStatus = Error;
|
||||||
|
|
||||||
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
|
auto errorBuffer = new char[MYSQL_ERRMSG_SIZE];
|
||||||
|
|
||||||
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
||||||
|
|
||||||
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
|
return MySQLRequestResult(nullptr, 0, 0, 0, 0, (uint32)mysql_errno(&mysql), errorBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *errorBuffer = new char[MYSQL_ERRMSG_SIZE];
|
auto errorBuffer = new char[MYSQL_ERRMSG_SIZE];
|
||||||
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
snprintf(errorBuffer, MYSQL_ERRMSG_SIZE, "#%i: %s", mysql_errno(&mysql), mysql_error(&mysql));
|
||||||
|
|
||||||
/* Implement Logging at the Root */
|
/* Implement Logging at the Root */
|
||||||
@ -128,7 +128,12 @@ MySQLRequestResult DBcore::QueryDatabase(const char* query, uint32 querylen, boo
|
|||||||
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
MySQLRequestResult requestResult(res, (uint32)mysql_affected_rows(&mysql), rowCount, (uint32)mysql_field_count(&mysql), (uint32)mysql_insert_id(&mysql));
|
||||||
|
|
||||||
if (Log.log_settings[Logs::MySQLQuery].is_category_enabled == 1)
|
if (Log.log_settings[Logs::MySQLQuery].is_category_enabled == 1)
|
||||||
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u rows returned)", query, rowCount, requestResult.RowCount());
|
{
|
||||||
|
if ((strncasecmp(query, "select", 6) == 0))
|
||||||
|
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u row%s returned)", query, requestResult.RowCount(), requestResult.RowCount() == 1 ? "" : "s");
|
||||||
|
else
|
||||||
|
Log.Out(Logs::General, Logs::MySQLQuery, "%s (%u row%s affected)", query, requestResult.RowsAffected(), requestResult.RowsAffected() == 1 ? "" : "s");
|
||||||
|
}
|
||||||
|
|
||||||
return requestResult;
|
return requestResult;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define DBCORE_H
|
#define DBCORE_H
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
149
common/deity.cpp
Normal file
149
common/deity.cpp
Normal file
@ -0,0 +1,149 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "deity.h"
|
||||||
|
|
||||||
|
|
||||||
|
EQEmu::deity::DeityTypeBit EQEmu::deity::ConvertDeityTypeToDeityTypeBit(DeityType deity_type)
|
||||||
|
{
|
||||||
|
switch (deity_type) {
|
||||||
|
case DeityBertoxxulous:
|
||||||
|
return bit_DeityBertoxxulous;
|
||||||
|
case DeityBrellSirilis:
|
||||||
|
return bit_DeityBrellSirilis;
|
||||||
|
case DeityCazicThule:
|
||||||
|
return bit_DeityCazicThule;
|
||||||
|
case DeityErollisiMarr:
|
||||||
|
return bit_DeityErollisiMarr;
|
||||||
|
case DeityBristlebane:
|
||||||
|
return bit_DeityBristlebane;
|
||||||
|
case DeityInnoruuk:
|
||||||
|
return bit_DeityInnoruuk;
|
||||||
|
case DeityKarana:
|
||||||
|
return bit_DeityKarana;
|
||||||
|
case DeityMithanielMarr:
|
||||||
|
return bit_DeityMithanielMarr;
|
||||||
|
case DeityPrexus:
|
||||||
|
return bit_DeityPrexus;
|
||||||
|
case DeityQuellious:
|
||||||
|
return bit_DeityQuellious;
|
||||||
|
case DeityRallosZek:
|
||||||
|
return bit_DeityRallosZek;
|
||||||
|
case DeityRodcetNife:
|
||||||
|
return bit_DeityRodcetNife;
|
||||||
|
case DeitySolusekRo:
|
||||||
|
return bit_DeitySolusekRo;
|
||||||
|
case DeityTheTribunal:
|
||||||
|
return bit_DeityTheTribunal;
|
||||||
|
case DeityTunare:
|
||||||
|
return bit_DeityTunare;
|
||||||
|
case DeityVeeshan:
|
||||||
|
return bit_DeityVeeshan;
|
||||||
|
case DeityAgnostic_LB:
|
||||||
|
case DeityAgnostic:
|
||||||
|
return bit_DeityAgnostic;
|
||||||
|
default:
|
||||||
|
return bit_DeityAll;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::deity::DeityType EQEmu::deity::ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit)
|
||||||
|
{
|
||||||
|
switch (deity_type_bit) {
|
||||||
|
case bit_DeityAgnostic:
|
||||||
|
return DeityAgnostic;
|
||||||
|
case bit_DeityBertoxxulous:
|
||||||
|
return DeityBertoxxulous;
|
||||||
|
case bit_DeityBrellSirilis:
|
||||||
|
return DeityBrellSirilis;
|
||||||
|
case bit_DeityCazicThule:
|
||||||
|
return DeityCazicThule;
|
||||||
|
case bit_DeityErollisiMarr:
|
||||||
|
return DeityErollisiMarr;
|
||||||
|
case bit_DeityBristlebane:
|
||||||
|
return DeityBristlebane;
|
||||||
|
case bit_DeityInnoruuk:
|
||||||
|
return DeityInnoruuk;
|
||||||
|
case bit_DeityKarana:
|
||||||
|
return DeityKarana;
|
||||||
|
case bit_DeityMithanielMarr:
|
||||||
|
return DeityMithanielMarr;
|
||||||
|
case bit_DeityPrexus:
|
||||||
|
return DeityPrexus;
|
||||||
|
case bit_DeityQuellious:
|
||||||
|
return DeityQuellious;
|
||||||
|
case bit_DeityRallosZek:
|
||||||
|
return DeityRallosZek;
|
||||||
|
case bit_DeityRodcetNife:
|
||||||
|
return DeityRodcetNife;
|
||||||
|
case bit_DeitySolusekRo:
|
||||||
|
return DeitySolusekRo;
|
||||||
|
case bit_DeityTheTribunal:
|
||||||
|
return DeityTheTribunal;
|
||||||
|
case bit_DeityTunare:
|
||||||
|
return DeityTunare;
|
||||||
|
case bit_DeityVeeshan:
|
||||||
|
return DeityVeeshan;
|
||||||
|
default:
|
||||||
|
return DeityUnknown;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* EQEmu::deity::DeityName(DeityType deity_type)
|
||||||
|
{
|
||||||
|
switch (deity_type) {
|
||||||
|
case DeityBertoxxulous:
|
||||||
|
return "Bertoxxulous";
|
||||||
|
case DeityBrellSirilis:
|
||||||
|
return "Brell Serilis";
|
||||||
|
case DeityCazicThule:
|
||||||
|
return "Cazic-Thule";
|
||||||
|
case DeityErollisiMarr:
|
||||||
|
return "Erollisi Marr";
|
||||||
|
case DeityBristlebane:
|
||||||
|
return "Bristlebane";
|
||||||
|
case DeityInnoruuk:
|
||||||
|
return "Innoruuk";
|
||||||
|
case DeityKarana:
|
||||||
|
return "Karana";
|
||||||
|
case DeityMithanielMarr:
|
||||||
|
return "Mithaniel Marr";
|
||||||
|
case DeityPrexus:
|
||||||
|
return "Prexus";
|
||||||
|
case DeityQuellious:
|
||||||
|
return "Quellious";
|
||||||
|
case DeityRallosZek:
|
||||||
|
return "Rallos Zek";
|
||||||
|
case DeityRodcetNife:
|
||||||
|
return "Rodcet Nife";
|
||||||
|
case DeitySolusekRo:
|
||||||
|
return "Solusek Ro";
|
||||||
|
case DeityTheTribunal:
|
||||||
|
return "The Tribunal";
|
||||||
|
case DeityTunare:
|
||||||
|
return "Tunare";
|
||||||
|
case DeityVeeshan:
|
||||||
|
return "Veeshan";
|
||||||
|
case DeityAgnostic_LB:
|
||||||
|
case DeityAgnostic:
|
||||||
|
return "Agnostic";
|
||||||
|
default:
|
||||||
|
return "Unknown";
|
||||||
|
};
|
||||||
|
}
|
||||||
196
common/deity.h
196
common/deity.h
@ -1,5 +1,6 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2002 EQEMu Development Team (http://eqemu.org)
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemu.org)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -13,154 +14,67 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef DEITY_H
|
|
||||||
#define DEITY_H
|
#ifndef COMMON_DEITY_H
|
||||||
|
#define COMMON_DEITY_H
|
||||||
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include <string>
|
|
||||||
|
|
||||||
// NOTE: This code is not fully implemented since there are no references in the existing code
|
|
||||||
|
|
||||||
/*
|
namespace EQEmu
|
||||||
** Diety types
|
|
||||||
**
|
|
||||||
** (ref: eqstr_us.txt)
|
|
||||||
**
|
|
||||||
** (Another orphaned enumeration...)
|
|
||||||
*/
|
|
||||||
enum DeityTypes
|
|
||||||
{
|
{
|
||||||
/*----*/ DeityUnknown = 0,
|
namespace deity {
|
||||||
/*----*/ DeityAgnostic_LB = 140,
|
enum DeityType {
|
||||||
/*3251*/ DeityBertoxxulous = 201,
|
DeityUnknown = 0,
|
||||||
/*3262*/ DeityBrellSirilis,
|
DeityAgnostic_LB = 140,
|
||||||
/*3253*/ DeityCazicThule,
|
DeityBertoxxulous = 201,
|
||||||
/*3256*/ DeityErollisiMarr,
|
DeityBrellSirilis,
|
||||||
/*3252*/ DeityBristlebane,
|
DeityCazicThule,
|
||||||
/*3254*/ DeityInnoruuk,
|
DeityErollisiMarr,
|
||||||
/*3255*/ DeityKarana,
|
DeityBristlebane,
|
||||||
/*3257*/ DeityMithanielMarr,
|
DeityInnoruuk,
|
||||||
/*3259*/ DeityPrexus,
|
DeityKarana,
|
||||||
/*3260*/ DeityQuellious,
|
DeityMithanielMarr,
|
||||||
/*3266*/ DeityRallosZek,
|
DeityPrexus,
|
||||||
/*3258*/ DeityRodcetNife,
|
DeityQuellious,
|
||||||
/*3261*/ DeitySolusekRo,
|
DeityRallosZek,
|
||||||
/*3263*/ DeityTheTribunal,
|
DeityRodcetNife,
|
||||||
/*3264*/ DeityTunare,
|
DeitySolusekRo,
|
||||||
/*3265*/ DeityVeeshan,
|
DeityTheTribunal,
|
||||||
/*3250*/ DeityAgnostic = 396
|
DeityTunare,
|
||||||
};
|
DeityVeeshan,
|
||||||
|
DeityAgnostic = 396
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
enum DeityTypeBit : uint32 {
|
||||||
** Deity type bits
|
bit_DeityAll = 0x00000000,
|
||||||
**
|
bit_DeityAgnostic = 0x00000001,
|
||||||
** (New orphan, but make use of it!)
|
bit_DeityBertoxxulous = 0x00000002,
|
||||||
*/
|
bit_DeityBrellSirilis = 0x00000004,
|
||||||
enum DeityTypeBits : uint32
|
bit_DeityCazicThule = 0x00000008,
|
||||||
{
|
bit_DeityErollisiMarr = 0x00000010,
|
||||||
BIT_DeityAll = 0x00000000,
|
bit_DeityBristlebane = 0x00000020,
|
||||||
BIT_DeityAgnostic = 0x00000001,
|
bit_DeityInnoruuk = 0x00000040,
|
||||||
BIT_DeityBertoxxulous = 0x00000002,
|
bit_DeityKarana = 0x00000080,
|
||||||
BIT_DeityBrellSirilis = 0x00000004,
|
bit_DeityMithanielMarr = 0x00000100,
|
||||||
BIT_DeityCazicThule = 0x00000008,
|
bit_DeityPrexus = 0x00000200,
|
||||||
BIT_DeityErollisiMarr = 0x00000010,
|
bit_DeityQuellious = 0x00000400,
|
||||||
BIT_DeityBristlebane = 0x00000020,
|
bit_DeityRallosZek = 0x00000800,
|
||||||
BIT_DeityInnoruuk = 0x00000040,
|
bit_DeityRodcetNife = 0x00001000,
|
||||||
BIT_DeityKarana = 0x00000080,
|
bit_DeitySolusekRo = 0x00002000,
|
||||||
BIT_DeityMithanielMarr = 0x00000100,
|
bit_DeityTheTribunal = 0x00004000,
|
||||||
BIT_DeityPrexus = 0x00000200,
|
bit_DeityTunare = 0x00008000,
|
||||||
BIT_DeityQuellious = 0x00000400,
|
bit_DeityVeeshan = 0x00010000
|
||||||
BIT_DeityRallosZek = 0x00000800,
|
};
|
||||||
BIT_DeityRodcetNife = 0x00001000,
|
|
||||||
BIT_DeitySolusekRo = 0x00002000,
|
|
||||||
BIT_DeityTheTribunal = 0x00004000,
|
|
||||||
BIT_DeityTunare = 0x00008000,
|
|
||||||
BIT_DeityVeeshan = 0x00010000
|
|
||||||
};
|
|
||||||
|
|
||||||
static DeityTypeBits ConvertDeityToBitDeity(DeityTypes deity)
|
extern DeityTypeBit ConvertDeityTypeToDeityTypeBit(DeityType deity_type);
|
||||||
{
|
extern DeityType ConvertDeityTypeBitToDeityType(DeityTypeBit deity_type_bit);
|
||||||
switch(deity)
|
extern const char* DeityName(DeityType deity_type);
|
||||||
{
|
|
||||||
case DeityBertoxxulous: { return BIT_DeityBertoxxulous; }
|
|
||||||
case DeityBrellSirilis: { return BIT_DeityBrellSirilis; }
|
|
||||||
case DeityCazicThule: { return BIT_DeityCazicThule; }
|
|
||||||
case DeityErollisiMarr: { return BIT_DeityErollisiMarr; }
|
|
||||||
case DeityBristlebane: { return BIT_DeityBristlebane; }
|
|
||||||
case DeityInnoruuk: { return BIT_DeityInnoruuk; }
|
|
||||||
case DeityKarana: { return BIT_DeityKarana; }
|
|
||||||
case DeityMithanielMarr: { return BIT_DeityMithanielMarr; }
|
|
||||||
case DeityPrexus: { return BIT_DeityPrexus; }
|
|
||||||
case DeityQuellious: { return BIT_DeityQuellious; }
|
|
||||||
case DeityRallosZek: { return BIT_DeityRallosZek; }
|
|
||||||
case DeityRodcetNife: { return BIT_DeityRodcetNife; }
|
|
||||||
case DeitySolusekRo: { return BIT_DeitySolusekRo; }
|
|
||||||
case DeityTheTribunal: { return BIT_DeityTheTribunal; }
|
|
||||||
case DeityTunare: { return BIT_DeityTunare; }
|
|
||||||
case DeityVeeshan: { return BIT_DeityVeeshan; }
|
|
||||||
case DeityAgnostic_LB:
|
|
||||||
case DeityAgnostic: { return BIT_DeityAgnostic; }
|
|
||||||
default: { break; }
|
|
||||||
};
|
|
||||||
|
|
||||||
return BIT_DeityAll;
|
} /*deity*/
|
||||||
};
|
|
||||||
|
|
||||||
static DeityTypes ConvertBitDeityToDeity(DeityTypeBits deity_bit)
|
} /*EQEmu*/
|
||||||
{
|
|
||||||
switch(deity_bit)
|
|
||||||
{
|
|
||||||
case BIT_DeityAgnostic: { return DeityAgnostic; }
|
|
||||||
case BIT_DeityBertoxxulous: { return DeityBertoxxulous; }
|
|
||||||
case BIT_DeityBrellSirilis: { return DeityBrellSirilis; }
|
|
||||||
case BIT_DeityCazicThule: { return DeityCazicThule; }
|
|
||||||
case BIT_DeityErollisiMarr: { return DeityErollisiMarr; }
|
|
||||||
case BIT_DeityBristlebane: { return DeityBristlebane; }
|
|
||||||
case BIT_DeityInnoruuk: { return DeityInnoruuk; }
|
|
||||||
case BIT_DeityKarana: { return DeityKarana; }
|
|
||||||
case BIT_DeityMithanielMarr: { return DeityMithanielMarr; }
|
|
||||||
case BIT_DeityPrexus: { return DeityPrexus; }
|
|
||||||
case BIT_DeityQuellious: { return DeityQuellious; }
|
|
||||||
case BIT_DeityRallosZek: { return DeityRallosZek; }
|
|
||||||
case BIT_DeityRodcetNife: { return DeityRodcetNife; }
|
|
||||||
case BIT_DeitySolusekRo: { return DeitySolusekRo; }
|
|
||||||
case BIT_DeityTheTribunal: { return DeityTheTribunal; }
|
|
||||||
case BIT_DeityTunare: { return DeityTunare; }
|
|
||||||
case BIT_DeityVeeshan: { return DeityVeeshan; }
|
|
||||||
default: { break; }
|
|
||||||
};
|
|
||||||
|
|
||||||
return DeityUnknown;
|
#endif /* COMMON_DEITY_H */
|
||||||
};
|
|
||||||
|
|
||||||
static std::string GetDeityName(DeityTypes deity)
|
|
||||||
{
|
|
||||||
switch(deity)
|
|
||||||
{
|
|
||||||
case DeityBertoxxulous: { return "Bertoxxulous"; }
|
|
||||||
case DeityBrellSirilis: { return "Brell Serilis"; }
|
|
||||||
case DeityCazicThule: { return "Cazic-Thule"; }
|
|
||||||
case DeityErollisiMarr: { return "Erollisi Marr"; }
|
|
||||||
case DeityBristlebane: { return "Bristlebane"; }
|
|
||||||
case DeityInnoruuk: { return "Innoruuk"; }
|
|
||||||
case DeityKarana: { return "Karana"; }
|
|
||||||
case DeityMithanielMarr: { return "Mithaniel Marr"; }
|
|
||||||
case DeityPrexus: { return "Prexus"; }
|
|
||||||
case DeityQuellious: { return "Quellious"; }
|
|
||||||
case DeityRallosZek: { return "Rallos Zek"; }
|
|
||||||
case DeityRodcetNife: { return "Rodcet Nife"; }
|
|
||||||
case DeitySolusekRo: { return "Solusek Ro"; }
|
|
||||||
case DeityTheTribunal: { return "The Tribunal"; }
|
|
||||||
case DeityTunare: { return "Tunare"; }
|
|
||||||
case DeityVeeshan: { return "Veeshan"; }
|
|
||||||
case DeityAgnostic_LB:
|
|
||||||
case DeityAgnostic: { return "Agnostic"; }
|
|
||||||
default: { break; }
|
|
||||||
};
|
|
||||||
|
|
||||||
return "Unknown";
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
20
common/emu_constants.cpp
Normal file
20
common/emu_constants.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_constants.h"
|
||||||
70
common/emu_constants.h
Normal file
70
common/emu_constants.h
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_EMU_CONSTANTS_H
|
||||||
|
#define COMMON_EMU_CONSTANTS_H
|
||||||
|
|
||||||
|
#include "eq_limits.h"
|
||||||
|
#include "emu_legacy.h"
|
||||||
|
#include "emu_versions.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace inventory {
|
||||||
|
//using namespace RoF2::invtype;
|
||||||
|
//using namespace RoF2::invslot;
|
||||||
|
//using namespace RoF2::invbag;
|
||||||
|
//using namespace RoF2::invaug;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace constants {
|
||||||
|
const EQEmu::versions::ClientVersion CharacterCreationClient = EQEmu::versions::ClientVersion::RoF2;
|
||||||
|
const size_t CharacterCreationMax = RoF2::constants::CharacterCreationLimit;
|
||||||
|
|
||||||
|
const size_t SayLinkBodySize = RoF2::constants::SayLinkBodySize;
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
MaxGems = 12,
|
||||||
|
Ability = 20, // HT/LoH for Tit
|
||||||
|
PotionBelt = 21, // Tit uses a different slot for PB
|
||||||
|
Item = 22,
|
||||||
|
Discipline = 23,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||||
20
common/emu_legacy.cpp
Normal file
20
common/emu_legacy.cpp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_legacy.h"
|
||||||
256
common/emu_legacy.h
Normal file
256
common/emu_legacy.h
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_EMU_LEGACY_H
|
||||||
|
#define COMMON_EMU_LEGACY_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
// this is for perl and other legacy systems
|
||||||
|
namespace legacy {
|
||||||
|
enum InventorySlot {
|
||||||
|
SLOT_CHARM = 0,
|
||||||
|
SLOT_EAR01 = 1,
|
||||||
|
SLOT_HEAD = 2,
|
||||||
|
SLOT_FACE = 3,
|
||||||
|
SLOT_EAR02 = 4,
|
||||||
|
SLOT_NECK = 5,
|
||||||
|
SLOT_SHOULDER = 6,
|
||||||
|
SLOT_ARMS = 7,
|
||||||
|
SLOT_BACK = 8,
|
||||||
|
SLOT_BRACER01 = 9,
|
||||||
|
SLOT_BRACER02 = 10,
|
||||||
|
SLOT_RANGE = 11,
|
||||||
|
SLOT_HANDS = 12,
|
||||||
|
SLOT_PRIMARY = 13,
|
||||||
|
SLOT_SECONDARY = 14,
|
||||||
|
SLOT_RING01 = 15,
|
||||||
|
SLOT_RING02 = 16,
|
||||||
|
SLOT_CHEST = 17,
|
||||||
|
SLOT_LEGS = 18,
|
||||||
|
SLOT_FEET = 19,
|
||||||
|
SLOT_WAIST = 20,
|
||||||
|
SLOT_POWER_SOURCE = 9999,
|
||||||
|
SLOT_AMMO = 21,
|
||||||
|
SLOT_GENERAL_1 = 22,
|
||||||
|
SLOT_GENERAL_2 = 23,
|
||||||
|
SLOT_GENERAL_3 = 24,
|
||||||
|
SLOT_GENERAL_4 = 25,
|
||||||
|
SLOT_GENERAL_5 = 26,
|
||||||
|
SLOT_GENERAL_6 = 27,
|
||||||
|
SLOT_GENERAL_7 = 28,
|
||||||
|
SLOT_GENERAL_8 = 29,
|
||||||
|
//SLOT_GENERAL_9 = not supported
|
||||||
|
//SLOT_GENERAL_10 = not supported
|
||||||
|
SLOT_CURSOR = 30,
|
||||||
|
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
||||||
|
SLOT_TRADESKILL = 1000,
|
||||||
|
SLOT_AUGMENT = 1001,
|
||||||
|
SLOT_INVALID = (int16)0xFFFF,
|
||||||
|
SLOT_POSSESSIONS_BEGIN = 0,
|
||||||
|
SLOT_POSSESSIONS_END = 30,
|
||||||
|
SLOT_EQUIPMENT_BEGIN = 0,
|
||||||
|
SLOT_EQUIPMENT_END = 21,
|
||||||
|
SLOT_PERSONAL_BEGIN = 22,
|
||||||
|
SLOT_PERSONAL_END = 29,
|
||||||
|
SLOT_PERSONAL_BAGS_BEGIN = 251,
|
||||||
|
SLOT_PERSONAL_BAGS_END = 330,
|
||||||
|
SLOT_CURSOR_BAG_BEGIN = 331,
|
||||||
|
SLOT_CURSOR_BAG_END = 340,
|
||||||
|
SLOT_TRIBUTE_BEGIN = 400,
|
||||||
|
SLOT_TRIBUTE_END = 404,
|
||||||
|
SLOT_BANK_BEGIN = 2000,
|
||||||
|
SLOT_BANK_END = 2023,
|
||||||
|
SLOT_BANK_BAGS_BEGIN = 2031,
|
||||||
|
SLOT_BANK_BAGS_END = 2270,
|
||||||
|
SLOT_SHARED_BANK_BEGIN = 2500,
|
||||||
|
SLOT_SHARED_BANK_END = 2501,
|
||||||
|
SLOT_SHARED_BANK_BAGS_BEGIN = 2531,
|
||||||
|
SLOT_SHARED_BANK_BAGS_END = 2550,
|
||||||
|
SLOT_TRADE_BEGIN = 3000,
|
||||||
|
SLOT_TRADE_END = 3007,
|
||||||
|
SLOT_TRADE_BAGS_BEGIN = 3031,
|
||||||
|
SLOT_TRADE_BAGS_END = 3110,
|
||||||
|
SLOT_WORLD_BEGIN = 4000,
|
||||||
|
SLOT_WORLD_END = 4009
|
||||||
|
};
|
||||||
|
|
||||||
|
enum InventoryTypes : int16 {
|
||||||
|
TypePossessions = 0,
|
||||||
|
TypeBank,
|
||||||
|
TypeSharedBank,
|
||||||
|
TypeTrade,
|
||||||
|
TypeWorld,
|
||||||
|
TypeLimbo, // 5
|
||||||
|
TypeTribute,
|
||||||
|
TypeTrophyTribute,
|
||||||
|
TypeGuildTribute,
|
||||||
|
TypeMerchant,
|
||||||
|
TypeDeleted, // 10
|
||||||
|
TypeCorpse,
|
||||||
|
TypeBazaar,
|
||||||
|
TypeInspect,
|
||||||
|
TypeRealEstate,
|
||||||
|
TypeViewMODPC, // 15
|
||||||
|
TypeViewMODBank,
|
||||||
|
TypeViewMODSharedBank,
|
||||||
|
TypeViewMODLimbo,
|
||||||
|
TypeAltStorage,
|
||||||
|
TypeArchived, // 20
|
||||||
|
TypeMail,
|
||||||
|
TypeGuildTrophyTribute,
|
||||||
|
TypeKrono,
|
||||||
|
TypeOther,
|
||||||
|
TypeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum PossessionsSlots : int16 {
|
||||||
|
SlotCharm = 0,
|
||||||
|
SlotEar1,
|
||||||
|
SlotHead,
|
||||||
|
SlotFace,
|
||||||
|
SlotEar2,
|
||||||
|
SlotNeck, // 5
|
||||||
|
SlotShoulders,
|
||||||
|
SlotArms,
|
||||||
|
SlotBack,
|
||||||
|
SlotWrist1,
|
||||||
|
SlotWrist2, // 10
|
||||||
|
SlotRange,
|
||||||
|
SlotHands,
|
||||||
|
SlotPrimary,
|
||||||
|
SlotSecondary,
|
||||||
|
SlotFinger1, // 15
|
||||||
|
SlotFinger2,
|
||||||
|
SlotChest,
|
||||||
|
SlotLegs,
|
||||||
|
SlotFeet,
|
||||||
|
SlotWaist, // 20
|
||||||
|
SlotPowerSource = 9999, // temp
|
||||||
|
SlotAmmo = 21, // temp
|
||||||
|
SlotGeneral1,
|
||||||
|
SlotGeneral2,
|
||||||
|
SlotGeneral3,
|
||||||
|
SlotGeneral4, // 25
|
||||||
|
SlotGeneral5,
|
||||||
|
SlotGeneral6,
|
||||||
|
SlotGeneral7,
|
||||||
|
SlotGeneral8,
|
||||||
|
//SlotGeneral9,
|
||||||
|
//SlotGeneral10,
|
||||||
|
SlotCursor, // 30
|
||||||
|
SlotCount
|
||||||
|
};
|
||||||
|
|
||||||
|
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
||||||
|
static const uint16 TYPE_POSSESSIONS_SIZE = SlotCount;
|
||||||
|
static const uint16 TYPE_BANK_SIZE = 24;
|
||||||
|
static const uint16 TYPE_SHARED_BANK_SIZE = 2;
|
||||||
|
static const uint16 TYPE_TRADE_SIZE = 8;
|
||||||
|
static const uint16 TYPE_WORLD_SIZE = 10;
|
||||||
|
static const uint16 TYPE_LIMBO_SIZE = 36;
|
||||||
|
static const uint16 TYPE_TRIBUTE_SIZE = 5; // (need client values)
|
||||||
|
static const uint16 TYPE_TROPHY_TRIBUTE_SIZE = 0;
|
||||||
|
static const uint16 TYPE_GUILD_TRIBUTE_SIZE = 0;
|
||||||
|
static const uint16 TYPE_MERCHANT_SIZE = 0;
|
||||||
|
static const uint16 TYPE_DELETED_SIZE = 0;
|
||||||
|
static const uint16 TYPE_CORPSE_SIZE = SlotCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
||||||
|
static const uint16 TYPE_BAZAAR_SIZE = 80;
|
||||||
|
static const uint16 TYPE_INSPECT_SIZE = 22;
|
||||||
|
static const uint16 TYPE_REAL_ESTATE_SIZE = 0;
|
||||||
|
static const uint16 TYPE_VIEW_MOD_PC_SIZE = 0;//NOT_USED;
|
||||||
|
static const uint16 TYPE_VIEW_MOD_BANK_SIZE = 0;//NOT_USED;
|
||||||
|
static const uint16 TYPE_VIEW_MOD_SHARED_BANK_SIZE = 0;//NOT_USED;
|
||||||
|
static const uint16 TYPE_VIEW_MOD_LIMBO_SIZE = 0;//NOT_USED;
|
||||||
|
static const uint16 TYPE_ALT_STORAGE_SIZE = 0;
|
||||||
|
static const uint16 TYPE_ARCHIVED_SIZE = 0;
|
||||||
|
static const uint16 TYPE_MAIL_SIZE = 0;
|
||||||
|
static const uint16 TYPE_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
||||||
|
static const uint16 TYPE_KRONO_SIZE = 0;
|
||||||
|
static const uint16 TYPE_OTHER_SIZE = 0;
|
||||||
|
|
||||||
|
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
||||||
|
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
||||||
|
static const int16 EQUIPMENT_BEGIN = SlotCharm;
|
||||||
|
static const int16 EQUIPMENT_END = SlotAmmo;
|
||||||
|
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
||||||
|
|
||||||
|
static const int16 GENERAL_BEGIN = SlotGeneral1;
|
||||||
|
static const int16 GENERAL_END = SlotGeneral8;
|
||||||
|
static const uint16 GENERAL_SIZE = 8;
|
||||||
|
static const int16 GENERAL_BAGS_BEGIN = 251;
|
||||||
|
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
||||||
|
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
||||||
|
|
||||||
|
static const int16 CURSOR_BAG_BEGIN = 331;
|
||||||
|
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
||||||
|
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
||||||
|
|
||||||
|
static const int16 BANK_BEGIN = 2000;
|
||||||
|
static const int16 BANK_END = 2023;
|
||||||
|
static const int16 BANK_BAGS_BEGIN = 2031;
|
||||||
|
static const int16 BANK_BAGS_END_OFFSET = 239;
|
||||||
|
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
||||||
|
|
||||||
|
static const int16 SHARED_BANK_BEGIN = 2500;
|
||||||
|
static const int16 SHARED_BANK_END = 2501;
|
||||||
|
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
||||||
|
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
||||||
|
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
||||||
|
|
||||||
|
static const int16 TRADE_BEGIN = 3000;
|
||||||
|
static const int16 TRADE_END = 3007;
|
||||||
|
static const int16 TRADE_NPC_END = 3003;
|
||||||
|
static const int16 TRADE_BAGS_BEGIN = 3031;
|
||||||
|
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
||||||
|
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
||||||
|
|
||||||
|
static const int16 WORLD_BEGIN = 4000;
|
||||||
|
static const int16 WORLD_END = 4009;
|
||||||
|
static const int16 WORLD_SIZE = TYPE_WORLD_SIZE;
|
||||||
|
|
||||||
|
static const int16 TRIBUTE_BEGIN = 400;
|
||||||
|
static const int16 TRIBUTE_END = 404;
|
||||||
|
static const int16 TRIBUTE_SIZE = TYPE_TRIBUTE_SIZE;
|
||||||
|
|
||||||
|
static const int16 CORPSE_BEGIN = 22;
|
||||||
|
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
||||||
|
|
||||||
|
// items
|
||||||
|
// common and container sizes will not increase until the new 'location' struct is implemented
|
||||||
|
static const uint16 ITEM_COMMON_SIZE = 6;//RoF::consts::ITEM_COMMON_SIZE;
|
||||||
|
static const uint16 ITEM_CONTAINER_SIZE = 10;//Titanium::consts::ITEM_CONTAINER_SIZE;
|
||||||
|
|
||||||
|
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||||
|
static const size_t BANDOLIERS_SIZE = 20;//RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
||||||
|
static const size_t BANDOLIER_ITEM_COUNT = 4;//RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
||||||
|
|
||||||
|
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
||||||
|
static const size_t POTION_BELT_ITEM_COUNT = 5;//RoF2::consts::POTION_BELT_ITEM_COUNT;
|
||||||
|
|
||||||
|
static const size_t TEXT_LINK_BODY_LENGTH = 56;//RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* COMMON_EMU_LEGACY_H */
|
||||||
18
common/emu_limits.cpp
Normal file
18
common/emu_limits.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
104
common/emu_limits.h
Normal file
104
common/emu_limits.h
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_EMU_LIMITS_H
|
||||||
|
#define COMMON_EMU_LIMITS_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EntityLimits
|
||||||
|
{
|
||||||
|
namespace NPC {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*NPC*/
|
||||||
|
|
||||||
|
namespace NPCMerchant {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*NPCMerchant*/
|
||||||
|
|
||||||
|
namespace Merc {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Merc*/
|
||||||
|
|
||||||
|
namespace Bot {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 8;
|
||||||
|
|
||||||
|
} /*Bot*/
|
||||||
|
|
||||||
|
namespace ClientPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace NPCPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace MercPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
namespace BotPet {
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
const size_t InvTypeTradeSize = 4;
|
||||||
|
|
||||||
|
} /*Pet*/
|
||||||
|
|
||||||
|
}; /*EntityLimits*/
|
||||||
|
|
||||||
|
#endif /*COMMON_EMU_LIMITS_H*/
|
||||||
@ -64,6 +64,7 @@ N(OP_BuffRemoveRequest),
|
|||||||
N(OP_Bug),
|
N(OP_Bug),
|
||||||
N(OP_CameraEffect),
|
N(OP_CameraEffect),
|
||||||
N(OP_Camp),
|
N(OP_Camp),
|
||||||
|
N(OP_CancelSneakHide),
|
||||||
N(OP_CancelTask),
|
N(OP_CancelTask),
|
||||||
N(OP_CancelTrade),
|
N(OP_CancelTrade),
|
||||||
N(OP_CastSpell),
|
N(OP_CastSpell),
|
||||||
@ -164,6 +165,7 @@ N(OP_FinishTrade),
|
|||||||
N(OP_FinishWindow),
|
N(OP_FinishWindow),
|
||||||
N(OP_FinishWindow2),
|
N(OP_FinishWindow2),
|
||||||
N(OP_Fishing),
|
N(OP_Fishing),
|
||||||
|
N(OP_Fling),
|
||||||
N(OP_FloatListThing),
|
N(OP_FloatListThing),
|
||||||
N(OP_Forage),
|
N(OP_Forage),
|
||||||
N(OP_ForceFindPerson),
|
N(OP_ForceFindPerson),
|
||||||
@ -215,6 +217,7 @@ N(OP_GroupUpdate),
|
|||||||
N(OP_GroupUpdateB),
|
N(OP_GroupUpdateB),
|
||||||
N(OP_GroupUpdateLeaderAA),
|
N(OP_GroupUpdateLeaderAA),
|
||||||
N(OP_GuildBank),
|
N(OP_GuildBank),
|
||||||
|
N(OP_GuildBankItemList),
|
||||||
N(OP_GuildCreate),
|
N(OP_GuildCreate),
|
||||||
N(OP_GuildDelete),
|
N(OP_GuildDelete),
|
||||||
N(OP_GuildDemote),
|
N(OP_GuildDemote),
|
||||||
@ -286,6 +289,7 @@ N(OP_LFGuild),
|
|||||||
N(OP_LFPCommand),
|
N(OP_LFPCommand),
|
||||||
N(OP_LFPGetMatchesRequest),
|
N(OP_LFPGetMatchesRequest),
|
||||||
N(OP_LFPGetMatchesResponse),
|
N(OP_LFPGetMatchesResponse),
|
||||||
|
N(OP_LinkedReuse),
|
||||||
N(OP_LoadSpellSet),
|
N(OP_LoadSpellSet),
|
||||||
N(OP_LocInfo),
|
N(OP_LocInfo),
|
||||||
N(OP_LockoutTimerInfo),
|
N(OP_LockoutTimerInfo),
|
||||||
@ -348,6 +352,7 @@ N(OP_OpenTributeMaster),
|
|||||||
N(OP_PDeletePetition),
|
N(OP_PDeletePetition),
|
||||||
N(OP_PetBuffWindow),
|
N(OP_PetBuffWindow),
|
||||||
N(OP_PetCommands),
|
N(OP_PetCommands),
|
||||||
|
N(OP_PetHoTT),
|
||||||
N(OP_Petition),
|
N(OP_Petition),
|
||||||
N(OP_PetitionBug),
|
N(OP_PetitionBug),
|
||||||
N(OP_PetitionCheckIn),
|
N(OP_PetitionCheckIn),
|
||||||
@ -364,6 +369,8 @@ N(OP_PetitionUnCheckout),
|
|||||||
N(OP_PetitionUpdate),
|
N(OP_PetitionUpdate),
|
||||||
N(OP_PickPocket),
|
N(OP_PickPocket),
|
||||||
N(OP_PlayerProfile),
|
N(OP_PlayerProfile),
|
||||||
|
N(OP_PlayerStateAdd),
|
||||||
|
N(OP_PlayerStateRemove),
|
||||||
N(OP_PlayEverquestRequest),
|
N(OP_PlayEverquestRequest),
|
||||||
N(OP_PlayEverquestResponse),
|
N(OP_PlayEverquestResponse),
|
||||||
N(OP_PlayMP3),
|
N(OP_PlayMP3),
|
||||||
@ -519,8 +526,6 @@ N(OP_VetRewardsAvaliable),
|
|||||||
N(OP_VoiceMacroIn),
|
N(OP_VoiceMacroIn),
|
||||||
N(OP_VoiceMacroOut),
|
N(OP_VoiceMacroOut),
|
||||||
N(OP_WeaponEquip1),
|
N(OP_WeaponEquip1),
|
||||||
N(OP_WeaponEquip2),
|
|
||||||
N(OP_WeaponUnequip2),
|
|
||||||
N(OP_WearChange),
|
N(OP_WearChange),
|
||||||
N(OP_Weather),
|
N(OP_Weather),
|
||||||
N(OP_Weblink),
|
N(OP_Weblink),
|
||||||
@ -534,6 +539,8 @@ N(OP_WorldLogout),
|
|||||||
N(OP_WorldObjectsSent),
|
N(OP_WorldObjectsSent),
|
||||||
N(OP_WorldUnknown001),
|
N(OP_WorldUnknown001),
|
||||||
N(OP_XTargetAutoAddHaters),
|
N(OP_XTargetAutoAddHaters),
|
||||||
|
N(OP_XTargetOpen),
|
||||||
|
N(OP_XTargetOpenResponse),
|
||||||
N(OP_XTargetRequest),
|
N(OP_XTargetRequest),
|
||||||
N(OP_XTargetResponse),
|
N(OP_XTargetResponse),
|
||||||
N(OP_YellForHelp),
|
N(OP_YellForHelp),
|
||||||
@ -547,4 +554,5 @@ N(OP_ZoneServerInfo),
|
|||||||
N(OP_ZoneServerReady),
|
N(OP_ZoneServerReady),
|
||||||
N(OP_ZoneSpawns),
|
N(OP_ZoneSpawns),
|
||||||
N(OP_ZoneUnavail),
|
N(OP_ZoneUnavail),
|
||||||
|
N(OP_ResetAA),
|
||||||
// mail and chat opcodes located in ../mail_oplist.h
|
// mail and chat opcodes located in ../mail_oplist.h
|
||||||
|
|||||||
@ -479,21 +479,21 @@ void EmuTCPConnection::SendNetErrorPacket(const char* reason) {
|
|||||||
std::cout << reason;
|
std::cout << reason;
|
||||||
std::cout << "': " << inet_ntoa(in) << ":" << GetPort() << std::endl;
|
std::cout << "': " << inet_ntoa(in) << ":" << GetPort() << std::endl;
|
||||||
#endif
|
#endif
|
||||||
ServerPacket* pack = new ServerPacket(0);
|
auto pack = new ServerPacket(0);
|
||||||
pack->size = 1;
|
pack->size = 1;
|
||||||
if (reason)
|
if (reason)
|
||||||
pack->size += strlen(reason) + 1;
|
pack->size += strlen(reason) + 1;
|
||||||
pack->pBuffer = new uchar[pack->size];
|
pack->pBuffer = new uchar[pack->size];
|
||||||
memset(pack->pBuffer, 0, pack->size);
|
memset(pack->pBuffer, 0, pack->size);
|
||||||
pack->pBuffer[0] = 255;
|
pack->pBuffer[0] = 255;
|
||||||
strcpy((char*) &pack->pBuffer[1], reason);
|
strcpy((char *)&pack->pBuffer[1], reason);
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EmuTCPConnection::RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisconnect) {
|
void EmuTCPConnection::RemoveRelay(EmuTCPConnection* relay, bool iSendRelayDisconnect) {
|
||||||
if (iSendRelayDisconnect) {
|
if (iSendRelayDisconnect) {
|
||||||
ServerPacket* pack = new ServerPacket(0, 5);
|
auto pack = new ServerPacket(0, 5);
|
||||||
pack->pBuffer[0] = 3;
|
pack->pBuffer[0] = 3;
|
||||||
*((uint32*) &pack->pBuffer[1]) = relay->GetRemoteID();
|
*((uint32*) &pack->pBuffer[1]) = relay->GetRemoteID();
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
@ -632,7 +632,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsPackets(char* errbuf) {
|
|||||||
if (base >= recvbuf_used) {
|
if (base >= recvbuf_used) {
|
||||||
safe_delete_array(recvbuf);
|
safe_delete_array(recvbuf);
|
||||||
} else {
|
} else {
|
||||||
uchar* tmpbuf = new uchar[recvbuf_size - base];
|
auto tmpbuf = new uchar[recvbuf_size - base];
|
||||||
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
|
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
|
||||||
safe_delete_array(recvbuf);
|
safe_delete_array(recvbuf);
|
||||||
recvbuf = tmpbuf;
|
recvbuf = tmpbuf;
|
||||||
@ -706,7 +706,7 @@ bool EmuTCPConnection::ProcessReceivedDataAsOldPackets(char* errbuf) {
|
|||||||
safe_delete_array(recvbuf);
|
safe_delete_array(recvbuf);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uchar* tmpbuf = new uchar[recvbuf_size - base];
|
auto tmpbuf = new uchar[recvbuf_size - base];
|
||||||
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
|
memcpy(tmpbuf, &recvbuf[base], recvbuf_used - base);
|
||||||
safe_delete_array(recvbuf);
|
safe_delete_array(recvbuf);
|
||||||
recvbuf = tmpbuf;
|
recvbuf = tmpbuf;
|
||||||
@ -762,7 +762,8 @@ void EmuTCPConnection::ProcessNetworkLayerPacket(ServerPacket* pack) {
|
|||||||
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
|
SendNetErrorPacket("New RelayClient: illegal on outgoing connection");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
EmuTCPConnection* con = new EmuTCPConnection(Server->GetNextID(), Server, this, *((uint32*) data), *((uint32*) &data[4]), *((uint16*) &data[8]));
|
auto con = new EmuTCPConnection(Server->GetNextID(), Server, this, *((uint32 *)data),
|
||||||
|
*((uint32 *)&data[4]), *((uint16 *)&data[8]));
|
||||||
Server->AddConnection(con);
|
Server->AddConnection(con);
|
||||||
RelayCount++;
|
RelayCount++;
|
||||||
break;
|
break;
|
||||||
@ -810,7 +811,7 @@ bool EmuTCPConnection::SendData(bool &sent_something, char* errbuf) {
|
|||||||
if(sent_something)
|
if(sent_something)
|
||||||
keepalive_timer.Start();
|
keepalive_timer.Start();
|
||||||
else if (TCPMode == modePacket && keepalive_timer.Check()) {
|
else if (TCPMode == modePacket && keepalive_timer.Check()) {
|
||||||
ServerPacket* pack = new ServerPacket(0, 0);
|
auto pack = new ServerPacket(0, 0);
|
||||||
SendPacket(pack);
|
SendPacket(pack);
|
||||||
safe_delete(pack);
|
safe_delete(pack);
|
||||||
#if TCPN_DEBUG >= 5
|
#if TCPN_DEBUG >= 5
|
||||||
|
|||||||
@ -24,7 +24,7 @@ void EmuTCPServer::Process() {
|
|||||||
|
|
||||||
void EmuTCPServer::CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
|
void EmuTCPServer::CreateNewConnection(uint32 ID, SOCKET in_socket, uint32 irIP, uint16 irPort)
|
||||||
{
|
{
|
||||||
EmuTCPConnection *conn = new EmuTCPConnection(ID, this, in_socket, irIP, irPort, pOldFormat);
|
auto conn = new EmuTCPConnection(ID, this, in_socket, irIP, irPort, pOldFormat);
|
||||||
AddConnection(conn);
|
AddConnection(conn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
370
common/emu_versions.cpp
Normal file
370
common/emu_versions.cpp
Normal file
@ -0,0 +1,370 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_versions.h"
|
||||||
|
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidClientVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ValidateClientVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
if (client_version <= ClientVersion::Unknown || client_version > LastClientVersion)
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
|
||||||
|
return client_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* EQEmu::versions::ClientVersionName(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
return "Unknown Version";
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return "Client 6.2";
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return "Titanium";
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return "SoF";
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return "SoD";
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return "UF";
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return "RoF";
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return "RoF2";
|
||||||
|
default:
|
||||||
|
return "Invalid Version";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 EQEmu::versions::ConvertClientVersionToClientVersionBit(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return bit_Unknown;
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return bit_Titanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return bit_SoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return bit_SoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return bit_UF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return bit_RoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return bit_RoF2;
|
||||||
|
default:
|
||||||
|
return bit_Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertClientVersionBitToClientVersion(uint32 client_version_bit)
|
||||||
|
{
|
||||||
|
switch (client_version_bit) {
|
||||||
|
case (uint32)static_cast<unsigned int>(ClientVersion::Unknown) :
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Client62) - 1)) :
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::Titanium) - 1)) :
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoF) - 1)) :
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::SoD) - 1)) :
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::UF) - 1)) :
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF) - 1)) :
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case ((uint32)1 << (static_cast<unsigned int>(ClientVersion::RoF2) - 1)) :
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint32 EQEmu::versions::ConvertClientVersionToExpansion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return 0x000007FFU;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return 0x00007FFFU;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return 0x0000FFFFU;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return 0x0001FFFFU;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return 0x000FFFFFU;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidPCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidNonPCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::versions::IsValidOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= LastNonPCInventoryVersion || inventory_version > LastOfflinePCInventoryVersion)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastInventoryVersion)
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
|
||||||
|
return inventory_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ValidatePCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= InventoryVersion::Unknown || inventory_version > LastPCInventoryVersion)
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
|
||||||
|
return inventory_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateNonPCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= LastPCInventoryVersion || inventory_version > LastNonPCInventoryVersion)
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
|
||||||
|
return inventory_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ValidateOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
if (inventory_version <= LastNonPCInventoryVersion || inventory_version > LastOfflinePCInventoryVersion)
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
|
||||||
|
return inventory_version;
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* EQEmu::versions::InventoryVersionName(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
switch (inventory_version) {
|
||||||
|
case InventoryVersion::Unknown:
|
||||||
|
return "Unknown Version";
|
||||||
|
case InventoryVersion::Client62:
|
||||||
|
return "Client 6.2";
|
||||||
|
case InventoryVersion::Titanium:
|
||||||
|
return "Titanium";
|
||||||
|
case InventoryVersion::SoF:
|
||||||
|
return "SoF";
|
||||||
|
case InventoryVersion::SoD:
|
||||||
|
return "SoD";
|
||||||
|
case InventoryVersion::UF:
|
||||||
|
return "UF";
|
||||||
|
case InventoryVersion::RoF:
|
||||||
|
return "RoF";
|
||||||
|
case InventoryVersion::RoF2:
|
||||||
|
return "RoF2";
|
||||||
|
case InventoryVersion::NPC:
|
||||||
|
return "NPC";
|
||||||
|
case InventoryVersion::NPCMerchant:
|
||||||
|
return "NPC Merchant";
|
||||||
|
case InventoryVersion::Merc:
|
||||||
|
return "Merc";
|
||||||
|
case InventoryVersion::Bot:
|
||||||
|
return "Bot";
|
||||||
|
case InventoryVersion::ClientPet:
|
||||||
|
return "Client Pet";
|
||||||
|
case InventoryVersion::NPCPet:
|
||||||
|
return "NPC Pet";
|
||||||
|
case InventoryVersion::MercPet:
|
||||||
|
return "Merc Pet";
|
||||||
|
case InventoryVersion::BotPet:
|
||||||
|
return "Bot Pet";
|
||||||
|
case InventoryVersion::OfflineTitanium:
|
||||||
|
return "Offline Titanium";
|
||||||
|
case InventoryVersion::OfflineSoF:
|
||||||
|
return "Offline SoF";
|
||||||
|
case InventoryVersion::OfflineSoD:
|
||||||
|
return "Offline SoD";
|
||||||
|
case InventoryVersion::OfflineUF:
|
||||||
|
return "Offline UF";
|
||||||
|
case InventoryVersion::OfflineRoF:
|
||||||
|
return "Offline RoF";
|
||||||
|
case InventoryVersion::OfflineRoF2:
|
||||||
|
return "Offline RoF2";
|
||||||
|
default:
|
||||||
|
return "Invalid Version";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
switch (inventory_version) {
|
||||||
|
case InventoryVersion::Unknown:
|
||||||
|
case InventoryVersion::Client62:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
case InventoryVersion::Titanium:
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case InventoryVersion::SoF:
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case InventoryVersion::SoD:
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case InventoryVersion::UF:
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case InventoryVersion::RoF:
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case InventoryVersion::RoF2:
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertClientVersionToInventoryVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Unknown:
|
||||||
|
case ClientVersion::Client62:
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return InventoryVersion::Titanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return InventoryVersion::SoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return InventoryVersion::SoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return InventoryVersion::UF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return InventoryVersion::RoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return InventoryVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertPCInventoryVersionToOfflinePCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
switch (inventory_version) {
|
||||||
|
case InventoryVersion::Titanium:
|
||||||
|
return InventoryVersion::OfflineTitanium;
|
||||||
|
case InventoryVersion::SoF:
|
||||||
|
return InventoryVersion::OfflineSoF;
|
||||||
|
case InventoryVersion::SoD:
|
||||||
|
return InventoryVersion::OfflineSoD;
|
||||||
|
case InventoryVersion::UF:
|
||||||
|
return InventoryVersion::OfflineUF;
|
||||||
|
case InventoryVersion::RoF:
|
||||||
|
return InventoryVersion::OfflineRoF;
|
||||||
|
case InventoryVersion::RoF2:
|
||||||
|
return InventoryVersion::OfflineRoF2;
|
||||||
|
default:
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertOfflinePCInventoryVersionToPCInventoryVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
switch (inventory_version) {
|
||||||
|
case InventoryVersion::OfflineTitanium:
|
||||||
|
return InventoryVersion::Titanium;
|
||||||
|
case InventoryVersion::OfflineSoF:
|
||||||
|
return InventoryVersion::SoF;
|
||||||
|
case InventoryVersion::OfflineSoD:
|
||||||
|
return InventoryVersion::SoD;
|
||||||
|
case InventoryVersion::OfflineUF:
|
||||||
|
return InventoryVersion::UF;
|
||||||
|
case InventoryVersion::OfflineRoF:
|
||||||
|
return InventoryVersion::RoF;
|
||||||
|
case InventoryVersion::OfflineRoF2:
|
||||||
|
return InventoryVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::ClientVersion EQEmu::versions::ConvertOfflinePCInventoryVersionToClientVersion(InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
switch (inventory_version) {
|
||||||
|
case InventoryVersion::OfflineTitanium:
|
||||||
|
return ClientVersion::Titanium;
|
||||||
|
case InventoryVersion::OfflineSoF:
|
||||||
|
return ClientVersion::SoF;
|
||||||
|
case InventoryVersion::OfflineSoD:
|
||||||
|
return ClientVersion::SoD;
|
||||||
|
case InventoryVersion::OfflineUF:
|
||||||
|
return ClientVersion::UF;
|
||||||
|
case InventoryVersion::OfflineRoF:
|
||||||
|
return ClientVersion::RoF;
|
||||||
|
case InventoryVersion::OfflineRoF2:
|
||||||
|
return ClientVersion::RoF2;
|
||||||
|
default:
|
||||||
|
return ClientVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::versions::InventoryVersion EQEmu::versions::ConvertClientVersionToOfflinePCInventoryVersion(ClientVersion client_version)
|
||||||
|
{
|
||||||
|
switch (client_version) {
|
||||||
|
case ClientVersion::Titanium:
|
||||||
|
return InventoryVersion::OfflineTitanium;
|
||||||
|
case ClientVersion::SoF:
|
||||||
|
return InventoryVersion::OfflineSoF;
|
||||||
|
case ClientVersion::SoD:
|
||||||
|
return InventoryVersion::OfflineSoD;
|
||||||
|
case ClientVersion::UF:
|
||||||
|
return InventoryVersion::OfflineUF;
|
||||||
|
case ClientVersion::RoF:
|
||||||
|
return InventoryVersion::OfflineRoF;
|
||||||
|
case ClientVersion::RoF2:
|
||||||
|
return InventoryVersion::OfflineRoF2;
|
||||||
|
default:
|
||||||
|
return InventoryVersion::Unknown;
|
||||||
|
}
|
||||||
|
}
|
||||||
130
common/emu_versions.h
Normal file
130
common/emu_versions.h
Normal file
@ -0,0 +1,130 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_EMU_VERSIONS_H
|
||||||
|
#define COMMON_EMU_VERSIONS_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace versions {
|
||||||
|
enum class ClientVersion {
|
||||||
|
Unknown = 0,
|
||||||
|
Client62, // Build: 'Aug 4 2005 15:40:59'
|
||||||
|
Titanium, // Build: 'Oct 31 2005 10:33:37'
|
||||||
|
SoF, // Build: 'Sep 7 2007 09:11:49'
|
||||||
|
SoD, // Build: 'Dec 19 2008 15:22:49'
|
||||||
|
UF, // Build: 'Jun 8 2010 16:44:32'
|
||||||
|
RoF, // Build: 'Dec 10 2012 17:35:44'
|
||||||
|
RoF2 // Build: 'May 10 2013 23:30:08'
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ClientVersionBit : uint32 {
|
||||||
|
bit_Unknown = 0,
|
||||||
|
bit_Client62 = 0x00000001, // unsupported (placeholder for scripts)
|
||||||
|
bit_Titanium = 0x00000002,
|
||||||
|
bit_SoF = 0x00000004,
|
||||||
|
bit_SoD = 0x00000008,
|
||||||
|
bit_UF = 0x00000010,
|
||||||
|
bit_RoF = 0x00000020,
|
||||||
|
bit_RoF2 = 0x00000040,
|
||||||
|
bit_TitaniumAndEarlier = 0x00000003,
|
||||||
|
bit_SoFAndEarlier = 0x00000007,
|
||||||
|
bit_SoDAndEarlier = 0x0000000F,
|
||||||
|
bit_UFAndEarlier = 0x0000001F,
|
||||||
|
bit_RoFAndEarlier = 0x0000003F,
|
||||||
|
bit_SoFAndLater = 0xFFFFFFFC,
|
||||||
|
bit_SoDAndLater = 0xFFFFFFF8,
|
||||||
|
bit_UFAndLater = 0xFFFFFFF0,
|
||||||
|
bit_RoFAndLater = 0xFFFFFFE0,
|
||||||
|
bit_RoF2AndLater = 0xFFFFFFC0,
|
||||||
|
bit_AllClients = 0xFFFFFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
const ClientVersion LastClientVersion = ClientVersion::RoF2;
|
||||||
|
const size_t ClientVersionCount = (static_cast<size_t>(LastClientVersion) + 1);
|
||||||
|
|
||||||
|
extern bool IsValidClientVersion(ClientVersion client_version);
|
||||||
|
extern ClientVersion ValidateClientVersion(ClientVersion client_version);
|
||||||
|
extern const char* ClientVersionName(ClientVersion client_version);
|
||||||
|
extern uint32 ConvertClientVersionToClientVersionBit(ClientVersion client_version);
|
||||||
|
extern ClientVersion ConvertClientVersionBitToClientVersion(uint32 client_version_bit);
|
||||||
|
extern uint32 ConvertClientVersionToExpansion(ClientVersion client_version);
|
||||||
|
|
||||||
|
} /*versions*/
|
||||||
|
|
||||||
|
namespace versions {
|
||||||
|
enum class InventoryVersion {
|
||||||
|
Unknown = 0,
|
||||||
|
Client62,
|
||||||
|
Titanium,
|
||||||
|
SoF,
|
||||||
|
SoD,
|
||||||
|
UF,
|
||||||
|
RoF,
|
||||||
|
RoF2,
|
||||||
|
NPC,
|
||||||
|
NPCMerchant,
|
||||||
|
Merc,
|
||||||
|
Bot,
|
||||||
|
ClientPet,
|
||||||
|
NPCPet,
|
||||||
|
MercPet,
|
||||||
|
BotPet,
|
||||||
|
OfflineTitanium,
|
||||||
|
OfflineSoF,
|
||||||
|
OfflineSoD,
|
||||||
|
OfflineUF,
|
||||||
|
OfflineRoF,
|
||||||
|
OfflineRoF2
|
||||||
|
};
|
||||||
|
|
||||||
|
const InventoryVersion LastInventoryVersion = InventoryVersion::OfflineRoF2;
|
||||||
|
const InventoryVersion LastPCInventoryVersion = InventoryVersion::RoF2;
|
||||||
|
const InventoryVersion LastNonPCInventoryVersion = InventoryVersion::BotPet;
|
||||||
|
const InventoryVersion LastOfflinePCInventoryVersion = InventoryVersion::OfflineRoF2;
|
||||||
|
const size_t InventoryVersionCount = (static_cast<size_t>(LastInventoryVersion) + 1);
|
||||||
|
|
||||||
|
extern bool IsValidInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern bool IsValidPCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern bool IsValidNonPCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern bool IsValidOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
|
||||||
|
extern InventoryVersion ValidateInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ValidatePCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ValidateNonPCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ValidateOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
|
||||||
|
extern const char* InventoryVersionName(InventoryVersion inventory_version);
|
||||||
|
extern ClientVersion ConvertInventoryVersionToClientVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ConvertClientVersionToInventoryVersion(ClientVersion client_version);
|
||||||
|
extern InventoryVersion ConvertPCInventoryVersionToOfflinePCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ConvertOfflinePCInventoryVersionToPCInventoryVersion(InventoryVersion inventory_version);
|
||||||
|
extern ClientVersion ConvertOfflinePCInventoryVersionToClientVersion(InventoryVersion inventory_version);
|
||||||
|
extern InventoryVersion ConvertClientVersionToOfflinePCInventoryVersion(ClientVersion client_version);
|
||||||
|
|
||||||
|
} /*versions*/
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_EMU_VERSIONS_H*/
|
||||||
@ -1,5 +1,6 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -13,407 +14,57 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
#ifndef EQ_CONSTANTS_H
|
|
||||||
#define EQ_CONSTANTS_H
|
#ifndef COMMON_EQ_CONSTANTS_H
|
||||||
|
#define COMMON_EQ_CONSTANTS_H
|
||||||
|
|
||||||
#include "skills.h"
|
#include "skills.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
|
||||||
/*
|
|
||||||
** Light Types
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum LightTypes
|
|
||||||
{
|
|
||||||
lightTypeNone = 0,
|
|
||||||
lightTypeCandle,
|
|
||||||
lightTypeTorch,
|
|
||||||
lightTypeTinyGlowingSkull,
|
|
||||||
lightTypeSmallLantern,
|
|
||||||
lightTypeSteinOfMoggok,
|
|
||||||
lightTypeLargeLantern,
|
|
||||||
lightTypeFlamelessLantern,
|
|
||||||
lightTypeGlobeOfStars,
|
|
||||||
lightTypeLightGlobe,
|
|
||||||
lightTypeLightstone,
|
|
||||||
lightTypeGreaterLightstone,
|
|
||||||
lightTypeFireBeetleEye,
|
|
||||||
lightTypeColdlight,
|
|
||||||
lightTypeUnknown1,
|
|
||||||
lightTypeUnknown2
|
|
||||||
};
|
|
||||||
|
|
||||||
#define LIGHT_TYPES_COUNT 16
|
//SpawnAppearance types: (compared two clients for server-originating types: SoF & RoF2)
|
||||||
|
#define AT_Die 0 // this causes the client to keel over and zone to bind point (default action)
|
||||||
|
#define AT_WhoLevel 1 // the level that shows up on /who
|
||||||
|
//#define AT_2 2 // unknown
|
||||||
|
#define AT_Invis 3 // 0 = visible, 1 = invisible
|
||||||
|
#define AT_PVP 4 // 0 = blue, 1 = pvp (red)
|
||||||
|
#define AT_Light 5 // light type emitted by player (lightstone, shiny shield)
|
||||||
|
#define AT_Anim 14 // 100=standing, 110=sitting, 111=ducking, 115=feigned, 105=looting
|
||||||
|
#define AT_Sneak 15 // 0 = normal, 1 = sneaking
|
||||||
|
#define AT_SpawnID 16 // server to client, sets player spawn id
|
||||||
|
#define AT_HP 17 // Client->Server, my HP has changed (like regen tic)
|
||||||
|
#define AT_Linkdead 18 // 0 = normal, 1 = linkdead
|
||||||
|
#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate
|
||||||
|
#define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM
|
||||||
|
#define AT_Anon 21 // 0 = normal, 1 = anon, 2 = roleplay
|
||||||
|
#define AT_GuildID 22
|
||||||
|
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
|
||||||
|
#define AT_AFK 24 // 0 = normal, 1 = afk
|
||||||
|
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
|
||||||
|
//#define AT_27 27 // unknown
|
||||||
|
#define AT_Split 28 // 0 = normal, 1 = autosplit on (not showing in SoF+) (client-to-server only)
|
||||||
|
#define AT_Size 29 // spawn's size (present: SoF, absent: RoF2)
|
||||||
|
//#define AT_30 30 // unknown
|
||||||
|
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
|
||||||
|
//#define AT_32 32 // unknown
|
||||||
|
//#define AT_33 33 // unknown
|
||||||
|
//#define AT_34 34 // unknown (present: SoF, absent: RoF2)
|
||||||
|
//#define AT_35 35 // unknown
|
||||||
|
//#define AT_36 36 // unknown
|
||||||
|
//#define AT_37 37 // unknown
|
||||||
|
//#define AT_38 38 // unknown
|
||||||
|
//#define AT_39 39 // unknown
|
||||||
|
#define AT_ShowHelm 43 // 0 = hide graphic, 1 = show graphic
|
||||||
|
#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
|
||||||
|
//#define AT_46 46 // unknown
|
||||||
|
//#define AT_48 48 // unknown
|
||||||
|
//#define AT_49 49 // unknown
|
||||||
|
//#define AT_52 52 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
|
||||||
|
//#define AT_53 53 // (absent: SoF, present: RoF2) (not a replacement for RoF absent 29 or 34)
|
||||||
|
|
||||||
/*
|
//#define AT_Trader 300 // Bazaar Trader Mode (not present in SoF or RoF2)
|
||||||
** Light Levels
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum LightLevels
|
|
||||||
{
|
|
||||||
lightLevelUnlit = 0,
|
|
||||||
lightLevelCandle,
|
|
||||||
lightLevelTorch,
|
|
||||||
lightLevelSmallMagic,
|
|
||||||
lightLevelRedLight,
|
|
||||||
lightLevelBlueLight,
|
|
||||||
lightLevelSmallLantern,
|
|
||||||
lightLevelMagicLantern,
|
|
||||||
lightLevelLargeLantern,
|
|
||||||
lightLevelLargeMagic,
|
|
||||||
lightLevelBrilliant
|
|
||||||
};
|
|
||||||
|
|
||||||
#define LIGHT_LEVELS_COUNT 11
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Item attributes
|
|
||||||
**
|
|
||||||
** (There are no grepwin hits other than these declarations... Do they have a use?)
|
|
||||||
*/
|
|
||||||
enum ItemAttributes : uint32
|
|
||||||
{
|
|
||||||
ItemAttrNone = 0x00000000,
|
|
||||||
ItemAttrLore = 0x00000001,
|
|
||||||
ItemAttrArtifact = 0x00000002,
|
|
||||||
ItemAttrSummoned = 0x00000004,
|
|
||||||
ItemAttrMagic = 0x00000008,
|
|
||||||
ItemAttrAugment = 0x00000010,
|
|
||||||
ItemAttrPendingLore = 0x00000020,
|
|
||||||
ItemAttrUnknown = 0xFFFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Item class types
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum ItemClassTypes
|
|
||||||
{
|
|
||||||
ItemClassCommon = 0,
|
|
||||||
ItemClassContainer,
|
|
||||||
ItemClassBook,
|
|
||||||
_ItemClassCount
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Item use types
|
|
||||||
**
|
|
||||||
** (ref: database and eqstr_us.txt)
|
|
||||||
**
|
|
||||||
** (Looking at a recent database, it's possible that some of the item values may be off [10-27-2013])
|
|
||||||
*/
|
|
||||||
enum ItemUseTypes : uint8
|
|
||||||
{
|
|
||||||
/*9138*/ ItemType1HSlash = 0,
|
|
||||||
/*9141*/ ItemType2HSlash,
|
|
||||||
/*9140*/ ItemType1HPiercing,
|
|
||||||
/*9139*/ ItemType1HBlunt,
|
|
||||||
/*9142*/ ItemType2HBlunt,
|
|
||||||
/*5504*/ ItemTypeBow,
|
|
||||||
/*----*/ ItemTypeUnknown1,
|
|
||||||
/*----*/ ItemTypeLargeThrowing,
|
|
||||||
/*5505*/ ItemTypeShield,
|
|
||||||
/*5506*/ ItemTypeScroll,
|
|
||||||
/*5507*/ ItemTypeArmor,
|
|
||||||
/*5508*/ ItemTypeMisc, // a lot of random crap has this item use.
|
|
||||||
/*7564*/ ItemTypeLockPick,
|
|
||||||
/*----*/ ItemTypeUnknown2,
|
|
||||||
/*5509*/ ItemTypeFood,
|
|
||||||
/*5510*/ ItemTypeDrink,
|
|
||||||
/*5511*/ ItemTypeLight,
|
|
||||||
/*5512*/ ItemTypeCombinable, // not all stackable items are this use...
|
|
||||||
/*5513*/ ItemTypeBandage,
|
|
||||||
/*----*/ ItemTypeSmallThrowing,
|
|
||||||
/*----*/ ItemTypeSpell, // spells and tomes
|
|
||||||
/*5514*/ ItemTypePotion,
|
|
||||||
/*----*/ ItemTypeUnknown3,
|
|
||||||
/*0406*/ ItemTypeWindInstrument,
|
|
||||||
/*0407*/ ItemTypeStringedInstrument,
|
|
||||||
/*0408*/ ItemTypeBrassInstrument,
|
|
||||||
/*0405*/ ItemTypePercussionInstrument,
|
|
||||||
/*5515*/ ItemTypeArrow,
|
|
||||||
/*----*/ ItemTypeUnknown4,
|
|
||||||
/*5521*/ ItemTypeJewelry,
|
|
||||||
/*----*/ ItemTypeSkull,
|
|
||||||
/*5516*/ ItemTypeBook, // skill-up tomes/books? (would probably need a pp flag if true...)
|
|
||||||
/*5517*/ ItemTypeNote,
|
|
||||||
/*5518*/ ItemTypeKey,
|
|
||||||
/*----*/ ItemTypeCoin,
|
|
||||||
/*5520*/ ItemType2HPiercing,
|
|
||||||
/*----*/ ItemTypeFishingPole,
|
|
||||||
/*----*/ ItemTypeFishingBait,
|
|
||||||
/*5519*/ ItemTypeAlcohol,
|
|
||||||
/*----*/ ItemTypeKey2, // keys and satchels?? (questable keys?)
|
|
||||||
/*----*/ ItemTypeCompass,
|
|
||||||
/*----*/ ItemTypeUnknown5,
|
|
||||||
/*----*/ ItemTypePoison, // might be wrong, but includes poisons
|
|
||||||
/*----*/ ItemTypeUnknown6,
|
|
||||||
/*----*/ ItemTypeUnknown7,
|
|
||||||
/*5522*/ ItemTypeMartial,
|
|
||||||
/*----*/ ItemTypeUnknown8,
|
|
||||||
/*----*/ ItemTypeUnknown9,
|
|
||||||
/*----*/ ItemTypeUnknown10,
|
|
||||||
/*----*/ ItemTypeUnknown11,
|
|
||||||
/*----*/ ItemTypeSinging,
|
|
||||||
/*5750*/ ItemTypeAllInstrumentTypes,
|
|
||||||
/*5776*/ ItemTypeCharm,
|
|
||||||
/*----*/ ItemTypeDye,
|
|
||||||
/*----*/ ItemTypeAugmentation,
|
|
||||||
/*----*/ ItemTypeAugmentationSolvent,
|
|
||||||
/*----*/ ItemTypeAugmentationDistiller,
|
|
||||||
/*----*/ ItemTypeUnknown12,
|
|
||||||
/*----*/ ItemTypeFellowshipKit,
|
|
||||||
/*----*/ ItemTypeUnknown13,
|
|
||||||
/*----*/ ItemTypeRecipe,
|
|
||||||
/*----*/ ItemTypeAdvancedRecipe,
|
|
||||||
/*----*/ ItemTypeJournal, // only one(1) database entry
|
|
||||||
/*----*/ ItemTypeAltCurrency, // alt-currency (as opposed to coinage)
|
|
||||||
/*5881*/ ItemTypePerfectedAugmentationDistiller,
|
|
||||||
/*----*/ _ItemTypeCount
|
|
||||||
|
|
||||||
/*
|
|
||||||
Unknowns:
|
|
||||||
|
|
||||||
Mounts?
|
|
||||||
Ornamentations?
|
|
||||||
GuildBanners?
|
|
||||||
Collectible?
|
|
||||||
Placeable?
|
|
||||||
(others?)
|
|
||||||
*/
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Augmentation use type bitmasks (1-based)
|
|
||||||
**
|
|
||||||
** (ref: dbstr_us.txt)
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum AugmentationUseTypeBitmasks : uint32 {
|
|
||||||
AugUseNone = 0x00000000,
|
|
||||||
AugUseGeneralSingleStat = 0x00000001, /*1^16^1 (General: Single Stat)^0*/
|
|
||||||
AugUseGeneralMultipleStat = 0x00000002, /*2^16^2 (General: Multiple Stat)^0*/
|
|
||||||
AugUseGeneralSpellEffect = 0x00000004, /*3^16^3 (General: Spell Effect)^0*/
|
|
||||||
AugUseWeaponGeneral = 0x00000008, /*4^16^4 (Weapon: General)^0*/
|
|
||||||
AugUseWeaponElemDamage = 0x00000010, /*5^16^5 (Weapon: Elem Damage)^0*/
|
|
||||||
AugUseWeaponBaseDamage = 0x00000020, /*6^16^6 (Weapon: Base Damage)^0*/
|
|
||||||
AugUseGeneralGroup = 0x00000040, /*7^16^7 (General: Group)^0*/
|
|
||||||
AugUseGeneralRaid = 0x00000080, /*8^16^8 (General: Raid)^0*/
|
|
||||||
AugUseGeneralDragonsPoints = 0x00000100, /*9^16^9 (General: Dragons Points)^0*/
|
|
||||||
AugUseCraftedCommon = 0x00000200, /*10^16^10 (Crafted: Common)^0*/
|
|
||||||
AugUseCraftedGroup1 = 0x00000400, /*11^16^11 (Crafted: Group)^0*/
|
|
||||||
AugUseCraftedRaid1 = 0x00000800, /*12^16^12 (Crafted: Raid)^0*/
|
|
||||||
AugUseEnergeiacGroup = 0x00001000, /*13^16^13 (Energeiac: Group)^0*/
|
|
||||||
AugUseEnergeiacRaid = 0x00002000, /*14^16^14 (Energeiac: Raid)^0*/
|
|
||||||
AugUseEmblem = 0x00004000, /*15^16^15 (Emblem)^0*/
|
|
||||||
AugUseCraftedGroup2 = 0x00008000, /*16^16^16 (Crafted: Group)^0*/
|
|
||||||
AugUseCraftedRaid2 = 0x00010000, /*17^16^17 (Crafted: Raid)^0*/
|
|
||||||
AugUseUnknown1 = 0x00020000, /*18^16^18^0*/
|
|
||||||
AugUseUnknown2 = 0x00040000, /*19^16^19^0*/
|
|
||||||
AugUseOrnamentation = 0x00080000, /*20^16^20 (Ornamentation)^0*/
|
|
||||||
AugUseSpecialOrnamentation = 0x00100000, /*21^16^21 (Special Ornamentation)^0*/
|
|
||||||
AugUseUnknown3 = 0x00200000, /*22^16^22^0*/
|
|
||||||
AugUseUnknown4 = 0x00400000, /*23^16^23^0*/
|
|
||||||
AugUseUnknown5 = 0x00800000, /*24^16^24^0*/
|
|
||||||
AugUseUnknown6 = 0x01000000, /*25^16^25^0*/
|
|
||||||
AugUseUnknown7 = 0x02000000, /*26^16^26^0*/
|
|
||||||
AugUseUnknown8 = 0x04000000, /*27^16^27^0*/
|
|
||||||
AugUseUnknown9 = 0x08000000, /*28^16^28^0*/
|
|
||||||
AugUseUnknown10 = 0x10000000, /*29^16^29^0*/
|
|
||||||
AugUseEpic25 = 0x20000000, /*30^16^30^0*/
|
|
||||||
AugUseTest = 0x40000000, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
|
|
||||||
AugUseAll = 0xFFFFFFFF
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Augmentation use types (enumerated)
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum AugmentationUseTypes : uint8 {
|
|
||||||
AugTypeNone = 0,
|
|
||||||
AugTypeGeneralSingleStat,
|
|
||||||
AugTypeGeneralMultipleStat,
|
|
||||||
AugTypeGeneralSpellEffect,
|
|
||||||
AugTypeWeaponGeneral,
|
|
||||||
AugTypeWeaponElemDamage,
|
|
||||||
AugTypeWeaponBaseDamage,
|
|
||||||
AugTypeGeneralGroup,
|
|
||||||
AugTypeGeneralRaid,
|
|
||||||
AugTypeGeneralDragonsPoints,
|
|
||||||
AugTypeCraftedCommon,
|
|
||||||
AugTypeCraftedGroup1,
|
|
||||||
AugTypeCraftedRaid1,
|
|
||||||
AugTypeEnergeiacGroup,
|
|
||||||
AugTypeEnergeiacRaid,
|
|
||||||
AugTypeEmblem,
|
|
||||||
AugTypeCraftedGroup2,
|
|
||||||
AugTypeCraftedRaid2,
|
|
||||||
AugTypeUnknown1,
|
|
||||||
AugTypeUnknown2,
|
|
||||||
AugTypeOrnamentation,
|
|
||||||
AugTypeSpecialOrnamentation,
|
|
||||||
AugTypeUnknown3,
|
|
||||||
AugTypeUnknown4,
|
|
||||||
AugTypeUnknown5,
|
|
||||||
AugTypeUnknown6,
|
|
||||||
AugTypeUnknown7,
|
|
||||||
AugTypeUnknown8,
|
|
||||||
AugTypeUnknown9,
|
|
||||||
AugTypeUnknown10,
|
|
||||||
AugTypeEpic25,
|
|
||||||
AugTypeTest,
|
|
||||||
_AugTypeCount,
|
|
||||||
AugTypeAll = 255
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Augmentation restriction types (in-work)
|
|
||||||
**
|
|
||||||
** (ref: eqstr_us.txt)
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum AugmentationRestrictionTypes : uint8 {
|
|
||||||
/*4690*/ AugRestrAny = 0,
|
|
||||||
/*9134*/ AugRestrArmor,
|
|
||||||
/*9135*/ AugRestrWeapons,
|
|
||||||
/*9136*/ AugRestr1HWeapons,
|
|
||||||
/*9137*/ AugRestr2HWeapons,
|
|
||||||
/*9138*/ AugRestr1HSlash,
|
|
||||||
/*9139*/ AugRestr1HBlunt,
|
|
||||||
/*9140*/ AugRestrPiercing,
|
|
||||||
/*9148*/ AugRestrHandToHand,
|
|
||||||
/*9141*/ AugRestr2HSlash,
|
|
||||||
/*9142*/ AugRestr2HBlunt,
|
|
||||||
/*9143*/ AugRestr2HPierce,
|
|
||||||
/*9144*/ AugRestrBows,
|
|
||||||
/*9145*/ AugRestrShields,
|
|
||||||
/*8052*/ AugRestr1HSlash1HBluntOrHandToHand,
|
|
||||||
/*9200*/ AugRestr1HBluntOrHandToHand, // no listed peq entries
|
|
||||||
|
|
||||||
// these three appear to be post-RoF (12-10-2012) and can not be verified until RoF (05-10-2013) is supported
|
|
||||||
/*????*/ AugRestrUnknown1,
|
|
||||||
/*????*/ AugRestrUnknown2,
|
|
||||||
/*????*/ AugRestrUnknown3, // last value in peq entries
|
|
||||||
_AugRestrCount
|
|
||||||
|
|
||||||
/*4687*/ //AugTypeAllItems, // ?? unknown atm
|
|
||||||
/*4688*/ //AugTypePrestige, // ?? unknown atm
|
|
||||||
/*4689*/ //AugTypeNonPrestige, // ?? unknown atm
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Container use types
|
|
||||||
**
|
|
||||||
** This correlates to world 'object.type' (object.h/Object.cpp) as well as Item_Struct.BagType
|
|
||||||
**
|
|
||||||
** (ref: database, web forums and eqstr_us.txt)
|
|
||||||
*/
|
|
||||||
enum ContainerUseTypes : uint8
|
|
||||||
{
|
|
||||||
/*3400*/ BagTypeSmallBag = 0,
|
|
||||||
/*3401*/ BagTypeLargeBag,
|
|
||||||
/*3402*/ BagTypeQuiver,
|
|
||||||
/*3403*/ BagTypeBeltPouch,
|
|
||||||
/*3404*/ BagTypeWristPouch,
|
|
||||||
/*3405*/ BagTypeBackPack,
|
|
||||||
/*3406*/ BagTypeSmallChest,
|
|
||||||
/*3407*/ BagTypeLargeChest,
|
|
||||||
/*----*/ BagTypeBandolier, // <*Database Reference Only>
|
|
||||||
/*3408*/ BagTypeMedicineBag,
|
|
||||||
/*3409*/ BagTypeToolBox,
|
|
||||||
/*3410*/ BagTypeLexicon,
|
|
||||||
/*3411*/ BagTypeMortar,
|
|
||||||
/*3412*/ BagTypeSelfDusting, // Quest container (Auto-clear contents?)
|
|
||||||
/*3413*/ BagTypeMixingBowl,
|
|
||||||
/*3414*/ BagTypeOven,
|
|
||||||
/*3415*/ BagTypeSewingKit,
|
|
||||||
/*3416*/ BagTypeForge,
|
|
||||||
/*3417*/ BagTypeFletchingKit,
|
|
||||||
/*3418*/ BagTypeBrewBarrel,
|
|
||||||
/*3419*/ BagTypeJewelersKit,
|
|
||||||
/*3420*/ BagTypePotteryWheel,
|
|
||||||
/*3421*/ BagTypeKiln,
|
|
||||||
/*3422*/ BagTypeKeymaker, // (no database entries as of peq rev 69)
|
|
||||||
/*3423*/ BagTypeWizardsLexicon,
|
|
||||||
/*3424*/ BagTypeMagesLexicon,
|
|
||||||
/*3425*/ BagTypeNecromancersLexicon,
|
|
||||||
/*3426*/ BagTypeEnchantersLexicon,
|
|
||||||
/*----*/ BagTypeUnknown1, // (a coin pouch/purse?) (no database entries as of peq rev 69)
|
|
||||||
/*----*/ BagTypeConcordanceofResearch, // <*Database Reference Only>
|
|
||||||
/*3427*/ BagTypeAlwaysWorks, // Quest container (Never-fail combines?)
|
|
||||||
/*3428*/ BagTypeKoadaDalForge, // High Elf
|
|
||||||
/*3429*/ BagTypeTeirDalForge, // Dark Elf
|
|
||||||
/*3430*/ BagTypeOggokForge, // Ogre
|
|
||||||
/*3431*/ BagTypeStormguardForge, // Dwarf
|
|
||||||
/*3432*/ BagTypeAkanonForge, // Gnome
|
|
||||||
/*3433*/ BagTypeNorthmanForge, // Barbarian
|
|
||||||
/*----*/ BagTypeUnknown2, // (no database entries as of peq rev 69)
|
|
||||||
/*3434*/ BagTypeCabilisForge, // Iksar
|
|
||||||
/*3435*/ BagTypeFreeportForge, // Human 1
|
|
||||||
/*3436*/ BagTypeRoyalQeynosForge, // Human 2
|
|
||||||
/*3439*/ BagTypeHalflingTailoringKit,
|
|
||||||
/*3438*/ BagTypeErudTailoringKit,
|
|
||||||
/*3440*/ BagTypeFierDalTailoringKit, // Wood Elf
|
|
||||||
/*3441*/ BagTypeFierDalFletchingKit, // Wood Elf
|
|
||||||
/*3437*/ BagTypeIksarPotteryWheel,
|
|
||||||
/*3442*/ BagTypeTackleBox,
|
|
||||||
/*3443*/ BagTypeTrollForge,
|
|
||||||
/*3445*/ BagTypeFierDalForge, // Wood Elf
|
|
||||||
/*3444*/ BagTypeValeForge, // Halfling
|
|
||||||
/*3446*/ BagTypeErudForge,
|
|
||||||
/*----*/ BagTypeTradersSatchel, // <*Database Reference Only> (db: Yellow Trader's Satchel Token?)
|
|
||||||
/*5785*/ BagTypeGuktaForge, // Froglok (no database entries as of peq rev 69)
|
|
||||||
/*3359*/ BagTypeAugmentationSealer,
|
|
||||||
/*----*/ BagTypeIceCreamChurn, // <*Database Reference Only>
|
|
||||||
/*6325*/ BagTypeTransformationmold, // Ornamentation
|
|
||||||
/*6340*/ BagTypeDetransformationmold, // Ornamentation Stripper
|
|
||||||
/*5400*/ BagTypeUnattuner,
|
|
||||||
/*7684*/ BagTypeTradeskillBag,
|
|
||||||
/*7692*/ BagTypeCollectibleBag,
|
|
||||||
/*----*/ _BagTypeCount
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Item Effect Types
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum {
|
|
||||||
ET_CombatProc = 0,
|
|
||||||
ET_ClickEffect = 1,
|
|
||||||
ET_WornEffect = 2,
|
|
||||||
ET_Expendable = 3,
|
|
||||||
ET_EquipClick = 4,
|
|
||||||
ET_ClickEffect2 = 5, //name unknown
|
|
||||||
ET_Focus = 6,
|
|
||||||
ET_Scroll = 7
|
|
||||||
};
|
|
||||||
|
|
||||||
//SpawnAppearance types:
|
|
||||||
#define AT_Die 0 // this causes the client to keel over and zone to bind point
|
|
||||||
#define AT_WhoLevel 1 // the level that shows up on /who
|
|
||||||
#define AT_Invis 3 // 0 = visible, 1 = invisible
|
|
||||||
#define AT_PVP 4 // 0 = blue, 1 = pvp (red)
|
|
||||||
#define AT_Light 5 // light type emitted by player (lightstone, shiny shield)
|
|
||||||
#define AT_Anim 14 // 100=standing, 110=sitting, 111=ducking, 115=feigned, 105=looting
|
|
||||||
#define AT_Sneak 15 // 0 = normal, 1 = sneaking
|
|
||||||
#define AT_SpawnID 16 // server to client, sets player spawn id
|
|
||||||
#define AT_HP 17 // Client->Server, my HP has changed (like regen tic)
|
|
||||||
#define AT_Linkdead 18 // 0 = normal, 1 = linkdead
|
|
||||||
#define AT_Levitate 19 // 0=off, 1=flymode, 2=levitate
|
|
||||||
#define AT_GM 20 // 0 = normal, 1 = GM - all odd numbers seem to make it GM
|
|
||||||
#define AT_Anon 21 // 0 = normal, 1 = anon, 2 = roleplay
|
|
||||||
#define AT_GuildID 22
|
|
||||||
#define AT_GuildRank 23 // 0=member, 1=officer, 2=leader
|
|
||||||
#define AT_AFK 24 // 0 = normal, 1 = afk
|
|
||||||
#define AT_Pet 25 // Param is EntityID of owner, or 0 for when charm breaks
|
|
||||||
#define AT_Split 28 // 0 = normal, 1 = autosplit on
|
|
||||||
#define AT_Size 29 // spawn's size
|
|
||||||
#define AT_NPCName 31 // change PC's name's color to NPC color 0 = normal, 1 = npc name
|
|
||||||
#define AT_ShowHelm 43 // 0 = do not show helmet graphic, 1 = show graphic
|
|
||||||
#define AT_DamageState 44 // The damage state of a destructible object (0 through 4)
|
|
||||||
//#define AT_Trader 300 // Bazzar Trader Mode
|
|
||||||
|
|
||||||
// animations for AT_Anim
|
// animations for AT_Anim
|
||||||
#define ANIM_FREEZE 102
|
#define ANIM_FREEZE 102
|
||||||
@ -519,15 +170,40 @@ typedef enum {
|
|||||||
#define MT_StrikeThrough 339
|
#define MT_StrikeThrough 339
|
||||||
#define MT_Stun 340
|
#define MT_Stun 340
|
||||||
|
|
||||||
|
// TODO: Really should combine above and below into one
|
||||||
|
|
||||||
//from showeq
|
//from showeq
|
||||||
enum ChatColor
|
enum ChatColor
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
CC_Default = 0,
|
CC_Default = 0,
|
||||||
CC_DarkGrey = 1,
|
CC_DarkGrey = 1,
|
||||||
CC_DarkGreen = 2,
|
CC_DarkGreen = 2,
|
||||||
CC_DarkBlue = 3,
|
CC_DarkBlue = 3,
|
||||||
CC_Purple = 5,
|
CC_Purple = 5,
|
||||||
CC_LightGrey = 6,
|
CC_LightGrey = 6,
|
||||||
|
*/
|
||||||
|
|
||||||
|
CC_WhiteSmoke = 0, // FF|F0F0F0
|
||||||
|
CC_Green = 2, // FF|008000
|
||||||
|
CC_BrightBlue = 3, // FF|0040FF
|
||||||
|
CC_Magenta = 5, // FF|F000F0
|
||||||
|
CC_Gray = 6, // FF|808080
|
||||||
|
CC_LightGray = 7, // FF|E0E0E0
|
||||||
|
//CC_WhiteSmoke2 = 10, // FF|F0F0F0
|
||||||
|
CC_DarkGray = 12, // FF|A0A0A0
|
||||||
|
CC_Red = 13, // FF|F00000
|
||||||
|
CC_Lime = 14, // FF|00F000
|
||||||
|
CC_Yellow = 15, // FF|F0F000
|
||||||
|
CC_Blue = 16, // FF|0000F0
|
||||||
|
CC_LightNavy = 17, // FF|0000AF
|
||||||
|
CC_Cyan = 18, // FF|00F0F0
|
||||||
|
CC_Black = 20, // FF|000000
|
||||||
|
|
||||||
|
// any index <= 255 that is not defined above
|
||||||
|
CC_DimGray = 1, // FF|606060
|
||||||
|
CC_Default = 1,
|
||||||
|
|
||||||
CC_User_Say = 256,
|
CC_User_Say = 256,
|
||||||
CC_User_Tell = 257,
|
CC_User_Tell = 257,
|
||||||
CC_User_Group = 258,
|
CC_User_Group = 258,
|
||||||
@ -723,7 +399,7 @@ static const uint8 DamageTypeUnknown = 0xFF;
|
|||||||
**
|
**
|
||||||
** (indexed by 'Skill' of SkillUseTypes)
|
** (indexed by 'Skill' of SkillUseTypes)
|
||||||
*/
|
*/
|
||||||
static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServerArraySize once activated
|
static const uint8 SkillDamageTypes[EQEmu::skills::HIGHEST_SKILL + 1] = // change to _SkillServerArraySize once activated
|
||||||
{
|
{
|
||||||
/*1HBlunt*/ 0,
|
/*1HBlunt*/ 0,
|
||||||
/*1HSlashing*/ 1,
|
/*1HSlashing*/ 1,
|
||||||
@ -799,29 +475,10 @@ static const uint8 SkillDamageTypes[HIGHEST_SKILL + 1] = // change to _SkillServ
|
|||||||
/*Intimidation*/ DamageTypeUnknown,
|
/*Intimidation*/ DamageTypeUnknown,
|
||||||
/*Berserking*/ DamageTypeUnknown,
|
/*Berserking*/ DamageTypeUnknown,
|
||||||
/*Taunt*/ DamageTypeUnknown,
|
/*Taunt*/ DamageTypeUnknown,
|
||||||
/*Frenzy*/ 74 //,
|
/*Frenzy*/ 74,
|
||||||
// /*RemoveTrap*/ DamageTypeUnknown, // Needs research (set for SenseTrap value)
|
/*RemoveTrap*/ DamageTypeUnknown, // Needs research (set for SenseTrap value)
|
||||||
// /*TripleAttack*/ DamageTypeUnknown, // Needs research (set for DoubleAttack value)
|
/*TripleAttack*/ DamageTypeUnknown, // Needs research (set for DoubleAttack value)
|
||||||
// /*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
|
/*2HPiercing*/ 36 // Needs research (set for 1HPiercing value - similar to slash/blunt)
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Material use slots
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
enum MaterialUseSlots : uint8
|
|
||||||
{
|
|
||||||
MaterialHead = 0,
|
|
||||||
MaterialChest,
|
|
||||||
MaterialArms,
|
|
||||||
MaterialWrist,
|
|
||||||
MaterialHands,
|
|
||||||
MaterialLegs,
|
|
||||||
MaterialFeet,
|
|
||||||
MaterialPrimary,
|
|
||||||
MaterialSecondary,
|
|
||||||
_MaterialCount,
|
|
||||||
_MaterialInvalid = 255
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -858,164 +515,16 @@ enum MaterialUseSlots : uint8
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
enum InventoryMapTypes : int16 {
|
|
||||||
MapPossessions = 0,
|
|
||||||
MapBank,
|
|
||||||
MapSharedBank,
|
|
||||||
MapTrade,
|
|
||||||
MapWorld,
|
|
||||||
MapLimbo,
|
|
||||||
MapTribute,
|
|
||||||
MapTrophyTribute,
|
|
||||||
MapGuildTribute,
|
|
||||||
MapMerchant,
|
|
||||||
MapDeleted,
|
|
||||||
MapCorpse,
|
|
||||||
MapBazaar,
|
|
||||||
MapInspect,
|
|
||||||
MapRealEstate,
|
|
||||||
MapViewMODPC,
|
|
||||||
MapViewMODBank,
|
|
||||||
MapViewMODSharedBank,
|
|
||||||
MapViewMODLimbo,
|
|
||||||
MapAltStorage,
|
|
||||||
MapArchived,
|
|
||||||
MapMail,
|
|
||||||
MapGuildTrophyTribute,
|
|
||||||
MapKrono,
|
|
||||||
MapOther,
|
|
||||||
_MapCount
|
|
||||||
};
|
|
||||||
|
|
||||||
enum InventoryMainTypes : int16 {
|
|
||||||
MainCharm = 0,
|
|
||||||
MainEar1,
|
|
||||||
MainHead,
|
|
||||||
MainFace,
|
|
||||||
MainEar2,
|
|
||||||
MainNeck,
|
|
||||||
MainShoulders,
|
|
||||||
MainArms,
|
|
||||||
MainBack,
|
|
||||||
MainWrist1,
|
|
||||||
MainWrist2,
|
|
||||||
MainRange,
|
|
||||||
MainHands,
|
|
||||||
MainPrimary,
|
|
||||||
MainSecondary,
|
|
||||||
MainFinger1,
|
|
||||||
MainFinger2,
|
|
||||||
MainChest,
|
|
||||||
MainLegs,
|
|
||||||
MainFeet,
|
|
||||||
MainWaist,
|
|
||||||
MainPowerSource = 9999, // temp
|
|
||||||
MainAmmo = 21, // temp
|
|
||||||
MainGeneral1,
|
|
||||||
MainGeneral2,
|
|
||||||
MainGeneral3,
|
|
||||||
MainGeneral4,
|
|
||||||
MainGeneral5,
|
|
||||||
MainGeneral6,
|
|
||||||
MainGeneral7,
|
|
||||||
MainGeneral8,
|
|
||||||
//MainGeneral9,
|
|
||||||
//MainGeneral10,
|
|
||||||
MainCursor,
|
|
||||||
_MainCount
|
|
||||||
};
|
|
||||||
|
|
||||||
#define INVALID_INDEX -1
|
#define INVALID_INDEX -1
|
||||||
#define NOT_USED 0
|
|
||||||
#define NO_ITEM 0
|
#define NO_ITEM 0
|
||||||
|
|
||||||
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
// yes..these are redundant... but, they help to identify and define what is actually being performed
|
||||||
// plus, since they're pre-op's, they don't affect the actual binary size
|
// plus, since they're pre-op's, they don't affect the actual binary size
|
||||||
#define MAP_BEGIN 0
|
#define TYPE_BEGIN 0
|
||||||
#define MAIN_BEGIN 0
|
#define SLOT_BEGIN 0
|
||||||
#define SUB_BEGIN 0
|
#define SUB_INDEX_BEGIN 0
|
||||||
#define AUG_BEGIN 0
|
#define AUG_INDEX_BEGIN 0
|
||||||
|
|
||||||
namespace legacy {
|
|
||||||
// this is for perl and other legacy systems
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
SLOT_CHARM = 0,
|
|
||||||
SLOT_EAR01 = 1,
|
|
||||||
SLOT_HEAD = 2,
|
|
||||||
SLOT_FACE = 3,
|
|
||||||
SLOT_EAR02 = 4,
|
|
||||||
SLOT_NECK = 5,
|
|
||||||
SLOT_SHOULDER = 6,
|
|
||||||
SLOT_ARMS = 7,
|
|
||||||
SLOT_BACK = 8,
|
|
||||||
SLOT_BRACER01 = 9,
|
|
||||||
SLOT_BRACER02 = 10,
|
|
||||||
SLOT_RANGE = 11,
|
|
||||||
SLOT_HANDS = 12,
|
|
||||||
SLOT_PRIMARY = 13,
|
|
||||||
SLOT_SECONDARY = 14,
|
|
||||||
SLOT_RING01 = 15,
|
|
||||||
SLOT_RING02 = 16,
|
|
||||||
SLOT_CHEST = 17,
|
|
||||||
SLOT_LEGS = 18,
|
|
||||||
SLOT_FEET = 19,
|
|
||||||
SLOT_WAIST = 20,
|
|
||||||
SLOT_POWER_SOURCE = 9999,
|
|
||||||
SLOT_AMMO = 21,
|
|
||||||
SLOT_GENERAL_1 = 22,
|
|
||||||
SLOT_GENERAL_2 = 23,
|
|
||||||
SLOT_GENERAL_3 = 24,
|
|
||||||
SLOT_GENERAL_4 = 25,
|
|
||||||
SLOT_GENERAL_5 = 26,
|
|
||||||
SLOT_GENERAL_6 = 27,
|
|
||||||
SLOT_GENERAL_7 = 28,
|
|
||||||
SLOT_GENERAL_8 = 29,
|
|
||||||
//SLOT_GENERAL_9 = not supported
|
|
||||||
//SLOT_GENERAL_10 = not supported
|
|
||||||
SLOT_CURSOR = 30,
|
|
||||||
SLOT_CURSOR_END = (int16)0xFFFE, // I hope no one is using this...
|
|
||||||
SLOT_TRADESKILL = 1000,
|
|
||||||
SLOT_AUGMENT = 1001,
|
|
||||||
SLOT_INVALID = (int16)0xFFFF,
|
|
||||||
|
|
||||||
SLOT_POSSESSIONS_BEGIN = 0,
|
|
||||||
SLOT_POSSESSIONS_END = 30,
|
|
||||||
|
|
||||||
SLOT_EQUIPMENT_BEGIN = 0,
|
|
||||||
SLOT_EQUIPMENT_END = 21,
|
|
||||||
|
|
||||||
SLOT_PERSONAL_BEGIN = 22,
|
|
||||||
SLOT_PERSONAL_END = 29,
|
|
||||||
SLOT_PERSONAL_BAGS_BEGIN = 251,
|
|
||||||
SLOT_PERSONAL_BAGS_END = 330,
|
|
||||||
|
|
||||||
SLOT_CURSOR_BAG_BEGIN = 331,
|
|
||||||
SLOT_CURSOR_BAG_END = 340,
|
|
||||||
|
|
||||||
SLOT_TRIBUTE_BEGIN = 400,
|
|
||||||
SLOT_TRIBUTE_END = 404,
|
|
||||||
|
|
||||||
SLOT_BANK_BEGIN = 2000,
|
|
||||||
SLOT_BANK_END = 2023,
|
|
||||||
SLOT_BANK_BAGS_BEGIN = 2031,
|
|
||||||
SLOT_BANK_BAGS_END = 2270,
|
|
||||||
|
|
||||||
SLOT_SHARED_BANK_BEGIN = 2500,
|
|
||||||
SLOT_SHARED_BANK_END = 2501,
|
|
||||||
SLOT_SHARED_BANK_BAGS_BEGIN = 2531,
|
|
||||||
SLOT_SHARED_BANK_BAGS_END = 2550,
|
|
||||||
|
|
||||||
SLOT_TRADE_BEGIN = 3000,
|
|
||||||
SLOT_TRADE_END = 3007,
|
|
||||||
SLOT_TRADE_BAGS_BEGIN = 3031,
|
|
||||||
SLOT_TRADE_BAGS_END = 3110,
|
|
||||||
|
|
||||||
SLOT_WORLD_BEGIN = 4000,
|
|
||||||
SLOT_WORLD_END = 4009
|
|
||||||
} InventorySlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
static const uint32 MAX_SPELL_DB_ID_VAL = 65535;
|
||||||
|
|
||||||
#endif
|
#endif /*COMMON_EQ_CONSTANTS_H*/
|
||||||
|
|||||||
@ -1,943 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "eq_dictionary.h"
|
|
||||||
#include "string_util.h"
|
|
||||||
|
|
||||||
//
|
|
||||||
// class EmuConstants
|
|
||||||
//
|
|
||||||
uint16 EmuConstants::InventoryMapSize(int16 indexMap)
|
|
||||||
{
|
|
||||||
switch (indexMap)
|
|
||||||
{
|
|
||||||
case MapPossessions:
|
|
||||||
return MAP_POSSESSIONS_SIZE;
|
|
||||||
case MapBank:
|
|
||||||
return MAP_BANK_SIZE;
|
|
||||||
case MapSharedBank:
|
|
||||||
return MAP_SHARED_BANK_SIZE;
|
|
||||||
case MapTrade:
|
|
||||||
return MAP_TRADE_SIZE;
|
|
||||||
case MapWorld:
|
|
||||||
return MAP_WORLD_SIZE;
|
|
||||||
case MapLimbo:
|
|
||||||
return MAP_LIMBO_SIZE;
|
|
||||||
case MapTribute:
|
|
||||||
return MAP_TRIBUTE_SIZE;
|
|
||||||
case MapTrophyTribute:
|
|
||||||
return MAP_TROPHY_TRIBUTE_SIZE;
|
|
||||||
case MapGuildTribute:
|
|
||||||
return MAP_GUILD_TRIBUTE_SIZE;
|
|
||||||
case MapMerchant:
|
|
||||||
return MAP_MERCHANT_SIZE;
|
|
||||||
case MapDeleted:
|
|
||||||
return MAP_DELETED_SIZE;
|
|
||||||
case MapCorpse:
|
|
||||||
return MAP_CORPSE_SIZE;
|
|
||||||
case MapBazaar:
|
|
||||||
return MAP_BAZAAR_SIZE;
|
|
||||||
case MapInspect:
|
|
||||||
return MAP_INSPECT_SIZE;
|
|
||||||
case MapRealEstate:
|
|
||||||
return MAP_REAL_ESTATE_SIZE;
|
|
||||||
case MapViewMODPC:
|
|
||||||
return MAP_VIEW_MOD_PC_SIZE;
|
|
||||||
case MapViewMODBank:
|
|
||||||
return MAP_VIEW_MOD_BANK_SIZE;
|
|
||||||
case MapViewMODSharedBank:
|
|
||||||
return MAP_VIEW_MOD_SHARED_BANK_SIZE;
|
|
||||||
case MapViewMODLimbo:
|
|
||||||
return MAP_VIEW_MOD_LIMBO_SIZE;
|
|
||||||
case MapAltStorage:
|
|
||||||
return MAP_ALT_STORAGE_SIZE;
|
|
||||||
case MapArchived:
|
|
||||||
return MAP_ARCHIVED_SIZE;
|
|
||||||
case MapMail:
|
|
||||||
return MAP_MAIL_SIZE;
|
|
||||||
case MapGuildTrophyTribute:
|
|
||||||
return MAP_GUILD_TROPHY_TRIBUTE_SIZE;
|
|
||||||
case MapKrono:
|
|
||||||
return MAP_KRONO_SIZE;
|
|
||||||
case MapOther:
|
|
||||||
return MAP_OTHER_SIZE;
|
|
||||||
default:
|
|
||||||
return NOT_USED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
std::string EmuConstants::InventoryLocationName(Location_Struct location)
|
|
||||||
{
|
|
||||||
// not ready for implementation...
|
|
||||||
std::string ret_str;
|
|
||||||
StringFormat(ret_str, "%s, %s, %s, %s", InventoryMapName(location.map), InventoryMainName(location.main), InventorySubName(location.sub), InventoryAugName(location.aug));
|
|
||||||
return ret_str;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
std::string EmuConstants::InventoryMapName(int16 indexMap)
|
|
||||||
{
|
|
||||||
switch (indexMap)
|
|
||||||
{
|
|
||||||
case INVALID_INDEX:
|
|
||||||
return "Invalid Map";
|
|
||||||
case MapPossessions:
|
|
||||||
return "Possessions";
|
|
||||||
case MapBank:
|
|
||||||
return "Bank";
|
|
||||||
case MapSharedBank:
|
|
||||||
return "SharedBank";
|
|
||||||
case MapTrade:
|
|
||||||
return "Trade";
|
|
||||||
case MapWorld:
|
|
||||||
return "World";
|
|
||||||
case MapLimbo:
|
|
||||||
return "Limbo";
|
|
||||||
case MapTribute:
|
|
||||||
return "Tribute";
|
|
||||||
case MapTrophyTribute:
|
|
||||||
return "TrophyTribute";
|
|
||||||
case MapGuildTribute:
|
|
||||||
return "GuildTribute";
|
|
||||||
case MapMerchant:
|
|
||||||
return "Merchant";
|
|
||||||
case MapDeleted:
|
|
||||||
return "Deleted";
|
|
||||||
case MapCorpse:
|
|
||||||
return "Corpse";
|
|
||||||
case MapBazaar:
|
|
||||||
return "Bazaar";
|
|
||||||
case MapInspect:
|
|
||||||
return "Inspect";
|
|
||||||
case MapRealEstate:
|
|
||||||
return "RealEstate";
|
|
||||||
case MapViewMODPC:
|
|
||||||
return "ViewMODPC";
|
|
||||||
case MapViewMODBank:
|
|
||||||
return "ViewMODBank";
|
|
||||||
case MapViewMODSharedBank:
|
|
||||||
return "ViewMODSharedBank";
|
|
||||||
case MapViewMODLimbo:
|
|
||||||
return "ViewMODLimbo";
|
|
||||||
case MapAltStorage:
|
|
||||||
return "AltStorage";
|
|
||||||
case MapArchived:
|
|
||||||
return "Archived";
|
|
||||||
case MapMail:
|
|
||||||
return "Mail";
|
|
||||||
case MapGuildTrophyTribute:
|
|
||||||
return "GuildTrophyTribute";
|
|
||||||
case MapKrono:
|
|
||||||
return "Krono";
|
|
||||||
case MapOther:
|
|
||||||
return "Other";
|
|
||||||
default:
|
|
||||||
return "Unknown Map";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string EmuConstants::InventoryMainName(int16 indexMain)
|
|
||||||
{
|
|
||||||
switch (indexMain)
|
|
||||||
{
|
|
||||||
case INVALID_INDEX:
|
|
||||||
return "Invalid Main";
|
|
||||||
case MainCharm:
|
|
||||||
return "Charm";
|
|
||||||
case MainEar1:
|
|
||||||
return "Ear1";
|
|
||||||
case MainHead:
|
|
||||||
return "Head";
|
|
||||||
case MainFace:
|
|
||||||
return "Face";
|
|
||||||
case MainEar2:
|
|
||||||
return "Ear2";
|
|
||||||
case MainNeck:
|
|
||||||
return "Neck";
|
|
||||||
case MainShoulders:
|
|
||||||
return "Shoulders";
|
|
||||||
case MainArms:
|
|
||||||
return "Arms";
|
|
||||||
case MainBack:
|
|
||||||
return "Back";
|
|
||||||
case MainWrist1:
|
|
||||||
return "Wrist1";
|
|
||||||
case MainWrist2:
|
|
||||||
return "Wrist2";
|
|
||||||
case MainRange:
|
|
||||||
return "Range";
|
|
||||||
case MainHands:
|
|
||||||
return "Hands";
|
|
||||||
case MainPrimary:
|
|
||||||
return "Primary";
|
|
||||||
case MainSecondary:
|
|
||||||
return "Secondary";
|
|
||||||
case MainFinger1:
|
|
||||||
return "Finger1";
|
|
||||||
case MainFinger2:
|
|
||||||
return "Finger2";
|
|
||||||
case MainChest:
|
|
||||||
return "Chest";
|
|
||||||
case MainLegs:
|
|
||||||
return "Legs";
|
|
||||||
case MainFeet:
|
|
||||||
return "Feet";
|
|
||||||
case MainWaist:
|
|
||||||
return "Waist";
|
|
||||||
case MainPowerSource:
|
|
||||||
return "PowerSource";
|
|
||||||
case MainAmmo:
|
|
||||||
return "Ammo";
|
|
||||||
case MainGeneral1:
|
|
||||||
return "General1";
|
|
||||||
case MainGeneral2:
|
|
||||||
return "General2";
|
|
||||||
case MainGeneral3:
|
|
||||||
return "General3";
|
|
||||||
case MainGeneral4:
|
|
||||||
return "General4";
|
|
||||||
case MainGeneral5:
|
|
||||||
return "General5";
|
|
||||||
case MainGeneral6:
|
|
||||||
return "General6";
|
|
||||||
case MainGeneral7:
|
|
||||||
return "General7";
|
|
||||||
case MainGeneral8:
|
|
||||||
return "General8";
|
|
||||||
/*
|
|
||||||
case MainGeneral9:
|
|
||||||
return "General9";
|
|
||||||
case MainGeneral10:
|
|
||||||
return "General10";
|
|
||||||
*/
|
|
||||||
case MainCursor:
|
|
||||||
return "Cursor";
|
|
||||||
default:
|
|
||||||
return "Unknown Main";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string EmuConstants::InventorySubName(int16 indexSub)
|
|
||||||
{
|
|
||||||
if (indexSub == INVALID_INDEX)
|
|
||||||
return "Invalid Sub";
|
|
||||||
|
|
||||||
if ((uint16)indexSub >= ITEM_CONTAINER_SIZE)
|
|
||||||
return "Unknown Sub";
|
|
||||||
|
|
||||||
std::string ret_str;
|
|
||||||
ret_str = StringFormat("Container%i", (indexSub + 1)); // zero-based index..but, count starts at one
|
|
||||||
|
|
||||||
return ret_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string EmuConstants::InventoryAugName(int16 indexAug)
|
|
||||||
{
|
|
||||||
if (indexAug == INVALID_INDEX)
|
|
||||||
return "Invalid Aug";
|
|
||||||
|
|
||||||
if ((uint16)indexAug >= ITEM_COMMON_SIZE)
|
|
||||||
return "Unknown Aug";
|
|
||||||
|
|
||||||
std::string ret_str;
|
|
||||||
ret_str = StringFormat("Augment%i", (indexAug + 1)); // zero-based index..but, count starts at one
|
|
||||||
|
|
||||||
return ret_str;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// class EQLimits
|
|
||||||
//
|
|
||||||
// client validation
|
|
||||||
bool EQLimits::IsValidPCClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidatePCClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_PC_CLIENT)
|
|
||||||
return clientVersion;
|
|
||||||
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
// npc validation
|
|
||||||
bool EQLimits::IsValidNPCClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidateNPCClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > LAST_PC_CLIENT && clientVersion <= LAST_NPC_CLIENT)
|
|
||||||
return clientVersion;
|
|
||||||
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
// mob validation
|
|
||||||
bool EQLimits::IsValidMobClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientVersion EQLimits::ValidateMobClientVersion(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
if (clientVersion > ClientVersion::Unknown && clientVersion <= LAST_NPC_CLIENT)
|
|
||||||
return clientVersion;
|
|
||||||
|
|
||||||
return ClientVersion::Unknown;
|
|
||||||
}
|
|
||||||
|
|
||||||
// database
|
|
||||||
size_t EQLimits::CharacterCreationLimit(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const size_t local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*Client62*/ NOT_USED,
|
|
||||||
/*Titanium*/ Titanium::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
/*SoF*/ SoF::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
/*SoD*/ SoD::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
/*UF*/ UF::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
/*RoF*/ RoF::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
/*RoF2*/ RoF2::consts::CHARACTER_CREATION_LIMIT,
|
|
||||||
|
|
||||||
/*MobNPC*/ NOT_USED,
|
|
||||||
/*MobMerc*/ NOT_USED,
|
|
||||||
/*MobBot*/ NOT_USED,
|
|
||||||
/*MobPet*/ NOT_USED
|
|
||||||
};
|
|
||||||
|
|
||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
// inventory
|
|
||||||
uint16 EQLimits::InventoryMapSize(int16 indexMap, ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
// not all maps will have an instantiated container..some are references for queue generators (i.e., bazaar, mail, etc...)
|
|
||||||
// a zero '0' indicates a needed value..otherwise, change to '_NOTUSED' for a null value so indices requiring research can be identified
|
|
||||||
// ALL of these values need to be verified before pushing to live
|
|
||||||
//
|
|
||||||
// make sure that you transcribe the actual value from 'defaults' to here before updating or client crashes will ensue..and/or...
|
|
||||||
// insert older clients inside of the progression of client order
|
|
||||||
//
|
|
||||||
// MAP_POSSESSIONS_SIZE does not reflect all actual <client>_constants size due to bitmask-use compatibility
|
|
||||||
//
|
|
||||||
// when setting NPC-based values, try to adhere to an EmuConstants::<property> or NOT_USED value to avoid unnecessary issues
|
|
||||||
|
|
||||||
static const uint16 local[_MapCount][CLIENT_VERSION_COUNT] = {
|
|
||||||
// server and database are sync'd to current MapPossessions's client as set in 'using namespace RoF::slots;' and
|
|
||||||
// 'EmuConstants::MAP_POSSESSIONS_SIZE' - use/update EquipmentBitmask(), GeneralBitmask() and CursorBitmask()
|
|
||||||
// for partial range validation checks and 'EmuConstants::MAP_POSSESSIONS_SIZE' for full range iterations
|
|
||||||
{ // local[MainPossessions]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*Merc*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*Bot*/ EmuConstants::MAP_POSSESSIONS_SIZE,
|
|
||||||
/*Pet*/ EmuConstants::MAP_POSSESSIONS_SIZE
|
|
||||||
},
|
|
||||||
{ // local[MapBank]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ NOT_USED,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_BANK_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_BANK_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_BANK_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_BANK_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_BANK_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_BANK_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ NOT_USED,
|
|
||||||
/*Merc*/ NOT_USED,
|
|
||||||
/*Bot*/ NOT_USED,
|
|
||||||
/*Pet*/ NOT_USED
|
|
||||||
},
|
|
||||||
{ // local[MapSharedBank]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_SHARED_BANK_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ NOT_USED,
|
|
||||||
/*Merc*/ NOT_USED,
|
|
||||||
/*Bot*/ NOT_USED,
|
|
||||||
/*Pet*/ NOT_USED
|
|
||||||
},
|
|
||||||
{ // local[MapTrade]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_TRADE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 4,
|
|
||||||
/*Merc*/ 4,
|
|
||||||
/*Bot*/ EmuConstants::MAP_TRADE_SIZE, // client thinks this is another client
|
|
||||||
/*Pet*/ 4
|
|
||||||
},
|
|
||||||
{ // local[MapWorld]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_WORLD_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ NOT_USED,
|
|
||||||
/*Merc*/ NOT_USED,
|
|
||||||
/*Bot*/ NOT_USED,
|
|
||||||
/*Pet*/ NOT_USED
|
|
||||||
},
|
|
||||||
{ // local[MapLimbo]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_LIMBO_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ NOT_USED,
|
|
||||||
/*Merc*/ NOT_USED,
|
|
||||||
/*Bot*/ NOT_USED,
|
|
||||||
/*Pet*/ NOT_USED
|
|
||||||
},
|
|
||||||
{ // local[MapTribute]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_TRIBUTE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapTrophyTribute]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_TROPHY_TRIBUTE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapGuildTribute]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_GUILD_TRIBUTE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapMerchant]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_MERCHANT_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_MERCHANT_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapDeleted]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_DELETED_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_DELETED_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapCorpse]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ NOT_USED,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*SoF*/ SoF::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*SoD*/ SoD::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*Underfoot*/ UF::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*RoF*/ RoF::consts::MAP_CORPSE_SIZE,
|
|
||||||
/*RoF2*/ RoF2::consts::MAP_CORPSE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapBazaar]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_BAZAAR_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0, // this may need to be 'EmuConstants::MAP_BAZAAR_SIZE' if offline client traders respawn as an npc
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapInspect]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ NOT_USED,
|
|
||||||
/*Titanium*/ Titanium::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*SoF*/ SoF::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*SoD*/ SoD::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*Underfoot*/ UF::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*RoF*/ RoF::consts::MAP_INSPECT_SIZE,
|
|
||||||
/*RoF2*/ RoF2::consts::MAP_INSPECT_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ NOT_USED,
|
|
||||||
/*Merc*/ NOT_USED,
|
|
||||||
/*Bot*/ NOT_USED,
|
|
||||||
/*Pet*/ NOT_USED
|
|
||||||
},
|
|
||||||
{ // local[MapRealEstate]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_REAL_ESTATE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapViewMODPC]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_PC_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapViewMODBank]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_BANK_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapViewMODSharedBank]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_SHARED_BANK_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapViewMODLimbo]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_VIEW_MOD_LIMBO_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapAltStorage]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_ALT_STORAGE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapArchived]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_ARCHIVED_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_ARCHIVED_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapMail]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_MAIL_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_MAIL_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapGuildTrophyTribute]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_GUILD_TROPHY_TRIBUTE_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapKrono]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ NOT_USED,
|
|
||||||
/*Titanium*/ NOT_USED,
|
|
||||||
/*SoF*/ NOT_USED,
|
|
||||||
/*SoD*/ NOT_USED,
|
|
||||||
/*Underfoot*/ NOT_USED,
|
|
||||||
/*RoF*/ EmuConstants::MAP_KRONO_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_KRONO_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
},
|
|
||||||
{ // local[MapOther]
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0,
|
|
||||||
/*Titanium*/ 0,
|
|
||||||
/*SoF*/ 0,
|
|
||||||
/*SoD*/ 0,
|
|
||||||
/*Underfoot*/ 0,
|
|
||||||
/*RoF*/ EmuConstants::MAP_OTHER_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::MAP_OTHER_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if ((uint16)indexMap < _MapCount)
|
|
||||||
return local[indexMap][static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
|
|
||||||
return NOT_USED;
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64 EQLimits::PossessionsBitmask(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
// these are for the new inventory system (RoF)..not the current (Ti) one...
|
|
||||||
// 0x0000000000200000 is SlotPowerSource (SoF+)
|
|
||||||
// 0x0000000080000000 is SlotGeneral9 (RoF+)
|
|
||||||
// 0x0000000100000000 is SlotGeneral10 (RoF+)
|
|
||||||
|
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0x000000027FDFFFFF,
|
|
||||||
/*Titanium*/ 0x000000027FDFFFFF,
|
|
||||||
/*SoF*/ 0x000000027FFFFFFF,
|
|
||||||
/*SoD*/ 0x000000027FFFFFFF,
|
|
||||||
/*Underfoot*/ 0x000000027FFFFFFF,
|
|
||||||
/*RoF*/ 0x00000003FFFFFFFF,
|
|
||||||
/*RoF2*/ 0,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
};
|
|
||||||
|
|
||||||
return NOT_USED;
|
|
||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64 EQLimits::EquipmentBitmask(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0x00000000005FFFFF,
|
|
||||||
/*Titanium*/ 0x00000000005FFFFF,
|
|
||||||
/*SoF*/ 0x00000000007FFFFF,
|
|
||||||
/*SoD*/ 0x00000000007FFFFF,
|
|
||||||
/*Underfoot*/ 0x00000000007FFFFF,
|
|
||||||
/*RoF*/ 0x00000000007FFFFF,
|
|
||||||
/*RoF2*/ 0,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
};
|
|
||||||
|
|
||||||
return NOT_USED;
|
|
||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64 EQLimits::GeneralBitmask(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0x000000007F800000,
|
|
||||||
/*Titanium*/ 0x000000007F800000,
|
|
||||||
/*SoF*/ 0x000000007F800000,
|
|
||||||
/*SoD*/ 0x000000007F800000,
|
|
||||||
/*Underfoot*/ 0x000000007F800000,
|
|
||||||
/*RoF*/ 0x00000001FF800000,
|
|
||||||
/*RoF2*/ 0,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
};
|
|
||||||
|
|
||||||
return NOT_USED;
|
|
||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64 EQLimits::CursorBitmask(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const uint64 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ 0x0000000200000000,
|
|
||||||
/*Titanium*/ 0x0000000200000000,
|
|
||||||
/*SoF*/ 0x0000000200000000,
|
|
||||||
/*SoD*/ 0x0000000200000000,
|
|
||||||
/*Underfoot*/ 0x0000000200000000,
|
|
||||||
/*RoF*/ 0x0000000200000000,
|
|
||||||
/*RoF2*/ 0,
|
|
||||||
|
|
||||||
/*NPC*/ 0,
|
|
||||||
/*Merc*/ 0,
|
|
||||||
/*Bot*/ 0,
|
|
||||||
/*Pet*/ 0
|
|
||||||
};
|
|
||||||
|
|
||||||
return NOT_USED;
|
|
||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQLimits::AllowsEmptyBagInBag(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ false,
|
|
||||||
/*62*/ false,
|
|
||||||
/*Titanium*/ Titanium::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*SoF*/ SoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*SoD*/ SoD::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*Underfoot*/ UF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*RoF*/ RoF::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
/*RoF2*/ RoF2::limits::ALLOWS_EMPTY_BAG_IN_BAG,
|
|
||||||
|
|
||||||
/*NPC*/ false,
|
|
||||||
/*Merc*/ false,
|
|
||||||
/*Bot*/ false,
|
|
||||||
/*Pet*/ false
|
|
||||||
};
|
|
||||||
|
|
||||||
return false; // not implemented
|
|
||||||
//return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQLimits::AllowsClickCastFromBag(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ false,
|
|
||||||
/*62*/ false,
|
|
||||||
/*Titanium*/ Titanium::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*SoF*/ SoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*SoD*/ SoD::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*Underfoot*/ UF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*RoF*/ RoF::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
/*RoF2*/ RoF2::limits::ALLOWS_CLICK_CAST_FROM_BAG,
|
|
||||||
|
|
||||||
/*NPC*/ false,
|
|
||||||
/*Merc*/ false,
|
|
||||||
/*Bot*/ false,
|
|
||||||
/*Pet*/ false
|
|
||||||
};
|
|
||||||
|
|
||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
// items
|
|
||||||
uint16 EQLimits::ItemCommonSize(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*Merc*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*Bot*/ EmuConstants::ITEM_COMMON_SIZE,
|
|
||||||
/*Pet*/ EmuConstants::ITEM_COMMON_SIZE
|
|
||||||
};
|
|
||||||
|
|
||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
uint16 EQLimits::ItemContainerSize(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const uint16 local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ NOT_USED,
|
|
||||||
/*62*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*Titanium*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*SoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*SoD*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*Underfoot*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*RoF*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*RoF2*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
|
|
||||||
/*NPC*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*Merc*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*Bot*/ EmuConstants::ITEM_CONTAINER_SIZE,
|
|
||||||
/*Pet*/ EmuConstants::ITEM_CONTAINER_SIZE
|
|
||||||
};
|
|
||||||
|
|
||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQLimits::CoinHasWeight(ClientVersion clientVersion)
|
|
||||||
{
|
|
||||||
static const bool local[CLIENT_VERSION_COUNT] = {
|
|
||||||
/*Unknown*/ true,
|
|
||||||
/*62*/ true,
|
|
||||||
/*Titanium*/ Titanium::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*SoF*/ SoF::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*SoD*/ SoD::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*Underfoot*/ UF::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*RoF*/ RoF::limits::COIN_HAS_WEIGHT,
|
|
||||||
/*RoF2*/ RoF::limits::COIN_HAS_WEIGHT,
|
|
||||||
|
|
||||||
/*NPC*/ true,
|
|
||||||
/*Merc*/ true,
|
|
||||||
/*Bot*/ true,
|
|
||||||
/*Pet*/ true
|
|
||||||
};
|
|
||||||
|
|
||||||
return local[static_cast<unsigned int>(ValidateMobClientVersion(clientVersion))];
|
|
||||||
}
|
|
||||||
@ -1,205 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2015 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef EQ_DICTIONARY_H
|
|
||||||
#define EQ_DICTIONARY_H
|
|
||||||
|
|
||||||
#include "types.h"
|
|
||||||
#include "eq_constants.h"
|
|
||||||
#include "clientversions.h"
|
|
||||||
#include <string>
|
|
||||||
#include "../common/patches/titanium_constants.h"
|
|
||||||
#include "../common/patches/sof_constants.h"
|
|
||||||
#include "../common/patches/sod_constants.h"
|
|
||||||
#include "../common/patches/uf_constants.h"
|
|
||||||
#include "../common/patches/rof_constants.h"
|
|
||||||
#include "../common/patches/rof2_constants.h"
|
|
||||||
|
|
||||||
// *** DO NOT CHANGE without a full understanding of the consequences..the server is set up to use these settings explicitly!! ***
|
|
||||||
// *** You will cause compilation failures and corrupt your database if partial or incorrect attempts to change them are made!! ***
|
|
||||||
|
|
||||||
// Hard-coded values usually indicate that further research is needed and the values given are from the old (known) system
|
|
||||||
|
|
||||||
// (future use)
|
|
||||||
//using namespace RoF2::maps; // server inventory maps enumeration (code and database sync'd to reference)
|
|
||||||
//using namespace RoF::slots; // server possessions slots enumeration (code and database sync'd to reference)
|
|
||||||
|
|
||||||
class EmuConstants
|
|
||||||
{
|
|
||||||
// an immutable value is required to initialize arrays, etc... use this class as a repository for those
|
|
||||||
public:
|
|
||||||
// database
|
|
||||||
static const ClientVersion CHARACTER_CREATION_CLIENT = ClientVersion::RoF2; // adjust according to starting item placement and target client
|
|
||||||
|
|
||||||
static const size_t CHARACTER_CREATION_LIMIT = RoF2::consts::CHARACTER_CREATION_LIMIT;
|
|
||||||
|
|
||||||
// inventory
|
|
||||||
static uint16 InventoryMapSize(int16 indexMap);
|
|
||||||
//static std::string InventoryLocationName(Location_Struct location);
|
|
||||||
static std::string InventoryMapName(int16 indexMap);
|
|
||||||
static std::string InventoryMainName(int16 indexMain);
|
|
||||||
static std::string InventorySubName(int16 indexSub);
|
|
||||||
static std::string InventoryAugName(int16 indexAug);
|
|
||||||
|
|
||||||
// these are currently hard-coded for existing inventory system..do not use in place of special client version handlers until ready
|
|
||||||
static const uint16 MAP_POSSESSIONS_SIZE = _MainCount;
|
|
||||||
static const uint16 MAP_BANK_SIZE = 24;
|
|
||||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
|
||||||
static const uint16 MAP_TRADE_SIZE = 8;
|
|
||||||
static const uint16 MAP_WORLD_SIZE = 10;
|
|
||||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
|
||||||
static const uint16 MAP_TRIBUTE_SIZE = 5; // (need client values)
|
|
||||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
|
||||||
static const uint16 MAP_DELETED_SIZE = 0;
|
|
||||||
static const uint16 MAP_CORPSE_SIZE = _MainCount; // no bitmask use..limits to size of client corpse window (see EQLimits::InventoryMapSize(MapCorpse, <EQClientVersion))
|
|
||||||
static const uint16 MAP_BAZAAR_SIZE = 80;
|
|
||||||
static const uint16 MAP_INSPECT_SIZE = 22;
|
|
||||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
|
||||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
|
||||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
|
||||||
static const uint16 MAP_MAIL_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_KRONO_SIZE = 0;
|
|
||||||
static const uint16 MAP_OTHER_SIZE = 0;
|
|
||||||
|
|
||||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
|
||||||
// (these are mainly to assign specific values to constants used in conversions and to identify per-client ranges/offsets)
|
|
||||||
static const int16 EQUIPMENT_BEGIN = MainCharm;
|
|
||||||
static const int16 EQUIPMENT_END = MainAmmo;
|
|
||||||
static const uint16 EQUIPMENT_SIZE = 22; // does not account for 'Power Source' - used mainly for npc equipment arrays
|
|
||||||
|
|
||||||
static const int16 GENERAL_BEGIN = MainGeneral1;
|
|
||||||
static const int16 GENERAL_END = MainGeneral8;
|
|
||||||
static const uint16 GENERAL_SIZE = 8;
|
|
||||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
|
||||||
static const int16 GENERAL_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 CURSOR_BAG_BEGIN = 331;
|
|
||||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
|
||||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 BANK_BEGIN = 2000;
|
|
||||||
static const int16 BANK_END = 2023;
|
|
||||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
|
||||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
|
||||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
|
||||||
static const int16 SHARED_BANK_END = 2501;
|
|
||||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 TRADE_BEGIN = 3000;
|
|
||||||
static const int16 TRADE_END = 3007;
|
|
||||||
static const int16 TRADE_NPC_END = 3003;
|
|
||||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
|
||||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 WORLD_BEGIN = 4000;
|
|
||||||
static const int16 WORLD_END = 4009;
|
|
||||||
static const int16 WORLD_SIZE = MAP_WORLD_SIZE;
|
|
||||||
|
|
||||||
static const int16 TRIBUTE_BEGIN = 400;
|
|
||||||
static const int16 TRIBUTE_END = 404;
|
|
||||||
static const int16 TRIBUTE_SIZE = MAP_TRIBUTE_SIZE;
|
|
||||||
|
|
||||||
static const int16 CORPSE_BEGIN = 22;
|
|
||||||
//static const int16 CORPSE_END = RoF::consts::CORPSE_END; // not ready for use
|
|
||||||
|
|
||||||
static const int16 MATERIAL_BEGIN = MaterialHead;
|
|
||||||
static const int16 MATERIAL_END = MaterialSecondary;
|
|
||||||
static const int16 MATERIAL_TINT_END = MaterialFeet;
|
|
||||||
static const int16 MATERIAL_SIZE = _MaterialCount;
|
|
||||||
|
|
||||||
// items
|
|
||||||
// common and container sizes will not increase until the new 'location' struct is implemented
|
|
||||||
static const uint16 ITEM_COMMON_SIZE = RoF::consts::ITEM_COMMON_SIZE;
|
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = Titanium::consts::ITEM_CONTAINER_SIZE;
|
|
||||||
|
|
||||||
// BANDOLIERS_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
|
||||||
static const size_t BANDOLIERS_SIZE = RoF2::consts::BANDOLIERS_SIZE; // number of bandolier instances
|
|
||||||
static const size_t BANDOLIER_ITEM_COUNT = RoF2::consts::BANDOLIER_ITEM_COUNT; // number of equipment slots in bandolier instance
|
|
||||||
|
|
||||||
// POTION_BELT_SIZE sets maximum limit..active limit will need to be handled by the appropriate AA or spell (or item?)
|
|
||||||
static const size_t POTION_BELT_ITEM_COUNT = RoF2::consts::POTION_BELT_ITEM_COUNT;
|
|
||||||
|
|
||||||
static const size_t TEXT_LINK_BODY_LENGTH = RoF2::consts::TEXT_LINK_BODY_LENGTH;
|
|
||||||
};
|
|
||||||
|
|
||||||
class EQLimits
|
|
||||||
{
|
|
||||||
// values should default to a non-beneficial value..unless value conflicts with intended operation
|
|
||||||
//
|
|
||||||
// EmuConstants may be used as references..but, not every reference needs to be in EmuConstants (i.e., AllowsEmptyBagInBag(), CoinHasWeight(), etc...)
|
|
||||||
public:
|
|
||||||
// client version validation (checks to avoid crashing zone server when accessing reference arrays)
|
|
||||||
// use this inside of class Client (limits to actual clients)
|
|
||||||
static bool IsValidPCClientVersion(ClientVersion clientVersion);
|
|
||||||
static ClientVersion ValidatePCClientVersion(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// basically..any non-client classes - do not when setting a valid client
|
|
||||||
static bool IsValidNPCClientVersion(ClientVersion clientVersion);
|
|
||||||
static ClientVersion ValidateNPCClientVersion(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// these are 'universal' - do not when setting a valid client
|
|
||||||
static bool IsValidMobClientVersion(ClientVersion clientVersion);
|
|
||||||
static ClientVersion ValidateMobClientVersion(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// database
|
|
||||||
static size_t CharacterCreationLimit(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// inventory
|
|
||||||
static uint16 InventoryMapSize(int16 indexMap, ClientVersion clientVersion);
|
|
||||||
static uint64 PossessionsBitmask(ClientVersion clientVersion);
|
|
||||||
static uint64 EquipmentBitmask(ClientVersion clientVersion);
|
|
||||||
static uint64 GeneralBitmask(ClientVersion clientVersion);
|
|
||||||
static uint64 CursorBitmask(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
static bool AllowsEmptyBagInBag(ClientVersion clientVersion);
|
|
||||||
static bool AllowsClickCastFromBag(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// items
|
|
||||||
static uint16 ItemCommonSize(ClientVersion clientVersion);
|
|
||||||
static uint16 ItemContainerSize(ClientVersion clientVersion);
|
|
||||||
|
|
||||||
// player profile
|
|
||||||
static bool CoinHasWeight(ClientVersion clientVersion);
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif /* EQ_DICTIONARY_H */
|
|
||||||
|
|
||||||
/*
|
|
||||||
Working Notes:
|
|
||||||
--------------
|
|
||||||
|
|
||||||
- full review of client_packet.cpp and client translators needed
|
|
||||||
|
|
||||||
|
|
||||||
*/
|
|
||||||
381
common/eq_limits.cpp
Normal file
381
common/eq_limits.cpp
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_constants.h"
|
||||||
|
#include "emu_limits.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const EQEmu::constants::LookupEntry constants_lookup_entries[EQEmu::versions::ClientVersionCount] =
|
||||||
|
{
|
||||||
|
{ // Unknown
|
||||||
|
ClientUnknown::Null
|
||||||
|
},
|
||||||
|
{ // Client62
|
||||||
|
Client62::Null
|
||||||
|
},
|
||||||
|
{ // Titanium
|
||||||
|
Titanium::constants::CharacterCreationLimit
|
||||||
|
},
|
||||||
|
{ // SoF
|
||||||
|
SoF::constants::CharacterCreationLimit
|
||||||
|
},
|
||||||
|
{ // SoD
|
||||||
|
SoD::constants::CharacterCreationLimit
|
||||||
|
},
|
||||||
|
{ // UF
|
||||||
|
UF::constants::CharacterCreationLimit
|
||||||
|
},
|
||||||
|
{ // RoF
|
||||||
|
RoF::constants::CharacterCreationLimit
|
||||||
|
},
|
||||||
|
{ // RoF2
|
||||||
|
RoF2::constants::CharacterCreationLimit
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const EQEmu::constants::LookupEntry* EQEmu::constants::Lookup(versions::ClientVersion client_version)
|
||||||
|
{
|
||||||
|
return &constants_lookup_entries[static_cast<int>(versions::ValidateClientVersion(client_version))];
|
||||||
|
}
|
||||||
|
|
||||||
|
static const EQEmu::inventory::LookupEntry inventory_lookup_entries[EQEmu::versions::InventoryVersionCount] =
|
||||||
|
{
|
||||||
|
{ // Unknown
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
|
||||||
|
ClientUnknown::Null, ClientUnknown::Null, ClientUnknown::Null,
|
||||||
|
|
||||||
|
ClientUnknown::False, ClientUnknown::False, ClientUnknown::False, ClientUnknown::False
|
||||||
|
},
|
||||||
|
{ // Client62
|
||||||
|
Client62::Null, Client62::Null, Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
Client62::Null, Client62::Null, Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
Client62::Null, Client62::Null, Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
Client62::Null, Client62::Null, Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
Client62::Null, Client62::Null, Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
|
||||||
|
Client62::Null, Client62::Null, Client62::Null,
|
||||||
|
|
||||||
|
Client62::False, Client62::False, Client62::False, Client62::False
|
||||||
|
},
|
||||||
|
{ // Titanium
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*Titanium::invtype::InvTypePossessionsSize,*/ Titanium::invtype::InvTypeBankSize, Titanium::invtype::InvTypeSharedBankSize, Titanium::invtype::InvTypeTradeSize, Titanium::invtype::InvTypeWorldSize,
|
||||||
|
Titanium::invtype::InvTypeLimboSize, Titanium::invtype::InvTypeTributeSize, Titanium::Null, Titanium::Null, /*Titanium::invtype::InvTypeGuildTributeSize,*/ Titanium::invtype::InvTypeMerchantSize,
|
||||||
|
Titanium::Null, Titanium::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*Titanium::invtype::InvTypeBazaarSize,*/ Titanium::invtype::InvTypeInspectSize, Titanium::Null,
|
||||||
|
Titanium::invtype::InvTypeViewMODPCSize, Titanium::invtype::InvTypeViewMODBankSize, Titanium::invtype::InvTypeViewMODSharedBankSize, Titanium::invtype::InvTypeViewMODLimboSize, Titanium::invtype::InvTypeAltStorageSize,
|
||||||
|
Titanium::invtype::InvTypeArchivedSize, Titanium::Null, Titanium::Null, Titanium::Null, Titanium::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
Titanium::Null, /*0x000000027FDFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*Titanium::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*Titanium::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
Titanium::inventory::AllowEmptyBagInBag, Titanium::inventory::AllowClickCastFromBag, Titanium::inventory::ConcatenateInvTypeLimbo, Titanium::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // SoF
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*SoF::invtype::InvTypePossessionsSize,*/ SoF::invtype::InvTypeBankSize, SoF::invtype::InvTypeSharedBankSize, SoF::invtype::InvTypeTradeSize, SoF::invtype::InvTypeWorldSize,
|
||||||
|
SoF::invtype::InvTypeLimboSize, SoF::invtype::InvTypeTributeSize, SoF::Null, SoF::Null, /*SoF::invtype::InvTypeGuildTributeSize,*/ SoF::invtype::InvTypeMerchantSize,
|
||||||
|
SoF::Null, SoF::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*SoF::invtype::InvTypeBazaarSize,*/ SoF::invtype::InvTypeInspectSize, SoF::Null,
|
||||||
|
SoF::invtype::InvTypeViewMODPCSize, SoF::invtype::InvTypeViewMODBankSize, SoF::invtype::InvTypeViewMODSharedBankSize, SoF::invtype::InvTypeViewMODLimboSize, SoF::invtype::InvTypeAltStorageSize,
|
||||||
|
SoF::invtype::InvTypeArchivedSize, SoF::Null, SoF::Null, SoF::Null, SoF::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
SoF::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*SoF::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
SoF::inventory::AllowEmptyBagInBag, SoF::inventory::AllowClickCastFromBag, SoF::inventory::ConcatenateInvTypeLimbo, SoF::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // SoD
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*SoD::invtype::InvTypePossessionsSize,*/ SoD::invtype::InvTypeBankSize, SoD::invtype::InvTypeSharedBankSize, SoD::invtype::InvTypeTradeSize, SoD::invtype::InvTypeWorldSize,
|
||||||
|
SoD::invtype::InvTypeLimboSize, SoD::invtype::InvTypeTributeSize, SoD::Null, SoD::Null, /*SoD::invtype::InvTypeGuildTributeSize,*/ SoD::invtype::InvTypeMerchantSize,
|
||||||
|
SoD::Null, SoD::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*SoD::invtype::InvTypeBazaarSize,*/ SoD::invtype::InvTypeInspectSize, SoD::Null,
|
||||||
|
SoD::invtype::InvTypeViewMODPCSize, SoD::invtype::InvTypeViewMODBankSize, SoD::invtype::InvTypeViewMODSharedBankSize, SoD::invtype::InvTypeViewMODLimboSize, SoD::invtype::InvTypeAltStorageSize,
|
||||||
|
SoD::invtype::InvTypeArchivedSize, SoD::Null, SoD::Null, SoD::Null, SoD::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
SoD::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoD::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*SoD::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
SoD::inventory::AllowEmptyBagInBag, SoD::inventory::AllowClickCastFromBag, SoD::inventory::ConcatenateInvTypeLimbo, SoD::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // UF
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*UF::invtype::InvTypePossessionsSize,*/ UF::invtype::InvTypeBankSize, UF::invtype::InvTypeSharedBankSize, UF::invtype::InvTypeTradeSize, UF::invtype::InvTypeWorldSize,
|
||||||
|
UF::invtype::InvTypeLimboSize, UF::invtype::InvTypeTributeSize, UF::Null, UF::Null, /*UF::invtype::InvTypeGuildTributeSize,*/ UF::invtype::InvTypeMerchantSize,
|
||||||
|
UF::Null, UF::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*UF::invtype::InvTypeBazaarSize,*/ UF::invtype::InvTypeInspectSize, UF::Null,
|
||||||
|
UF::invtype::InvTypeViewMODPCSize, UF::invtype::InvTypeViewMODBankSize, UF::invtype::InvTypeViewMODSharedBankSize, UF::invtype::InvTypeViewMODLimboSize, UF::invtype::InvTypeAltStorageSize,
|
||||||
|
UF::invtype::InvTypeArchivedSize, UF::Null, UF::Null, UF::Null, UF::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
UF::Null, /*0x000000027FFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*UF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*UF::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
UF::inventory::AllowEmptyBagInBag, UF::inventory::AllowClickCastFromBag, UF::inventory::ConcatenateInvTypeLimbo, UF::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // RoF
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*RoF::invtype::InvTypePossessionsSize,*/ RoF::invtype::InvTypeBankSize, RoF::invtype::InvTypeSharedBankSize, RoF::invtype::InvTypeTradeSize, RoF::invtype::InvTypeWorldSize,
|
||||||
|
RoF::invtype::InvTypeLimboSize, RoF::invtype::InvTypeTributeSize, RoF::Null, /*RoF::invtype::InvTypeTrophyTributeSize,*/ RoF::Null, /*RoF::invtype::InvTypeGuildTributeSize,*/ RoF::invtype::InvTypeMerchantSize,
|
||||||
|
RoF::Null, /*RoF::invtype::InvTypeDeletedSize,*/ RoF::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*RoF::invtype::InvTypeBazaarSize,*/ RoF::invtype::InvTypeInspectSize, RoF::Null, /*RoF::invtype::InvTypeRealEstateSize,*/
|
||||||
|
RoF::invtype::InvTypeViewMODPCSize, RoF::invtype::InvTypeViewMODBankSize, RoF::invtype::InvTypeViewMODSharedBankSize, RoF::invtype::InvTypeViewMODLimboSize, RoF::invtype::InvTypeAltStorageSize,
|
||||||
|
RoF::invtype::InvTypeArchivedSize, RoF::invtype::InvTypeMailSize, RoF::invtype::InvTypeGuildTrophyTributeSize, RoF::Null, RoF::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
RoF::Null, /*0x00000003FFFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*RoF::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
RoF::False, /*RoF::inventory::AllowEmptyBagInBag,*/ RoF::inventory::AllowClickCastFromBag, RoF::inventory::ConcatenateInvTypeLimbo, RoF::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // RoF2
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*RoF2::invtype::InvTypePossessionsSize,*/ RoF2::invtype::InvTypeBankSize, RoF2::invtype::InvTypeSharedBankSize, RoF2::invtype::InvTypeTradeSize, RoF2::invtype::InvTypeWorldSize,
|
||||||
|
RoF2::invtype::InvTypeLimboSize, RoF2::invtype::InvTypeTributeSize, RoF2::Null, /*RoF2::invtype::InvTypeTrophyTributeSize,*/ RoF2::Null, /*RoF2::invtype::InvTypeGuildTributeSize,*/ RoF2::invtype::InvTypeMerchantSize,
|
||||||
|
RoF2::Null, /*RoF2::invtype::InvTypeDeletedSize,*/ RoF2::invtype::InvTypeCorpseSize, EQEmu::legacy::TYPE_BAZAAR_SIZE, /*RoF2::invtype::InvTypeBazaarSize,*/ RoF2::invtype::InvTypeInspectSize, RoF2::Null, /*RoF2::invtype::InvTypeRealEstateSize*/
|
||||||
|
RoF2::invtype::InvTypeViewMODPCSize, RoF2::invtype::InvTypeViewMODBankSize, RoF2::invtype::InvTypeViewMODSharedBankSize, RoF2::invtype::InvTypeViewMODLimboSize, RoF2::invtype::InvTypeAltStorageSize,
|
||||||
|
RoF2::invtype::InvTypeArchivedSize, RoF2::invtype::InvTypeMailSize, RoF2::invtype::InvTypeGuildTrophyTributeSize, RoF2::invtype::InvTypeKronoSize, RoF2::invtype::InvTypeOtherSize,
|
||||||
|
|
||||||
|
RoF2::Null, /*0x00000003FFFFFFFF,*/ EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF2::invbag::ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*RoF2::invaug::ItemAugSize,*/
|
||||||
|
|
||||||
|
RoF2::False, /*RoF2::inventory::AllowEmptyBagInBag,*/ RoF2::inventory::AllowClickCastFromBag, RoF2::inventory::ConcatenateInvTypeLimbo, RoF2::inventory::AllowOverLevelEquipment
|
||||||
|
},
|
||||||
|
{ // NPC
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::InvTypeTradeSize, EntityLimits::NPC::Null,
|
||||||
|
EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||||
|
EntityLimits::NPC::Null, EntityLimits::NPC::Null, /*InvTypeCorpseSize,*/ EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||||
|
EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||||
|
EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null, EntityLimits::NPC::Null,
|
||||||
|
|
||||||
|
EntityLimits::NPC::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::NPC::False, EntityLimits::NPC::False, EntityLimits::NPC::False, EntityLimits::NPC::False
|
||||||
|
},
|
||||||
|
{ // NPCMerchant
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::InvTypeTradeSize, EntityLimits::NPCMerchant::Null,
|
||||||
|
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||||
|
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, /*InvTypeCorpseSize,*/ EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||||
|
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||||
|
EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null, EntityLimits::NPCMerchant::Null,
|
||||||
|
|
||||||
|
EntityLimits::NPCMerchant::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False, EntityLimits::NPCMerchant::False
|
||||||
|
},
|
||||||
|
{ // Merc
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::InvTypeTradeSize, EntityLimits::Merc::Null,
|
||||||
|
EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||||
|
EntityLimits::Merc::Null, EntityLimits::Merc::Null, /*InvTypeCorpseSize,*/ EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||||
|
EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||||
|
EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null, EntityLimits::Merc::Null,
|
||||||
|
|
||||||
|
EntityLimits::Merc::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::Merc::False, EntityLimits::Merc::False, EntityLimits::Merc::False, EntityLimits::Merc::False
|
||||||
|
},
|
||||||
|
{ // Bot
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::InvTypeTradeSize, EntityLimits::Bot::Null,
|
||||||
|
EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||||
|
EntityLimits::Bot::Null, EntityLimits::Bot::Null, /*InvTypeCorpseSize,*/ EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||||
|
EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||||
|
EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null, EntityLimits::Bot::Null,
|
||||||
|
|
||||||
|
EntityLimits::Bot::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::Bot::False, EntityLimits::Bot::False, EntityLimits::Bot::False, EntityLimits::Bot::False
|
||||||
|
},
|
||||||
|
{ // ClientPet
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::InvTypeTradeSize, EntityLimits::ClientPet::Null,
|
||||||
|
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||||
|
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, /*InvTypeCorpseSize,*/ EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||||
|
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||||
|
EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null, EntityLimits::ClientPet::Null,
|
||||||
|
|
||||||
|
EntityLimits::ClientPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::ClientPet::False, EntityLimits::ClientPet::False, EntityLimits::ClientPet::False, EntityLimits::ClientPet::False
|
||||||
|
},
|
||||||
|
{ // NPCPet
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::InvTypeTradeSize, EntityLimits::NPCPet::Null,
|
||||||
|
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||||
|
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, /*InvTypeCorpseSize,*/ EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||||
|
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||||
|
EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null, EntityLimits::NPCPet::Null,
|
||||||
|
|
||||||
|
EntityLimits::NPCPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::NPCPet::False, EntityLimits::NPCPet::False, EntityLimits::NPCPet::False, EntityLimits::NPCPet::False
|
||||||
|
},
|
||||||
|
{ // MercPet
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::InvTypeTradeSize, EntityLimits::MercPet::Null,
|
||||||
|
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||||
|
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, /*InvTypeCorpseSize,*/ EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||||
|
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||||
|
EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null, EntityLimits::MercPet::Null,
|
||||||
|
|
||||||
|
EntityLimits::MercPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::MercPet::False, EntityLimits::MercPet::False, EntityLimits::MercPet::False, EntityLimits::MercPet::False
|
||||||
|
},
|
||||||
|
{ // BotPet
|
||||||
|
EQEmu::legacy::TYPE_POSSESSIONS_SIZE, /*InvTypePossessionsSize,*/ EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::InvTypeTradeSize, EntityLimits::BotPet::Null,
|
||||||
|
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||||
|
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, /*InvTypeCorpseSize,*/ EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||||
|
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||||
|
EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null, EntityLimits::BotPet::Null,
|
||||||
|
|
||||||
|
EntityLimits::BotPet::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*ItemBagSize,*/ EQEmu::legacy::ITEM_COMMON_SIZE, /*ItemAugSize,*/
|
||||||
|
|
||||||
|
EntityLimits::BotPet::False, EntityLimits::BotPet::False, EntityLimits::BotPet::False, EntityLimits::BotPet::False
|
||||||
|
},
|
||||||
|
{ // OfflineTitanium
|
||||||
|
Titanium::Null, Titanium::Null, Titanium::Null, Titanium::invtype::InvTypeTradeSize, Titanium::Null,
|
||||||
|
Titanium::Null, Titanium::Null, Titanium::Null, Titanium::Null, Titanium::invtype::InvTypeMerchantSize,
|
||||||
|
Titanium::Null, Titanium::Null, Titanium::Null, /*Titanium::invtype::InvTypeBazaarSize,*/ Titanium::invtype::InvTypeInspectSize, Titanium::Null,
|
||||||
|
Titanium::invtype::InvTypeViewMODPCSize, Titanium::invtype::InvTypeViewMODBankSize, Titanium::invtype::InvTypeViewMODSharedBankSize, Titanium::invtype::InvTypeViewMODLimboSize, Titanium::Null,
|
||||||
|
Titanium::Null, Titanium::Null, Titanium::Null, Titanium::Null, Titanium::Null,
|
||||||
|
|
||||||
|
Titanium::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*Titanium::Null,*/ Titanium::Null,
|
||||||
|
|
||||||
|
Titanium::False, Titanium::False, Titanium::False, Titanium::False
|
||||||
|
},
|
||||||
|
{ // OfflineSoF
|
||||||
|
SoF::Null, SoF::Null, SoF::Null, SoF::invtype::InvTypeTradeSize, SoF::Null,
|
||||||
|
SoF::Null, SoF::Null, SoF::Null, SoF::Null, SoF::invtype::InvTypeMerchantSize,
|
||||||
|
SoF::Null, SoF::Null, SoF::Null, /*SoF::invtype::InvTypeBazaarSize,*/ SoF::invtype::InvTypeInspectSize, SoF::Null,
|
||||||
|
SoF::invtype::InvTypeViewMODPCSize, SoF::invtype::InvTypeViewMODBankSize, SoF::invtype::InvTypeViewMODSharedBankSize, SoF::invtype::InvTypeViewMODLimboSize, SoF::Null,
|
||||||
|
SoF::Null, SoF::Null, SoF::Null, SoF::Null, SoF::Null,
|
||||||
|
|
||||||
|
SoF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoF::Null,*/ SoF::Null,
|
||||||
|
|
||||||
|
SoF::False, SoF::False, SoF::False, SoF::False
|
||||||
|
},
|
||||||
|
{ // OfflineSoD
|
||||||
|
SoD::Null, SoD::Null, SoD::Null, SoD::invtype::InvTypeTradeSize, SoD::Null,
|
||||||
|
SoD::Null, SoD::Null, SoD::Null, SoD::Null, SoD::invtype::InvTypeMerchantSize,
|
||||||
|
SoD::Null, SoD::Null, SoD::Null, /*SoD::invtype::InvTypeBazaarSize,*/ SoD::invtype::InvTypeInspectSize, SoD::Null,
|
||||||
|
SoD::invtype::InvTypeViewMODPCSize, SoD::invtype::InvTypeViewMODBankSize, SoD::invtype::InvTypeViewMODSharedBankSize, SoD::invtype::InvTypeViewMODLimboSize, SoD::Null,
|
||||||
|
SoD::Null, SoD::Null, SoD::Null, SoD::Null, SoD::Null,
|
||||||
|
|
||||||
|
SoD::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*SoD::Null,*/ SoD::Null,
|
||||||
|
|
||||||
|
SoD::False, SoD::False, SoD::False, SoD::False
|
||||||
|
},
|
||||||
|
{ // OfflineUF
|
||||||
|
UF::Null, UF::Null, UF::Null, UF::invtype::InvTypeTradeSize, UF::Null,
|
||||||
|
UF::Null, UF::Null, UF::Null, UF::Null, UF::invtype::InvTypeMerchantSize,
|
||||||
|
UF::Null, UF::Null, UF::Null, /*UF::invtype::InvTypeBazaarSize,*/ UF::invtype::InvTypeInspectSize, UF::Null,
|
||||||
|
UF::invtype::InvTypeViewMODPCSize, UF::invtype::InvTypeViewMODBankSize, UF::invtype::InvTypeViewMODSharedBankSize, UF::invtype::InvTypeViewMODLimboSize, UF::Null,
|
||||||
|
UF::Null, UF::Null, UF::Null, UF::Null, UF::Null,
|
||||||
|
|
||||||
|
UF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*UF::Null,*/ UF::Null,
|
||||||
|
|
||||||
|
UF::False, UF::False, UF::False, UF::False
|
||||||
|
},
|
||||||
|
{ // OfflineRoF
|
||||||
|
RoF::Null, RoF::Null, RoF::Null, RoF::invtype::InvTypeTradeSize, RoF::Null,
|
||||||
|
RoF::Null, RoF::Null, RoF::Null, RoF::Null, RoF::invtype::InvTypeMerchantSize,
|
||||||
|
RoF::Null, RoF::Null, RoF::Null, /*RoF::invtype::InvTypeBazaarSize,*/ RoF::invtype::InvTypeInspectSize, RoF::Null,
|
||||||
|
RoF::invtype::InvTypeViewMODPCSize, RoF::invtype::InvTypeViewMODBankSize, RoF::invtype::InvTypeViewMODSharedBankSize, RoF::invtype::InvTypeViewMODLimboSize, RoF::Null,
|
||||||
|
RoF::Null, RoF::Null, RoF::Null, RoF::Null, RoF::Null,
|
||||||
|
|
||||||
|
RoF::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF::Null,*/ RoF::Null,
|
||||||
|
|
||||||
|
RoF::False, RoF::False, RoF::False, RoF::False
|
||||||
|
},
|
||||||
|
{ // OfflineRoF2
|
||||||
|
RoF2::Null, RoF2::Null, RoF2::Null, RoF2::invtype::InvTypeTradeSize, RoF2::Null,
|
||||||
|
RoF2::Null, RoF2::Null, RoF2::Null, RoF2::Null, RoF2::invtype::InvTypeMerchantSize,
|
||||||
|
RoF2::Null, RoF2::Null, RoF2::Null, /*RoF2::invtype::InvTypeBazaarSize,*/ RoF2::invtype::InvTypeInspectSize, RoF2::Null,
|
||||||
|
RoF2::invtype::InvTypeViewMODPCSize, RoF2::invtype::InvTypeViewMODBankSize, RoF2::invtype::InvTypeViewMODSharedBankSize, RoF2::invtype::InvTypeViewMODLimboSize, RoF2::Null,
|
||||||
|
RoF2::Null, RoF2::Null, RoF2::Null, RoF2::Null, RoF2::Null,
|
||||||
|
|
||||||
|
RoF2::Null, EQEmu::legacy::ITEM_CONTAINER_SIZE, /*RoF2::Null,*/ RoF2::Null,
|
||||||
|
|
||||||
|
RoF2::False, RoF2::False, RoF2::False, RoF2::False
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const EQEmu::inventory::LookupEntry* EQEmu::inventory::Lookup(versions::InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
return &inventory_lookup_entries[static_cast<int>(versions::ValidateInventoryVersion(inventory_version))];
|
||||||
|
}
|
||||||
|
|
||||||
|
static const EQEmu::behavior::LookupEntry behavior_lookup_entries[EQEmu::versions::InventoryVersionCount] =
|
||||||
|
{
|
||||||
|
{ // Unknown
|
||||||
|
ClientUnknown::True
|
||||||
|
},
|
||||||
|
{ // Client62
|
||||||
|
Client62::True
|
||||||
|
},
|
||||||
|
{ // Titanium
|
||||||
|
Titanium::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // SoF
|
||||||
|
SoF::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // SoD
|
||||||
|
SoD::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // UF
|
||||||
|
UF::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // RoF
|
||||||
|
RoF::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // RoF2
|
||||||
|
RoF2::behavior::CoinHasWeight
|
||||||
|
},
|
||||||
|
{ // NPC
|
||||||
|
EntityLimits::NPC::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // NPCMerchant
|
||||||
|
EntityLimits::NPC::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // Merc
|
||||||
|
EntityLimits::Merc::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // Bot
|
||||||
|
EntityLimits::Bot::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // ClientPet
|
||||||
|
EntityLimits::ClientPet::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // NPCPet
|
||||||
|
EntityLimits::NPCPet::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // MercPet
|
||||||
|
EntityLimits::MercPet::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // BotPet
|
||||||
|
EntityLimits::BotPet::True /*CoinHasWeight*/
|
||||||
|
},
|
||||||
|
{ // OfflineTitanium
|
||||||
|
Titanium::False
|
||||||
|
},
|
||||||
|
{ // OfflineSoF
|
||||||
|
SoF::False
|
||||||
|
},
|
||||||
|
{ // OfflineSoD
|
||||||
|
SoD::False
|
||||||
|
},
|
||||||
|
{ // OfflineUF
|
||||||
|
UF::False
|
||||||
|
},
|
||||||
|
{ // OfflineRoF
|
||||||
|
RoF::False
|
||||||
|
},
|
||||||
|
{ // OfflineRoF2
|
||||||
|
RoF2::False
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const EQEmu::behavior::LookupEntry* EQEmu::behavior::Lookup(versions::InventoryVersion inventory_version)
|
||||||
|
{
|
||||||
|
return &behavior_lookup_entries[static_cast<int>(versions::ValidateInventoryVersion(inventory_version))];
|
||||||
|
}
|
||||||
94
common/eq_limits.h
Normal file
94
common/eq_limits.h
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_EQ_LIMITS_H
|
||||||
|
#define COMMON_EQ_LIMITS_H
|
||||||
|
|
||||||
|
#include "emu_legacy.h"
|
||||||
|
#include "types.h"
|
||||||
|
#include "eq_constants.h"
|
||||||
|
#include "emu_versions.h"
|
||||||
|
#include "../common/patches/titanium_limits.h"
|
||||||
|
#include "../common/patches/sof_limits.h"
|
||||||
|
#include "../common/patches/sod_limits.h"
|
||||||
|
#include "../common/patches/uf_limits.h"
|
||||||
|
#include "../common/patches/rof_limits.h"
|
||||||
|
#include "../common/patches/rof2_limits.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace constants {
|
||||||
|
class LookupEntry {
|
||||||
|
public:
|
||||||
|
size_t CharacterCreationLimit;
|
||||||
|
};
|
||||||
|
|
||||||
|
const LookupEntry* Lookup(versions::ClientVersion client_version);
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
|
||||||
|
namespace inventory {
|
||||||
|
class LookupEntry {
|
||||||
|
public:
|
||||||
|
size_t InventoryTypeSize[legacy::TypeCount];
|
||||||
|
|
||||||
|
uint64 PossessionsBitmask;
|
||||||
|
size_t ItemBagSize;
|
||||||
|
size_t ItemAugSize;
|
||||||
|
|
||||||
|
bool AllowEmptyBagInBag;
|
||||||
|
bool AllowClickCastFromBag;
|
||||||
|
bool ConcatenateInvTypeLimbo;
|
||||||
|
bool AllowOverLevelEquipment;
|
||||||
|
};
|
||||||
|
|
||||||
|
const LookupEntry* Lookup(versions::InventoryVersion inventory_version);
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace behavior {
|
||||||
|
class LookupEntry {
|
||||||
|
public:
|
||||||
|
bool CoinHasWeight;
|
||||||
|
};
|
||||||
|
|
||||||
|
const LookupEntry* Lookup(versions::InventoryVersion inventory_version);
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
namespace ClientUnknown
|
||||||
|
{
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
} /*ClientUnknown*/
|
||||||
|
|
||||||
|
namespace Client62
|
||||||
|
{
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
} /*Client62*/
|
||||||
|
|
||||||
|
#endif /*COMMON_EQ_LIMITS_H*/
|
||||||
@ -260,7 +260,7 @@ bool EQProtocolPacket::combine(const EQProtocolPacket *rhs)
|
|||||||
{
|
{
|
||||||
bool result=false;
|
bool result=false;
|
||||||
if (opcode==OP_Combined && size+rhs->size+5<256) {
|
if (opcode==OP_Combined && size+rhs->size+5<256) {
|
||||||
unsigned char *tmpbuffer=new unsigned char [size+rhs->size+3];
|
auto tmpbuffer = new unsigned char[size + rhs->size + 3];
|
||||||
memcpy(tmpbuffer,pBuffer,size);
|
memcpy(tmpbuffer,pBuffer,size);
|
||||||
uint32 offset=size;
|
uint32 offset=size;
|
||||||
tmpbuffer[offset++]=rhs->Size();
|
tmpbuffer[offset++]=rhs->Size();
|
||||||
@ -270,7 +270,7 @@ bool result=false;
|
|||||||
pBuffer=tmpbuffer;
|
pBuffer=tmpbuffer;
|
||||||
result=true;
|
result=true;
|
||||||
} else if (size+rhs->size+7<256) {
|
} else if (size+rhs->size+7<256) {
|
||||||
unsigned char *tmpbuffer=new unsigned char [size+rhs->size+6];
|
auto tmpbuffer = new unsigned char[size + rhs->size + 6];
|
||||||
uint32 offset=0;
|
uint32 offset=0;
|
||||||
tmpbuffer[offset++]=Size();
|
tmpbuffer[offset++]=Size();
|
||||||
offset+=serialize(tmpbuffer+offset);
|
offset+=serialize(tmpbuffer+offset);
|
||||||
@ -457,7 +457,7 @@ EQApplicationPacket *EQApplicationPacket::Copy() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EQRawApplicationPacket *EQProtocolPacket::MakeAppPacket() const {
|
EQRawApplicationPacket *EQProtocolPacket::MakeAppPacket() const {
|
||||||
EQRawApplicationPacket *res = new EQRawApplicationPacket(opcode, pBuffer, size);
|
auto res = new EQRawApplicationPacket(opcode, pBuffer, size);
|
||||||
res->copyInfo(this);
|
res->copyInfo(this);
|
||||||
return(res);
|
return(res);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class EQProtocolPacket : public BasePacket {
|
|||||||
friend class EQStream;
|
friend class EQStream;
|
||||||
friend class EQStreamPair;
|
friend class EQStreamPair;
|
||||||
public:
|
public:
|
||||||
EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len) : BasePacket(buf,len), opcode(op) { acked = false; }
|
EQProtocolPacket(uint16 op, const unsigned char *buf, uint32 len) : BasePacket(buf, len), opcode(op) { acked = false; sent_time = 0; }
|
||||||
// EQProtocolPacket(const unsigned char *buf, uint32 len);
|
// EQProtocolPacket(const unsigned char *buf, uint32 len);
|
||||||
bool combine(const EQProtocolPacket *rhs);
|
bool combine(const EQProtocolPacket *rhs);
|
||||||
uint32 serialize (unsigned char *dest) const;
|
uint32 serialize (unsigned char *dest) const;
|
||||||
@ -70,6 +70,7 @@ public:
|
|||||||
EQRawApplicationPacket *MakeAppPacket() const;
|
EQRawApplicationPacket *MakeAppPacket() const;
|
||||||
|
|
||||||
bool acked;
|
bool acked;
|
||||||
|
uint32 sent_time;
|
||||||
|
|
||||||
virtual void build_raw_header_dump(char *buffer, uint16 seq=0xffff) const;
|
virtual void build_raw_header_dump(char *buffer, uint16 seq=0xffff) const;
|
||||||
virtual void build_header_dump(char *buffer) const;
|
virtual void build_header_dump(char *buffer) const;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -25,16 +25,17 @@
|
|||||||
#include <list>
|
#include <list>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include "../common/version.h"
|
#include "../common/version.h"
|
||||||
//#include "../common/item_struct.h"
|
#include "emu_constants.h"
|
||||||
|
#include "textures.h"
|
||||||
|
|
||||||
|
|
||||||
static const uint32 BUFF_COUNT = 25;
|
static const uint32 BUFF_COUNT = 25;
|
||||||
|
static const uint32 PET_BUFF_COUNT = 30;
|
||||||
static const uint32 MAX_MERC = 100;
|
static const uint32 MAX_MERC = 100;
|
||||||
static const uint32 MAX_MERC_GRADES = 10;
|
static const uint32 MAX_MERC_GRADES = 10;
|
||||||
static const uint32 MAX_MERC_STANCES = 10;
|
static const uint32 MAX_MERC_STANCES = 10;
|
||||||
static const uint32 BLOCKED_BUFF_COUNT = 20;
|
static const uint32 BLOCKED_BUFF_COUNT = 20;
|
||||||
|
|
||||||
//#include "eq_constants.h"
|
|
||||||
#include "eq_dictionary.h"
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Compiler override to ensure
|
** Compiler override to ensure
|
||||||
@ -126,37 +127,7 @@ struct LDoNTrapTemplate
|
|||||||
|
|
||||||
// All clients translate the character select information to some degree
|
// All clients translate the character select information to some degree
|
||||||
|
|
||||||
struct Color_Struct
|
struct CharSelectEquip : EQEmu::Texture_Struct, EQEmu::Tint_Struct {};
|
||||||
{
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint8 Blue;
|
|
||||||
uint8 Green;
|
|
||||||
uint8 Red;
|
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
|
||||||
} RGB;
|
|
||||||
uint32 Color;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
uint32 Material;
|
|
||||||
uint32 Unknown1;
|
|
||||||
uint32 EliteMaterial;
|
|
||||||
uint32 HeroForgeModel;
|
|
||||||
uint32 Material2; // Same as material?
|
|
||||||
};
|
|
||||||
|
|
||||||
struct CharSelectEquip
|
|
||||||
{
|
|
||||||
uint32 Material;
|
|
||||||
uint32 Unknown1;
|
|
||||||
uint32 EliteMaterial;
|
|
||||||
uint32 HeroForgeModel;
|
|
||||||
uint32 Material2;
|
|
||||||
Color_Struct Color;
|
|
||||||
};
|
|
||||||
|
|
||||||
// RoF2-based hybrid struct
|
// RoF2-based hybrid struct
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
@ -171,7 +142,7 @@ struct CharacterSelectEntry_Struct
|
|||||||
uint16 Instance;
|
uint16 Instance;
|
||||||
uint8 Gender;
|
uint8 Gender;
|
||||||
uint8 Face;
|
uint8 Face;
|
||||||
CharSelectEquip Equip[9];
|
CharSelectEquip Equip[EQEmu::textures::TextureCount];
|
||||||
uint8 Unknown15; // Seen FF
|
uint8 Unknown15; // Seen FF
|
||||||
uint8 Unknown19; // Seen FF
|
uint8 Unknown19; // Seen FF
|
||||||
uint32 DrakkinTattoo;
|
uint32 DrakkinTattoo;
|
||||||
@ -273,28 +244,14 @@ struct Spawn_Struct {
|
|||||||
/*0146*/ uint8 beard; // Beard style (not totally, sure but maybe!)
|
/*0146*/ uint8 beard; // Beard style (not totally, sure but maybe!)
|
||||||
/*0147*/ uint8 unknown0147[4];
|
/*0147*/ uint8 unknown0147[4];
|
||||||
/*0151*/ uint8 level; // Spawn Level
|
/*0151*/ uint8 level; // Spawn Level
|
||||||
/*0152*/ uint8 unknown0259[4]; // ***Placeholder
|
// None = 0, Open = 1, WeaponSheathed = 2, Aggressive = 4, ForcedAggressive = 8, InstrumentEquipped = 16, Stunned = 32, PrimaryWeaponEquipped = 64, SecondaryWeaponEquipped = 128
|
||||||
|
/*0152*/ uint32 PlayerState; // Controls animation stuff
|
||||||
/*0156*/ uint8 beardcolor; // Beard color
|
/*0156*/ uint8 beardcolor; // Beard color
|
||||||
/*0157*/ char suffix[32]; // Player's suffix (of Veeshan, etc.)
|
/*0157*/ char suffix[32]; // Player's suffix (of Veeshan, etc.)
|
||||||
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
/*0189*/ uint32 petOwnerId; // If this is a pet, the spawn id of owner
|
||||||
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
/*0193*/ uint8 guildrank; // 0=normal, 1=officer, 2=leader
|
||||||
/*0194*/ uint8 unknown0194[3];
|
/*0194*/ uint8 unknown0194[3];
|
||||||
/*0197*/ union
|
/*0197*/ EQEmu::TextureProfile equipment;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equipment: Helmet visual
|
|
||||||
/*0000*/ EquipStruct equip_chest; // Equipment: Chest visual
|
|
||||||
/*0000*/ EquipStruct equip_arms; // Equipment: Arms visual
|
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equipment: Wrist visual
|
|
||||||
/*0000*/ EquipStruct equip_hands; // Equipment: Hands visual
|
|
||||||
/*0000*/ EquipStruct equip_legs; // Equipment: Legs visual
|
|
||||||
/*0000*/ EquipStruct equip_feet; // Equipment: Boots visual
|
|
||||||
/*0000*/ EquipStruct equip_primary; // Equipment: Main visual
|
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equipment: Off visual
|
|
||||||
} equip;
|
|
||||||
/*0000*/ EquipStruct equipment[_MaterialCount];
|
|
||||||
};
|
|
||||||
/*0233*/ float runspeed; // Speed when running
|
/*0233*/ float runspeed; // Speed when running
|
||||||
/*0036*/ uint8 afk; // 0=no, 1=afk
|
/*0036*/ uint8 afk; // 0=no, 1=afk
|
||||||
/*0238*/ uint32 guildID; // Current guild
|
/*0238*/ uint32 guildID; // Current guild
|
||||||
@ -325,22 +282,7 @@ union
|
|||||||
/*0340*/ uint32 spawnId; // Spawn Id
|
/*0340*/ uint32 spawnId; // Spawn Id
|
||||||
/*0344*/ uint8 unknown0344[3];
|
/*0344*/ uint8 unknown0344[3];
|
||||||
/*0347*/ uint8 IsMercenary;
|
/*0347*/ uint8 IsMercenary;
|
||||||
/*0348*/ union
|
/*0348*/ EQEmu::TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0348*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0352*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0356*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0360*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0364*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0368*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0372*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0376*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0380*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0348*/ Color_Struct colors[_MaterialCount]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
/*0384*/ uint8 lfg; // 0=off, 1=lfg on
|
||||||
/*0385*/
|
/*0385*/
|
||||||
|
|
||||||
@ -366,6 +308,11 @@ union
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct PlayerState_Struct {
|
||||||
|
/*00*/ uint32 spawn_id;
|
||||||
|
/*04*/ uint32 state;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** New Spawn
|
** New Spawn
|
||||||
** Length: 176 Bytes
|
** Length: 176 Bytes
|
||||||
@ -440,7 +387,19 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lower reuse
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
** Linked Spell Reuse Timer
|
||||||
|
** Length: 12
|
||||||
|
** Comes before the OP_Memorize
|
||||||
|
** Live (maybe TDS steam) has an extra DWORD after timer_id
|
||||||
|
*/
|
||||||
|
struct LinkedSpellReuseTimer_Struct {
|
||||||
|
uint32 timer_id; // Timer ID of the spell
|
||||||
|
uint32 end_time; // timestamp of when it will be ready
|
||||||
|
uint32 start_time; // timestamp of when it started
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -473,10 +432,11 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@ -542,30 +502,28 @@ struct SpawnAppearance_Struct
|
|||||||
// this is used inside profile
|
// this is used inside profile
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; //badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ uint8 level;
|
/*001*/ uint8 level;
|
||||||
/*002*/ uint8 bard_modifier;
|
/*002*/ uint8 bard_modifier;
|
||||||
/*003*/ uint8 effect; //not real
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking? -- OSX client calls this "activated"
|
||||||
/*004*/ uint32 spellid;
|
/*004*/ uint32 spellid;
|
||||||
/*008*/ uint32 duration;
|
/*008*/ int32 duration;
|
||||||
/*012*/ uint32 counters;
|
/*012*/ uint32 counters; // single book keeping value (counters, rune/vie)
|
||||||
/*016*/ uint32 player_id; //'global' ID of the caster, for wearoff messages
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/
|
// extra stuff for newer packets
|
||||||
|
/*020*/ uint32 num_hits;
|
||||||
|
/*024*/ float y; // referenced by SPA 441
|
||||||
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
struct SpellBuffPacket_Struct {
|
||||||
/*000*/ uint32 entityid;
|
/*000*/ uint32 entityid;
|
||||||
/*004*/ uint8 slot;
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*005*/ uint8 level;
|
/*040*/ uint32 slotid;
|
||||||
/*006*/ uint8 effect;
|
/*044*/ uint32 bufffade;
|
||||||
/*007*/ uint8 unknown7;
|
/*048*/
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ uint32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; //prolly global player ID
|
|
||||||
/*024*/ uint32 slotid;
|
|
||||||
/*028*/ uint32 bufffade;
|
|
||||||
/*032*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Underfoot & later struct.
|
// Underfoot & later struct.
|
||||||
@ -578,14 +536,8 @@ struct BuffRemoveRequest_Struct
|
|||||||
|
|
||||||
struct PetBuff_Struct {
|
struct PetBuff_Struct {
|
||||||
/*000*/ uint32 petid;
|
/*000*/ uint32 petid;
|
||||||
/*004*/ uint32 spellid[BUFF_COUNT];
|
/*004*/ uint32 spellid[PET_BUFF_COUNT];
|
||||||
/*104*/ uint32 unknown700;
|
/*124*/ int32 ticsremaining[PET_BUFF_COUNT];
|
||||||
/*108*/ uint32 unknown701;
|
|
||||||
/*112*/ uint32 unknown702;
|
|
||||||
/*116*/ uint32 unknown703;
|
|
||||||
/*120*/ uint32 unknown704;
|
|
||||||
/*124*/ uint32 ticsremaining[BUFF_COUNT];
|
|
||||||
/*224*/ uchar unknown705[20];
|
|
||||||
/*244*/ uint32 buffcount;
|
/*244*/ uint32 buffcount;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -726,6 +678,7 @@ struct AA_Array
|
|||||||
{
|
{
|
||||||
uint32 AA;
|
uint32 AA;
|
||||||
uint32 value;
|
uint32 value;
|
||||||
|
uint32 charges;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -776,7 +729,7 @@ struct BandolierItem_Struct
|
|||||||
struct Bandolier_Struct
|
struct Bandolier_Struct
|
||||||
{
|
{
|
||||||
char Name[32];
|
char Name[32];
|
||||||
BandolierItem_Struct Items[EmuConstants::BANDOLIER_ITEM_COUNT];
|
BandolierItem_Struct Items[EQEmu::legacy::BANDOLIER_ITEM_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
//len = 72
|
//len = 72
|
||||||
@ -790,7 +743,7 @@ struct PotionBeltItem_Struct
|
|||||||
//len = 288
|
//len = 288
|
||||||
struct PotionBelt_Struct
|
struct PotionBelt_Struct
|
||||||
{
|
{
|
||||||
PotionBeltItem_Struct Items[EmuConstants::POTION_BELT_ITEM_COUNT];
|
PotionBeltItem_Struct Items[EQEmu::legacy::POTION_BELT_ITEM_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MovePotionToBelt_Struct
|
struct MovePotionToBelt_Struct
|
||||||
@ -881,7 +834,7 @@ struct SuspendedMinion_Struct
|
|||||||
/*002*/ uint32 HP;
|
/*002*/ uint32 HP;
|
||||||
/*006*/ uint32 Mana;
|
/*006*/ uint32 Mana;
|
||||||
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
/*010*/ SpellBuff_Struct Buffs[BUFF_COUNT];
|
||||||
/*510*/ uint32 Items[_MaterialCount];
|
/*510*/ EQEmu::TextureShortProfile Items;
|
||||||
/*546*/ char Name[64];
|
/*546*/ char Name[64];
|
||||||
/*610*/
|
/*610*/
|
||||||
};
|
};
|
||||||
@ -895,7 +848,7 @@ struct SuspendedMinion_Struct
|
|||||||
*/
|
*/
|
||||||
static const uint32 MAX_PP_LANGUAGE = 28;
|
static const uint32 MAX_PP_LANGUAGE = 28;
|
||||||
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
|
static const uint32 MAX_PP_SPELLBOOK = 480; // Set for all functions
|
||||||
static const uint32 MAX_PP_MEMSPELL = 9; // Set to latest client so functions can work right
|
static const uint32 MAX_PP_MEMSPELL = static_cast<uint32>(EQEmu::CastingSlot::MaxGems); // Set to latest client so functions can work right -- 12
|
||||||
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
|
static const uint32 MAX_PP_REF_SPELLBOOK = 480; // Set for Player Profile size retain
|
||||||
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
static const uint32 MAX_PP_REF_MEMSPELL = 9; // Set for Player Profile size retain
|
||||||
|
|
||||||
@ -976,7 +929,7 @@ struct PlayerProfile_Struct
|
|||||||
/*0245*/ uint8 guildbanker;
|
/*0245*/ uint8 guildbanker;
|
||||||
/*0246*/ uint8 unknown0246[6]; //
|
/*0246*/ uint8 unknown0246[6]; //
|
||||||
/*0252*/ uint32 intoxication;
|
/*0252*/ uint32 intoxication;
|
||||||
/*0256*/ uint32 spellSlotRefresh[MAX_PP_REF_MEMSPELL]; //in ms
|
/*0256*/ uint32 spellSlotRefresh[MAX_PP_MEMSPELL]; //in ms
|
||||||
/*0292*/ uint32 abilitySlotRefresh;
|
/*0292*/ uint32 abilitySlotRefresh;
|
||||||
/*0296*/ uint8 haircolor; // Player hair color
|
/*0296*/ uint8 haircolor; // Player hair color
|
||||||
/*0297*/ uint8 beardcolor; // Player beard color
|
/*0297*/ uint8 beardcolor; // Player beard color
|
||||||
@ -989,9 +942,9 @@ struct PlayerProfile_Struct
|
|||||||
/*0304*/ uint8 ability_time_minutes;
|
/*0304*/ uint8 ability_time_minutes;
|
||||||
/*0305*/ uint8 ability_time_hours; //place holder
|
/*0305*/ uint8 ability_time_hours; //place holder
|
||||||
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
/*0306*/ uint8 unknown0306[6]; // @bp Spacer/Flag?
|
||||||
/*0312*/ uint32 item_material[_MaterialCount]; // Item texture/material of worn/held items
|
/*0312*/ EQEmu::TextureShortProfile item_material; // Item texture/material of worn/held items
|
||||||
/*0348*/ uint8 unknown0348[44];
|
/*0348*/ uint8 unknown0348[44];
|
||||||
/*0392*/ Color_Struct item_tint[_MaterialCount];
|
/*0392*/ EQEmu::TintProfile item_tint;
|
||||||
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
/*0428*/ AA_Array aa_array[MAX_PP_AA_ARRAY];
|
||||||
/*2348*/ float unknown2384; //seen ~128, ~47
|
/*2348*/ float unknown2384; //seen ~128, ~47
|
||||||
/*2352*/ char servername[32]; // length probably not right
|
/*2352*/ char servername[32]; // length probably not right
|
||||||
@ -1017,7 +970,7 @@ struct PlayerProfile_Struct
|
|||||||
/*2580*/ uint8 unknown2616[4];
|
/*2580*/ uint8 unknown2616[4];
|
||||||
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
/*2584*/ uint32 spell_book[MAX_PP_REF_SPELLBOOK];
|
||||||
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
/*4504*/ uint8 unknown4540[128]; // Was [428] all 0xff
|
||||||
/*4632*/ uint32 mem_spells[MAX_PP_REF_MEMSPELL];
|
/*4632*/ uint32 mem_spells[MAX_PP_MEMSPELL];
|
||||||
/*4668*/ uint8 unknown4704[32]; //
|
/*4668*/ uint8 unknown4704[32]; //
|
||||||
/*4700*/ float y; // Player y position
|
/*4700*/ float y; // Player y position
|
||||||
/*4704*/ float x; // Player x position
|
/*4704*/ float x; // Player x position
|
||||||
@ -1092,7 +1045,7 @@ struct PlayerProfile_Struct
|
|||||||
/*7212*/ uint32 tribute_points;
|
/*7212*/ uint32 tribute_points;
|
||||||
/*7216*/ uint32 unknown7252;
|
/*7216*/ uint32 unknown7252;
|
||||||
/*7220*/ uint32 tribute_active; //1=active
|
/*7220*/ uint32 tribute_active; //1=active
|
||||||
/*7224*/ Tribute_Struct tributes[EmuConstants::TRIBUTE_SIZE];
|
/*7224*/ Tribute_Struct tributes[EQEmu::legacy::TRIBUTE_SIZE];
|
||||||
/*7264*/ Disciplines_Struct disciplines;
|
/*7264*/ Disciplines_Struct disciplines;
|
||||||
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
/*7664*/ uint32 recastTimers[MAX_RECAST_TYPES]; // Timers (GMT of last use)
|
||||||
/*7744*/ char unknown7780[160];
|
/*7744*/ char unknown7780[160];
|
||||||
@ -1119,7 +1072,7 @@ struct PlayerProfile_Struct
|
|||||||
/*12800*/ uint32 expAA;
|
/*12800*/ uint32 expAA;
|
||||||
/*12804*/ uint32 aapoints; //avaliable, unspent
|
/*12804*/ uint32 aapoints; //avaliable, unspent
|
||||||
/*12808*/ uint8 unknown12844[36];
|
/*12808*/ uint8 unknown12844[36];
|
||||||
/*12844*/ Bandolier_Struct bandoliers[EmuConstants::BANDOLIERS_SIZE];
|
/*12844*/ Bandolier_Struct bandoliers[EQEmu::legacy::BANDOLIERS_SIZE];
|
||||||
/*14124*/ uint8 unknown14160[4506];
|
/*14124*/ uint8 unknown14160[4506];
|
||||||
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
|
/*18630*/ SuspendedMinion_Struct SuspendedMinion; // No longer in use
|
||||||
/*19240*/ uint32 timeentitledonaccount;
|
/*19240*/ uint32 timeentitledonaccount;
|
||||||
@ -1160,7 +1113,7 @@ struct TargetReject_Struct {
|
|||||||
|
|
||||||
struct PetCommand_Struct {
|
struct PetCommand_Struct {
|
||||||
/*000*/ uint32 command;
|
/*000*/ uint32 command;
|
||||||
/*004*/ uint32 unknown;
|
/*004*/ uint32 target;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1226,7 +1179,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF
|
/*018*/ uint32 unknown18; // New to RoF
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ EQEmu::Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@ -1279,8 +1232,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 action;
|
/*02*/ uint8 speed;
|
||||||
/*03*/ uint8 value;
|
/*03*/ uint8 action;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1318,10 +1271,10 @@ struct CombatDamage_Struct
|
|||||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
||||||
/* 05 */ uint16 spellid;
|
/* 05 */ uint16 spellid;
|
||||||
/* 07 */ uint32 damage;
|
/* 07 */ uint32 damage;
|
||||||
/* 11 */ uint32 unknown11;
|
/* 11 */ float force;
|
||||||
/* 15 */ uint32 sequence; // see above notes in Action_Struct
|
/* 15 */ float meleepush_xy; // see above notes in Action_Struct
|
||||||
/* 19 */ uint32 unknown19;
|
/* 19 */ float meleepush_z;
|
||||||
/* 23 */
|
/* 23 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1517,17 +1470,38 @@ struct ExpUpdate_Struct
|
|||||||
enum ItemPacketType
|
enum ItemPacketType
|
||||||
{
|
{
|
||||||
ItemPacketViewLink = 0x00,
|
ItemPacketViewLink = 0x00,
|
||||||
|
ItemPacketMerchant = 0x64,
|
||||||
ItemPacketTradeView = 0x65,
|
ItemPacketTradeView = 0x65,
|
||||||
ItemPacketLoot = 0x66,
|
ItemPacketLoot = 0x66,
|
||||||
ItemPacketTrade = 0x67,
|
ItemPacketTrade = 0x67,
|
||||||
ItemPacketCharInventory = 0x69,
|
ItemPacketCharInventory = 0x69,
|
||||||
ItemPacketSummonItem = 0x6A,
|
ItemPacketLimbo = 0x6A,
|
||||||
ItemPacketTributeItem = 0x6C,
|
|
||||||
ItemPacketMerchant = 0x64,
|
|
||||||
ItemPacketWorldContainer = 0x6B,
|
ItemPacketWorldContainer = 0x6B,
|
||||||
ItemPacketCharmUpdate = 0x6E,
|
ItemPacketTributeItem = 0x6C,
|
||||||
|
ItemPacketGuildTribute = 0x6D,
|
||||||
|
ItemPacketCharmUpdate = 0x6E, // noted as incorrect
|
||||||
ItemPacketInvalid = 0xFF
|
ItemPacketInvalid = 0xFF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//enum ItemPacketType
|
||||||
|
//{
|
||||||
|
// ItemPacketMerchant = /*100*/ 0x64, // Titanium+
|
||||||
|
// ItemPacketTradeView = /*101*/ 0x65,
|
||||||
|
// ItemPacketLoot = /*102*/ 0x66,
|
||||||
|
// ItemPacketTrade = /*103*/ 0x67,
|
||||||
|
// ItemPacketCharInventory = /*105*/ 0x69, // 105 looks like raw item packet (no appearance update) thru shared bank..110, possibly possessions with appearance update
|
||||||
|
// ItemPacketLimbo = /*106*/ 0x6A,
|
||||||
|
// ItemPacketWorldContainer = /*107*/ 0x6B,
|
||||||
|
// ItemPacketTributeItem = /*108*/ 0x6C,
|
||||||
|
// ItemPacketGuildTribute = /*109*/ 0x6D, // missing from EQEmu
|
||||||
|
// ItemPacket10 = /*110*/ 0x6E,
|
||||||
|
// ItemPacket11 = /*111*/ 0x6F, // UF+ (equipment slots only) (RoF+ checks '(WORD*)slot + 4 != -1' [(WORD*)]slot + 2 would be bag index - if used) (guess) (appearance (over-level) items?)
|
||||||
|
// ItemPacket12 = /*112*/ 0x70, // RoF+ (causes stat update) (could be TrophyTribute and GuildTrophyTribute together - two case methodology - is it checking for GuildID?)
|
||||||
|
// ItemPacketMerchantRecovery = /*113*/ 0x71,
|
||||||
|
// ItemPacket14 = /*115*/ 0x73, (real estate/moving crate?)
|
||||||
|
// ItemPacket__ = /*xxx*/ 0xXX // switch 'default' - all clients
|
||||||
|
//};
|
||||||
|
|
||||||
struct ItemPacket_Struct
|
struct ItemPacket_Struct
|
||||||
{
|
{
|
||||||
/*00*/ ItemPacketType PacketType;
|
/*00*/ ItemPacketType PacketType;
|
||||||
@ -2098,7 +2072,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
EQEmu::ItemBase item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@ -2124,7 +2098,7 @@ struct Illusion_Struct { //size: 256 - SoF
|
|||||||
/*092*/ uint32 drakkin_heritage; //
|
/*092*/ uint32 drakkin_heritage; //
|
||||||
/*096*/ uint32 drakkin_tattoo; //
|
/*096*/ uint32 drakkin_tattoo; //
|
||||||
/*100*/ uint32 drakkin_details; //
|
/*100*/ uint32 drakkin_details; //
|
||||||
/*104*/ uint32 armor_tint[_MaterialCount]; //
|
/*104*/ EQEmu::TintProfile armor_tint; //
|
||||||
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
/*140*/ uint8 eyecolor1; // Field Not Identified in any Illusion Struct
|
||||||
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
/*141*/ uint8 eyecolor2; // Field Not Identified in any Illusion Struct
|
||||||
/*142*/ uint8 unknown138[114]; //
|
/*142*/ uint8 unknown138[114]; //
|
||||||
@ -2148,24 +2122,24 @@ struct Illusion_Struct_Old {
|
|||||||
// OP_Sound - Size: 68
|
// OP_Sound - Size: 68
|
||||||
struct QuestReward_Struct
|
struct QuestReward_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint32 from_mob; // ID of mob awarding the client
|
/*000*/ uint32 mob_id; // ID of mob awarding the client
|
||||||
/*004*/ uint32 unknown004;
|
/*004*/ uint32 target_id;
|
||||||
/*008*/ uint32 unknown008;
|
/*008*/ uint32 exp_reward;
|
||||||
/*012*/ uint32 unknown012;
|
/*012*/ uint32 faction;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ int32 faction_mod;
|
||||||
/*020*/ uint32 unknown020;
|
/*020*/ uint32 copper; // Gives copper to the client
|
||||||
/*024*/ uint32 silver; // Gives silver to the client
|
/*024*/ uint32 silver; // Gives silver to the client
|
||||||
/*028*/ uint32 gold; // Gives gold to the client
|
/*028*/ uint32 gold; // Gives gold to the client
|
||||||
/*032*/ uint32 platinum; // Gives platinum to the client
|
/*032*/ uint32 platinum; // Gives platinum to the client
|
||||||
/*036*/ uint32 unknown036;
|
/*036*/ uint32 item_id;
|
||||||
/*040*/ uint32 unknown040;
|
/*040*/ uint32 unknown040;
|
||||||
/*044*/ uint32 unknown044;
|
/*044*/ uint32 unknown044;
|
||||||
/*048*/ uint32 unknown048;
|
/*048*/ uint32 unknown048;
|
||||||
/*052*/ uint32 unknown052;
|
/*052*/ uint32 unknown052;
|
||||||
/*056*/ uint32 unknown056;
|
/*056*/ uint32 unknown056;
|
||||||
/*060*/ uint32 unknown060;
|
/*060*/ uint32 unknown060;
|
||||||
/*064*/ uint32 unknown064;
|
/*064*/ uint32 unknown064;
|
||||||
/*068*/
|
/*068*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Size: 8
|
// Size: 8
|
||||||
@ -2535,8 +2509,8 @@ struct BookRequest_Struct {
|
|||||||
*/
|
*/
|
||||||
struct Object_Struct {
|
struct Object_Struct {
|
||||||
/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list
|
/*00*/ uint32 linked_list_addr[2];// They are, get this, prev and next, ala linked list
|
||||||
/*08*/ uint16 unknown008; //
|
/*08*/ uint16 size; //
|
||||||
/*10*/ uint16 unknown010; //
|
/*10*/ uint16 solidtype; //
|
||||||
/*12*/ uint32 drop_id; // Unique object id for zone
|
/*12*/ uint32 drop_id; // Unique object id for zone
|
||||||
/*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in
|
/*16*/ uint16 zone_id; // Redudant, but: Zone the object appears in
|
||||||
/*18*/ uint16 zone_instance; //
|
/*18*/ uint16 zone_instance; //
|
||||||
@ -3394,27 +3368,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[_MaterialCount];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@ -3472,8 +3425,8 @@ struct SelectTributeReply_Struct {
|
|||||||
|
|
||||||
struct TributeInfo_Struct {
|
struct TributeInfo_Struct {
|
||||||
uint32 active; //0 == inactive, 1 == active
|
uint32 active; //0 == inactive, 1 == active
|
||||||
uint32 tributes[EmuConstants::TRIBUTE_SIZE]; //-1 == NONE
|
uint32 tributes[EQEmu::legacy::TRIBUTE_SIZE]; //-1 == NONE
|
||||||
uint32 tiers[EmuConstants::TRIBUTE_SIZE]; //all 00's
|
uint32 tiers[EQEmu::legacy::TRIBUTE_SIZE]; //all 00's
|
||||||
uint32 tribute_master_id;
|
uint32 tribute_master_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4030,7 +3983,7 @@ struct MarkNPC_Struct
|
|||||||
|
|
||||||
struct InspectBuffs_Struct {
|
struct InspectBuffs_Struct {
|
||||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||||
/*100*/ uint32 tics_remaining[BUFF_COUNT];
|
/*100*/ int32 tics_remaining[BUFF_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RaidGeneral_Struct {
|
struct RaidGeneral_Struct {
|
||||||
@ -4218,6 +4171,52 @@ struct UseAA_Struct {
|
|||||||
uint32 end;
|
uint32 end;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//new AA stuff
|
||||||
|
//reference only
|
||||||
|
struct AARankInfo_Struct
|
||||||
|
{
|
||||||
|
uint32 id;
|
||||||
|
int32 upper_hotkey_sid;
|
||||||
|
int32 lower_hotkey_sid;
|
||||||
|
int32 title_sid;
|
||||||
|
int32 desc_sid;
|
||||||
|
int32 level_req;
|
||||||
|
int32 cost;
|
||||||
|
uint32 seq;
|
||||||
|
uint32 current_level;
|
||||||
|
uint32 type;
|
||||||
|
int32 spell;
|
||||||
|
int32 spell_type;
|
||||||
|
int32 spell_refresh;
|
||||||
|
int32 classes;
|
||||||
|
int32 max_level;
|
||||||
|
int32 prev_id;
|
||||||
|
int32 next_id;
|
||||||
|
int32 total_cost;
|
||||||
|
int32 expansion;
|
||||||
|
int32 category;
|
||||||
|
uint32 charges;
|
||||||
|
uint8 grant_only;
|
||||||
|
uint32 total_effects;
|
||||||
|
uint32 total_prereqs;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AARankPrereq_Struct
|
||||||
|
{
|
||||||
|
int32 aa_id;
|
||||||
|
int32 points;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct AARankEffect_Struct
|
||||||
|
{
|
||||||
|
int32 effect_id;
|
||||||
|
int32 base1;
|
||||||
|
int32 base2;
|
||||||
|
int32 slot;
|
||||||
|
};
|
||||||
|
|
||||||
|
//old AA stuff
|
||||||
|
|
||||||
struct AA_Ability {
|
struct AA_Ability {
|
||||||
/*00*/ uint32 skill_id;
|
/*00*/ uint32 skill_id;
|
||||||
/*04*/ uint32 base1;
|
/*04*/ uint32 base1;
|
||||||
@ -4272,18 +4271,10 @@ struct SendAA_Struct {
|
|||||||
struct AA_Action {
|
struct AA_Action {
|
||||||
/*00*/ uint32 action;
|
/*00*/ uint32 action;
|
||||||
/*04*/ uint32 ability;
|
/*04*/ uint32 ability;
|
||||||
/*08*/ uint32 unknown08;
|
/*08*/ uint32 target_id;
|
||||||
/*12*/ uint32 exp_value;
|
/*12*/ uint32 exp_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct AA_Skills { //this should be removed and changed to AA_Array
|
|
||||||
/*00*/ uint32 aa_skill; // Total AAs Spent
|
|
||||||
/*04*/ uint32 aa_value;
|
|
||||||
/*08*/ uint32 unknown08;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AAExpUpdate_Struct {
|
struct AAExpUpdate_Struct {
|
||||||
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
||||||
/*04*/ uint32 aapoints_unspent;
|
/*04*/ uint32 aapoints_unspent;
|
||||||
@ -4301,12 +4292,12 @@ struct AltAdvStats_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerAA_Struct { // Is this still used?
|
struct PlayerAA_Struct { // Is this still used?
|
||||||
AA_Skills aa_list[MAX_PP_AA_ARRAY];
|
AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AATable_Struct {
|
struct AATable_Struct {
|
||||||
/*00*/ int32 aa_spent; // Total AAs Spent
|
/*00*/ int32 aa_spent; // Total AAs Spent
|
||||||
/*04*/ AA_Skills aa_list[MAX_PP_AA_ARRAY];
|
/*04*/ AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Weather_Struct {
|
struct Weather_Struct {
|
||||||
@ -4685,6 +4676,22 @@ struct GuildBankItemUpdate_Struct
|
|||||||
/*226*/ uint16 Unknown226;
|
/*226*/ uint16 Unknown226;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// newer clients (RoF+) send a list that contains 240 entries
|
||||||
|
// The packets don't actually use all 64 chars in the strings, but we'll just overallocate for these
|
||||||
|
struct GuildBankItemListEntry_Struct
|
||||||
|
{
|
||||||
|
uint8 vaild;
|
||||||
|
uint32 permissions;
|
||||||
|
char whofor[64];
|
||||||
|
char donator[64];
|
||||||
|
uint32 item_id;
|
||||||
|
uint32 item_icon;
|
||||||
|
uint32 quantity;
|
||||||
|
uint8 allow_merge; // 1 here for non-full stacks
|
||||||
|
uint8 usable;
|
||||||
|
char item_name[64];
|
||||||
|
};
|
||||||
|
|
||||||
struct GuildBankClear_Struct
|
struct GuildBankClear_Struct
|
||||||
{
|
{
|
||||||
/*00*/ uint32 Action;
|
/*00*/ uint32 Action;
|
||||||
@ -4731,7 +4738,7 @@ struct BuffIconEntry_Struct
|
|||||||
{
|
{
|
||||||
uint32 buff_slot;
|
uint32 buff_slot;
|
||||||
uint32 spell_id;
|
uint32 spell_id;
|
||||||
uint32 tics_remaining;
|
int32 tics_remaining;
|
||||||
uint32 num_hits;
|
uint32 num_hits;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4740,6 +4747,8 @@ struct BuffIcon_Struct
|
|||||||
uint32 entity_id;
|
uint32 entity_id;
|
||||||
uint8 all_buffs;
|
uint8 all_buffs;
|
||||||
uint16 count;
|
uint16 count;
|
||||||
|
uint8 type; // 0 = self buff window, 1 = self target window, 4 = group, 5 = PC, 7 = NPC
|
||||||
|
int32 tic_timer;
|
||||||
BuffIconEntry_Struct entries[0];
|
BuffIconEntry_Struct entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -5286,21 +5295,18 @@ struct ClientMarqueeMessage_Struct {
|
|||||||
|
|
||||||
typedef std::list<ServerLootItem_Struct*> ItemList;
|
typedef std::list<ServerLootItem_Struct*> ItemList;
|
||||||
|
|
||||||
struct TextLinkBody_Struct {
|
|
||||||
// Current server mask: EQClientRoF2
|
struct fling_struct {
|
||||||
uint8 unknown_1; /* %1X */
|
/* 00 */ uint32 collision; // 0 collision is off, anything else it's on
|
||||||
uint32 item_id; /* %05X */
|
/* 04 */ int32 travel_time; // ms -- UF we need to calc this, RoF+ -1 auto calcs
|
||||||
uint32 augment_1; /* %05X */
|
/* 08 */ uint8 unk3; // bool, set to 1 has something to do with z-axis or something weird things happen if the new Z is above or equal to yours
|
||||||
uint32 augment_2; /* %05X */
|
/* 09 */ uint8 disable_fall_damage; // 1 you take no fall damage, 0 you take fall damage
|
||||||
uint32 augment_3; /* %05X */
|
/* 10 */ uint8 padding[2];
|
||||||
uint32 augment_4; /* %05X */
|
/* 12 */ float speed_z;
|
||||||
uint32 augment_5; /* %05X */
|
/* 16 */ float new_y;
|
||||||
uint32 augment_6; /* %05X */
|
/* 20 */ float new_x;
|
||||||
uint8 is_evolving; /* %1X */
|
/* 24 */ float new_z;
|
||||||
uint32 evolve_group; /* %05X */
|
/* 28 */
|
||||||
uint8 evolve_level; /* %02X */
|
|
||||||
uint32 ornament_icon; /* %05X */
|
|
||||||
int hash; /* %08X */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Restore structure packing to default
|
// Restore structure packing to default
|
||||||
|
|||||||
@ -72,8 +72,10 @@ void EQStream::init(bool resetSession) {
|
|||||||
RateThreshold=RATEBASE/250;
|
RateThreshold=RATEBASE/250;
|
||||||
DecayRate=DECAYBASE/250;
|
DecayRate=DECAYBASE/250;
|
||||||
BytesWritten=0;
|
BytesWritten=0;
|
||||||
|
sent_packet_count = 0;
|
||||||
|
received_packet_count = 0;
|
||||||
SequencedBase = 0;
|
SequencedBase = 0;
|
||||||
NextSequencedSend = 0;
|
AverageDelta = 500;
|
||||||
|
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||||
retransmittimer = Timer::GetCurrentTime();
|
retransmittimer = Timer::GetCurrentTime();
|
||||||
@ -84,10 +86,6 @@ void EQStream::init(bool resetSession) {
|
|||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "init Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "init Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "init Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EQRawApplicationPacket *EQStream::MakeApplicationPacket(EQProtocolPacket *p)
|
EQRawApplicationPacket *EQStream::MakeApplicationPacket(EQProtocolPacket *p)
|
||||||
@ -290,10 +288,8 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_KeepAlive: {
|
case OP_KeepAlive: {
|
||||||
#ifndef COLLECTOR
|
|
||||||
NonSequencedPush(new EQProtocolPacket(p->opcode,p->pBuffer,p->size));
|
NonSequencedPush(new EQProtocolPacket(p->opcode,p->pBuffer,p->size));
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received and queued reply to keep alive" __L);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received and queued reply to keep alive" __L);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_Ack: {
|
case OP_Ack: {
|
||||||
@ -302,14 +298,12 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_Ack that was of malformed size" __L);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_Ack that was of malformed size" __L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef COLLECTOR
|
|
||||||
uint16 seq=ntohs(*(uint16 *)(p->pBuffer));
|
uint16 seq=ntohs(*(uint16 *)(p->pBuffer));
|
||||||
AckPackets(seq);
|
AckPackets(seq);
|
||||||
|
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||||
retransmittimer = Timer::GetCurrentTime();
|
retransmittimer = Timer::GetCurrentTime();
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_SessionRequest: {
|
case OP_SessionRequest: {
|
||||||
@ -318,7 +312,6 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest that was of malformed size" __L);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest that was of malformed size" __L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef COLLECTOR
|
|
||||||
if (GetState()==ESTABLISHED) {
|
if (GetState()==ESTABLISHED) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest in ESTABLISHED state (%d) streamactive (%i) attempt (%i)" __L, GetState(),streamactive,sessionAttempts);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest in ESTABLISHED state (%d) streamactive (%i) attempt (%i)" __L, GetState(),streamactive,sessionAttempts);
|
||||||
|
|
||||||
@ -331,7 +324,6 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
sessionAttempts++;
|
sessionAttempts++;
|
||||||
// we set established below, so statistics will not be reset for session attempts/stream active.
|
// we set established below, so statistics will not be reset for session attempts/stream active.
|
||||||
init(GetState()!=ESTABLISHED);
|
init(GetState()!=ESTABLISHED);
|
||||||
@ -341,10 +333,8 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
SetMaxLen(ntohl(Request->MaxLength));
|
SetMaxLen(ntohl(Request->MaxLength));
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest: session %lu, maxlen %d" __L, (unsigned long)Session, MaxLen);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionRequest: session %lu, maxlen %d" __L, (unsigned long)Session, MaxLen);
|
||||||
SetState(ESTABLISHED);
|
SetState(ESTABLISHED);
|
||||||
#ifndef COLLECTOR
|
|
||||||
Key=0x11223344;
|
Key=0x11223344;
|
||||||
SendSessionResponse();
|
SendSessionResponse();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_SessionResponse: {
|
case OP_SessionResponse: {
|
||||||
@ -410,7 +400,6 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck that was of malformed size" __L);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck that was of malformed size" __L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef COLLECTOR
|
|
||||||
uint16 seq=ntohs(*(uint16 *)(p->pBuffer));
|
uint16 seq=ntohs(*(uint16 *)(p->pBuffer));
|
||||||
MOutboundQueue.lock();
|
MOutboundQueue.lock();
|
||||||
|
|
||||||
@ -418,36 +407,30 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-OOA Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-OOA Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-OOA Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
//if the packet they got out of order is between our last acked packet and the last sent packet, then its valid.
|
//if the packet they got out of order is between our last acked packet and the last sent packet, then its valid.
|
||||||
if (CompareSequence(SequencedBase,seq) != SeqPast && CompareSequence(NextOutSeq,seq) == SeqPast) {
|
if (CompareSequence(SequencedBase,seq) != SeqPast && CompareSequence(NextOutSeq,seq) == SeqPast) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck for sequence %d, starting retransmit at the start of our unacked buffer (seq %d, was %d)." __L,
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck for sequence %d, starting retransmit at the start of our unacked buffer (seq %d, was %d)." __L,
|
||||||
seq, SequencedBase, SequencedBase+NextSequencedSend);
|
seq, SequencedBase, SequencedBase+SequencedQueue.size());
|
||||||
|
|
||||||
bool retransmit_acked_packets = false;
|
uint16 sqsize = SequencedQueue.size();
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
uint16 index = seq - SequencedBase;
|
||||||
retransmit_acked_packets = RETRANSMIT_ACKED_PACKETS;
|
Log.Out(Logs::Detail, Logs::Netcode, _L "OP_OutOfOrderAck marking packet acked in queue (queue index = %d, queue size = %d)." __L, index, sqsize);
|
||||||
}
|
if (index < sqsize) {
|
||||||
|
SequencedQueue[index]->acked = true;
|
||||||
if(!retransmit_acked_packets) {
|
// flag packets for a resend
|
||||||
uint16 sqsize = SequencedQueue.size();
|
uint16 count = 0;
|
||||||
uint16 index = seq - SequencedBase;
|
uint32 timeout = AverageDelta * 2 + 100;
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "OP_OutOfOrderAck marking packet acked in queue (queue index = %d, queue size = %d)." __L, index, sqsize);
|
for (auto sitr = SequencedQueue.begin(); sitr != SequencedQueue.end() && count < index; ++sitr, ++count) {
|
||||||
if (index < sqsize) {
|
if (!(*sitr)->acked && (*sitr)->sent_time > 0 && (((*sitr)->sent_time + timeout) < Timer::GetCurrentTime())) {
|
||||||
std::deque<EQProtocolPacket *>::iterator sitr;
|
(*sitr)->sent_time = 0;
|
||||||
sitr = SequencedQueue.begin();
|
Log.Out(Logs::Detail, Logs::Netcode, _L "OP_OutOfOrderAck Flagging packet %d for retransmission" __L, SequencedBase + count);
|
||||||
sitr += index;
|
}
|
||||||
(*sitr)->acked = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(RETRANSMIT_TIMEOUT_MULT) {
|
if(RETRANSMIT_TIMEOUT_MULT) {
|
||||||
retransmittimer = Timer::GetCurrentTime();
|
retransmittimer = Timer::GetCurrentTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
NextSequencedSend = 0;
|
|
||||||
} else {
|
} else {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck for out-of-window %d. Window (%d->%d)." __L, seq, SequencedBase, NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_OutOfOrderAck for out-of-window %d. Window (%d->%d)." __L, seq, SequencedBase, NextOutSeq);
|
||||||
}
|
}
|
||||||
@ -456,46 +439,49 @@ void EQStream::ProcessPacket(EQProtocolPacket *p)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-OOA Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-OOA Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-OOA Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
MOutboundQueue.unlock();
|
MOutboundQueue.unlock();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_SessionStatRequest: {
|
case OP_SessionStatRequest: {
|
||||||
if(p->Size() < sizeof(SessionStats))
|
if(p->Size() < sizeof(ClientSessionStats))
|
||||||
{
|
{
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionStatRequest that was of malformed size" __L);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received OP_SessionStatRequest that was of malformed size" __L);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#ifndef COLLECTOR
|
ClientSessionStats *ClientStats=(ClientSessionStats *)p->pBuffer;
|
||||||
SessionStats *Stats=(SessionStats *)p->pBuffer;
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Received Stats: %lu packets received, %lu packets sent, Deltas: local %lu, (%lu <- %lu -> %lu) remote %lu" __L,
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Received Stats: %lu packets received, %lu packets sent, Deltas: local %lu, (%lu <- %lu -> %lu) remote %lu" __L,
|
||||||
(unsigned long)ntohl(Stats->packets_received), (unsigned long)ntohl(Stats->packets_sent), (unsigned long)ntohl(Stats->last_local_delta),
|
(unsigned long)ntohl(ClientStats->packets_received), (unsigned long)ntohl(ClientStats->packets_sent), (unsigned long)ntohl(ClientStats->last_local_delta),
|
||||||
(unsigned long)ntohl(Stats->low_delta), (unsigned long)ntohl(Stats->average_delta),
|
(unsigned long)ntohl(ClientStats->low_delta), (unsigned long)ntohl(ClientStats->average_delta),
|
||||||
(unsigned long)ntohl(Stats->high_delta), (unsigned long)ntohl(Stats->last_remote_delta));
|
(unsigned long)ntohl(ClientStats->high_delta), (unsigned long)ntohl(ClientStats->last_remote_delta));
|
||||||
uint64 x=Stats->packets_received;
|
|
||||||
Stats->packets_received=Stats->packets_sent;
|
AdjustRates(ntohl(ClientStats->average_delta));
|
||||||
Stats->packets_sent=x;
|
|
||||||
NonSequencedPush(new EQProtocolPacket(OP_SessionStatResponse,p->pBuffer,p->size));
|
|
||||||
AdjustRates(ntohl(Stats->average_delta));
|
|
||||||
|
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||||
if(RETRANSMIT_TIMEOUT_MULT && ntohl(Stats->average_delta)) {
|
if (RETRANSMIT_TIMEOUT_MULT && ntohl(ClientStats->average_delta)) {
|
||||||
//recalculate retransmittimeout using the larger of the last rtt or average rtt, which is multiplied by the rule value
|
//recalculate retransmittimeout using the larger of the last rtt or average rtt, which is multiplied by the rule value
|
||||||
if((ntohl(Stats->last_local_delta) + ntohl(Stats->last_remote_delta)) > (ntohl(Stats->average_delta) * 2)) {
|
if ((ntohl(ClientStats->last_local_delta) + ntohl(ClientStats->last_remote_delta)) > (ntohl(ClientStats->average_delta) * 2)) {
|
||||||
retransmittimeout = (ntohl(Stats->last_local_delta) + ntohl(Stats->last_remote_delta))
|
retransmittimeout = (ntohl(ClientStats->last_local_delta) + ntohl(ClientStats->last_remote_delta))
|
||||||
* RETRANSMIT_TIMEOUT_MULT;
|
* RETRANSMIT_TIMEOUT_MULT;
|
||||||
} else {
|
} else {
|
||||||
retransmittimeout = ntohl(Stats->average_delta) * 2 * RETRANSMIT_TIMEOUT_MULT;
|
retransmittimeout = ntohl(ClientStats->average_delta) * 2 * RETRANSMIT_TIMEOUT_MULT;
|
||||||
}
|
}
|
||||||
|
retransmittimeout += 300;
|
||||||
if(retransmittimeout > RETRANSMIT_TIMEOUT_MAX)
|
if(retransmittimeout > RETRANSMIT_TIMEOUT_MAX)
|
||||||
retransmittimeout = RETRANSMIT_TIMEOUT_MAX;
|
retransmittimeout = RETRANSMIT_TIMEOUT_MAX;
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Retransmit timeout recalculated to %dms" __L, retransmittimeout);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Retransmit timeout recalculated to %dms" __L, retransmittimeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
ServerSessionStats *ServerStats = (ServerSessionStats *)p->pBuffer;
|
||||||
|
|
||||||
|
//ServerStats->RequestID = ClientStats->RequestID; // no change
|
||||||
|
ServerStats->ServerTime = htonl(Timer::GetCurrentTime());
|
||||||
|
ServerStats->packets_sent_echo = ClientStats->packets_sent; // still in htonll format
|
||||||
|
ServerStats->packets_received_echo = ClientStats->packets_received; // still in htonll format
|
||||||
|
ServerStats->packets_sent = htonll(GetPacketsSent());
|
||||||
|
ServerStats->packets_received = htonll(GetPacketsReceived());
|
||||||
|
|
||||||
|
NonSequencedPush(new EQProtocolPacket(OP_SessionStatResponse, p->pBuffer, p->size));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case OP_SessionStatResponse: {
|
case OP_SessionStatResponse: {
|
||||||
@ -573,16 +559,18 @@ void EQStream::SendPacket(uint16 opcode, EQApplicationPacket *p)
|
|||||||
|
|
||||||
// Convert the EQApplicationPacket to 1 or more EQProtocolPackets
|
// Convert the EQApplicationPacket to 1 or more EQProtocolPackets
|
||||||
if (p->size>(MaxLen-8)) { // proto-op(2), seq(2), app-op(2) ... data ... crc(2)
|
if (p->size>(MaxLen-8)) { // proto-op(2), seq(2), app-op(2) ... data ... crc(2)
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Making oversized packet, len %d" __L, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Making oversized packet, len %d" __L, p->Size());
|
||||||
|
|
||||||
unsigned char *tmpbuff=new unsigned char[p->size+3];
|
auto tmpbuff = new unsigned char[p->size + 3];
|
||||||
length=p->serialize(opcode, tmpbuff);
|
length=p->serialize(opcode, tmpbuff);
|
||||||
|
if (length != p->Size())
|
||||||
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Packet adjustment, len %d to %d" __L, p->Size(), length);
|
||||||
|
|
||||||
EQProtocolPacket *out=new EQProtocolPacket(OP_Fragment,nullptr,MaxLen-4);
|
auto out = new EQProtocolPacket(OP_Fragment, nullptr, MaxLen - 4);
|
||||||
*(uint32 *)(out->pBuffer+2)=htonl(p->Size());
|
*(uint32 *)(out->pBuffer+2)=htonl(length);
|
||||||
used=MaxLen-10;
|
used=MaxLen-10;
|
||||||
memcpy(out->pBuffer+6,tmpbuff,used);
|
memcpy(out->pBuffer+6,tmpbuff,used);
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "First fragment: used %d/%d. Put size %d in the packet" __L, used, p->size, p->Size());
|
Log.Out(Logs::Detail, Logs::Netcode, _L "First fragment: used %d/%d. Payload size %d in the packet" __L, used, length, p->size);
|
||||||
SequencedPush(out);
|
SequencedPush(out);
|
||||||
|
|
||||||
|
|
||||||
@ -593,16 +581,16 @@ void EQStream::SendPacket(uint16 opcode, EQApplicationPacket *p)
|
|||||||
out->size=chunksize+2;
|
out->size=chunksize+2;
|
||||||
SequencedPush(out);
|
SequencedPush(out);
|
||||||
used+=chunksize;
|
used+=chunksize;
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Subsequent fragment: len %d, used %d/%d." __L, chunksize, used, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Subsequent fragment: len %d, used %d/%d." __L, chunksize, used, length);
|
||||||
}
|
}
|
||||||
delete p;
|
delete p;
|
||||||
delete[] tmpbuff;
|
delete[] tmpbuff;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
unsigned char *tmpbuff=new unsigned char[p->Size()+3];
|
auto tmpbuff = new unsigned char[p->Size() + 3];
|
||||||
length=p->serialize(opcode, tmpbuff+2) + 2;
|
length=p->serialize(opcode, tmpbuff+2) + 2;
|
||||||
|
|
||||||
EQProtocolPacket *out=new EQProtocolPacket(OP_Packet,tmpbuff,length);
|
auto out = new EQProtocolPacket(OP_Packet, tmpbuff, length);
|
||||||
|
|
||||||
delete[] tmpbuff;
|
delete[] tmpbuff;
|
||||||
SequencedPush(out);
|
SequencedPush(out);
|
||||||
@ -612,42 +600,32 @@ void EQStream::SendPacket(uint16 opcode, EQApplicationPacket *p)
|
|||||||
|
|
||||||
void EQStream::SequencedPush(EQProtocolPacket *p)
|
void EQStream::SequencedPush(EQProtocolPacket *p)
|
||||||
{
|
{
|
||||||
#ifdef COLLECTOR
|
|
||||||
delete p;
|
|
||||||
#else
|
|
||||||
MOutboundQueue.lock();
|
MOutboundQueue.lock();
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
if (uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Push Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Push Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L,
|
||||||
}
|
SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
}
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Push Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pushing sequenced packet %d of length %d. Base Seq is %d." __L, NextOutSeq, p->size, SequencedBase);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Pushing sequenced packet %d of length %d. Base Seq is %d." __L,
|
||||||
*(uint16 *)(p->pBuffer)=htons(NextOutSeq);
|
NextOutSeq, p->size, SequencedBase);
|
||||||
|
*(uint16 *)(p->pBuffer) = htons(NextOutSeq);
|
||||||
SequencedQueue.push_back(p);
|
SequencedQueue.push_back(p);
|
||||||
NextOutSeq++;
|
NextOutSeq++;
|
||||||
|
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
if (uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Push Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Push Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L,
|
||||||
}
|
SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
}
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Push Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
MOutboundQueue.unlock();
|
MOutboundQueue.unlock();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQStream::NonSequencedPush(EQProtocolPacket *p)
|
void EQStream::NonSequencedPush(EQProtocolPacket *p)
|
||||||
{
|
{
|
||||||
#ifdef COLLECTOR
|
|
||||||
delete p;
|
|
||||||
#else
|
|
||||||
MOutboundQueue.lock();
|
MOutboundQueue.lock();
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pushing non-sequenced packet of length %d" __L, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Pushing non-sequenced packet of length %d" __L, p->size);
|
||||||
NonSequencedQueue.push(p);
|
NonSequencedQueue.push(p);
|
||||||
MOutboundQueue.unlock();
|
MOutboundQueue.unlock();
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQStream::SendAck(uint16 seq)
|
void EQStream::SendAck(uint16 seq)
|
||||||
@ -691,21 +669,15 @@ void EQStream::Write(int eq_fd)
|
|||||||
// Place to hold the base packet t combine into
|
// Place to hold the base packet t combine into
|
||||||
EQProtocolPacket *p=nullptr;
|
EQProtocolPacket *p=nullptr;
|
||||||
|
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
|
||||||
// if we have a timeout defined and we have not received an ack recently enough, retransmit from beginning of queue
|
|
||||||
if (RETRANSMIT_TIMEOUT_MULT && !SequencedQueue.empty() && NextSequencedSend &&
|
|
||||||
(GetState()==ESTABLISHED) && ((retransmittimer+retransmittimeout) < Timer::GetCurrentTime())) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Timeout since last ack received, starting retransmit at the start of our unacked "
|
|
||||||
"buffer (seq %d, was %d)." __L, SequencedBase, SequencedBase+NextSequencedSend);
|
|
||||||
NextSequencedSend = 0;
|
|
||||||
retransmittimer = Timer::GetCurrentTime(); // don't want to endlessly retransmit the first packet
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the next sequenced packet to send from the "queue"
|
// Find the next sequenced packet to send from the "queue"
|
||||||
sitr = SequencedQueue.begin();
|
sitr = SequencedQueue.begin();
|
||||||
if (sitr!=SequencedQueue.end())
|
|
||||||
sitr += NextSequencedSend;
|
uint16 count = 0;
|
||||||
|
// get to start of packets
|
||||||
|
while (sitr != SequencedQueue.end() && (*sitr)->sent_time > 0) {
|
||||||
|
++sitr;
|
||||||
|
++count;
|
||||||
|
}
|
||||||
|
|
||||||
// Loop until both are empty or MaxSends is reached
|
// Loop until both are empty or MaxSends is reached
|
||||||
while(!SeqEmpty || !NonSeqEmpty) {
|
while(!SeqEmpty || !NonSeqEmpty) {
|
||||||
@ -719,7 +691,7 @@ void EQStream::Write(int eq_fd)
|
|||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with non-seq packet of len %d" __L, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with non-seq packet of len %d" __L, p->size);
|
||||||
NonSequencedQueue.pop();
|
NonSequencedQueue.pop();
|
||||||
} else if (!p->combine(NonSequencedQueue.front())) {
|
} else if (!p->combine(NonSequencedQueue.front())) {
|
||||||
// Tryint to combine this packet with the base didn't work (too big maybe)
|
// Trying to combine this packet with the base didn't work (too big maybe)
|
||||||
// So just send the base packet (we'll try this packet again later)
|
// So just send the base packet (we'll try this packet again later)
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined packet full at len %d, next non-seq packet is len %d" __L, p->size, (NonSequencedQueue.front())->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined packet full at len %d, next non-seq packet is len %d" __L, p->size, (NonSequencedQueue.front())->size);
|
||||||
ReadyToSend.push(p);
|
ReadyToSend.push(p);
|
||||||
@ -742,15 +714,8 @@ void EQStream::Write(int eq_fd)
|
|||||||
NonSeqEmpty=true;
|
NonSeqEmpty=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sitr!=SequencedQueue.end()) {
|
if (sitr != SequencedQueue.end()) {
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
uint16 seq_send = SequencedBase + count; //just for logging...
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Send Seq NSS=%d Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, NextSequencedSend, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Send Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
uint16 seq_send = SequencedBase + NextSequencedSend; //just for logging...
|
|
||||||
|
|
||||||
if(SequencedQueue.empty()) {
|
if(SequencedQueue.empty()) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Tried to write a packet with an empty queue (%d is past next out %d)" __L, seq_send, NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Tried to write a packet with an empty queue (%d is past next out %d)" __L, seq_send, NextOutSeq);
|
||||||
@ -759,26 +724,32 @@ void EQStream::Write(int eq_fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||||
if (!RETRANSMIT_ACKED_PACKETS && (*sitr)->acked) {
|
if ((*sitr)->acked || (*sitr)->sent_time != 0) {
|
||||||
|
++sitr;
|
||||||
|
++count;
|
||||||
|
if (p) {
|
||||||
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Final combined packet not full, len %d" __L, p->size);
|
||||||
|
ReadyToSend.push(p);
|
||||||
|
BytesWritten += p->size;
|
||||||
|
p = nullptr;
|
||||||
|
}
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Not retransmitting seq packet %d because already marked as acked" __L, seq_send);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Not retransmitting seq packet %d because already marked as acked" __L, seq_send);
|
||||||
sitr++;
|
|
||||||
NextSequencedSend++;
|
|
||||||
} else if (!p) {
|
} else if (!p) {
|
||||||
// If we don't have a packet to try to combine into, use this one as the base
|
// If we don't have a packet to try to combine into, use this one as the base
|
||||||
// Copy it first as it will still live until it is acked
|
// Copy it first as it will still live until it is acked
|
||||||
p=(*sitr)->Copy();
|
p=(*sitr)->Copy();
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with seq packet %d of len %d" __L, seq_send, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with seq packet %d of len %d" __L, seq_send, p->size);
|
||||||
|
(*sitr)->sent_time = Timer::GetCurrentTime();
|
||||||
++sitr;
|
++sitr;
|
||||||
NextSequencedSend++;
|
++count;
|
||||||
} else if (!p->combine(*sitr)) {
|
} else if (!p->combine(*sitr)) {
|
||||||
// Trying to combine this packet with the base didn't work (too big maybe)
|
// Trying to combine this packet with the base didn't work (too big maybe)
|
||||||
// So just send the base packet (we'll try this packet again later)
|
// So just send the base packet (we'll try this packet again later)
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined packet full at len %d, next seq packet %d is len %d" __L, p->size, seq_send, (*sitr)->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined packet full at len %d, next seq packet %d is len %d" __L, p->size, seq_send + 1, (*sitr)->size);
|
||||||
ReadyToSend.push(p);
|
ReadyToSend.push(p);
|
||||||
BytesWritten+=p->size;
|
BytesWritten+=p->size;
|
||||||
p=nullptr;
|
p=nullptr;
|
||||||
|
if ((*sitr)->opcode != OP_Fragment && BytesWritten > threshold) {
|
||||||
if (BytesWritten > threshold) {
|
|
||||||
// Sent enough this round, lets stop to be fair
|
// Sent enough this round, lets stop to be fair
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Exceeded write threshold in seq (%d > %d)" __L, BytesWritten, threshold);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Exceeded write threshold in seq (%d > %d)" __L, BytesWritten, threshold);
|
||||||
break;
|
break;
|
||||||
@ -786,17 +757,28 @@ void EQStream::Write(int eq_fd)
|
|||||||
} else {
|
} else {
|
||||||
// Combine worked
|
// Combine worked
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined seq packet %d of len %d, yeilding %d combined." __L, seq_send, (*sitr)->size, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined seq packet %d of len %d, yeilding %d combined." __L, seq_send, (*sitr)->size, p->size);
|
||||||
|
(*sitr)->sent_time = Timer::GetCurrentTime();
|
||||||
++sitr;
|
++sitr;
|
||||||
NextSequencedSend++;
|
++count;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!p) {
|
if ((*sitr)->sent_time != 0) {
|
||||||
|
++sitr;
|
||||||
|
++count;
|
||||||
|
if (p) {
|
||||||
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Final combined packet not full, len %d" __L, p->size);
|
||||||
|
ReadyToSend.push(p);
|
||||||
|
BytesWritten += p->size;
|
||||||
|
p = nullptr;
|
||||||
|
}
|
||||||
|
} else if (!p) {
|
||||||
// If we don't have a packet to try to combine into, use this one as the base
|
// If we don't have a packet to try to combine into, use this one as the base
|
||||||
// Copy it first as it will still live until it is acked
|
// Copy it first as it will still live until it is acked
|
||||||
p=(*sitr)->Copy();
|
p=(*sitr)->Copy();
|
||||||
|
(*sitr)->sent_time = Timer::GetCurrentTime();
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with seq packet %d of len %d" __L, seq_send, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Starting combined packet with seq packet %d of len %d" __L, seq_send, p->size);
|
||||||
++sitr;
|
++sitr;
|
||||||
NextSequencedSend++;
|
++count;
|
||||||
} else if (!p->combine(*sitr)) {
|
} else if (!p->combine(*sitr)) {
|
||||||
// Trying to combine this packet with the base didn't work (too big maybe)
|
// Trying to combine this packet with the base didn't work (too big maybe)
|
||||||
// So just send the base packet (we'll try this packet again later)
|
// So just send the base packet (we'll try this packet again later)
|
||||||
@ -812,18 +794,16 @@ void EQStream::Write(int eq_fd)
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Combine worked
|
// Combine worked
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined seq packet %d of len %d, yeilding %d combined." __L, seq_send, (*sitr)->size, p->size);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Combined seq packet %d of len %d, yielding %d combined." __L, seq_send, (*sitr)->size, p->size);
|
||||||
|
(*sitr)->sent_time = Timer::GetCurrentTime();
|
||||||
++sitr;
|
++sitr;
|
||||||
NextSequencedSend++;
|
++count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post send Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Post send Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
}
|
}
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post send Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
// No more sequenced packets
|
// No more sequenced packets
|
||||||
SeqEmpty=true;
|
SeqEmpty=true;
|
||||||
@ -882,9 +862,11 @@ sockaddr_in address;
|
|||||||
length=p->serialize(buffer);
|
length=p->serialize(buffer);
|
||||||
if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
|
if (p->opcode!=OP_SessionRequest && p->opcode!=OP_SessionResponse) {
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
|
BytesWritten -= p->size;
|
||||||
uint32 newlen=EQProtocolPacket::Compress(buffer,length, _tempBuffer, 2048);
|
uint32 newlen=EQProtocolPacket::Compress(buffer,length, _tempBuffer, 2048);
|
||||||
memcpy(buffer,_tempBuffer,newlen);
|
memcpy(buffer,_tempBuffer,newlen);
|
||||||
length=newlen;
|
length=newlen;
|
||||||
|
BytesWritten += newlen;
|
||||||
}
|
}
|
||||||
if (encoded) {
|
if (encoded) {
|
||||||
EQProtocolPacket::ChatEncode(buffer,length,Key);
|
EQProtocolPacket::ChatEncode(buffer,length,Key);
|
||||||
@ -900,7 +882,7 @@ sockaddr_in address;
|
|||||||
|
|
||||||
void EQStream::SendSessionResponse()
|
void EQStream::SendSessionResponse()
|
||||||
{
|
{
|
||||||
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionResponse,nullptr,sizeof(SessionResponse));
|
auto out = new EQProtocolPacket(OP_SessionResponse, nullptr, sizeof(SessionResponse));
|
||||||
SessionResponse *Response=(SessionResponse *)out->pBuffer;
|
SessionResponse *Response=(SessionResponse *)out->pBuffer;
|
||||||
Response->Session=htonl(Session);
|
Response->Session=htonl(Session);
|
||||||
Response->MaxLength=htonl(MaxLen);
|
Response->MaxLength=htonl(MaxLen);
|
||||||
@ -922,7 +904,7 @@ EQProtocolPacket *out=new EQProtocolPacket(OP_SessionResponse,nullptr,sizeof(Ses
|
|||||||
|
|
||||||
void EQStream::SendSessionRequest()
|
void EQStream::SendSessionRequest()
|
||||||
{
|
{
|
||||||
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionRequest,nullptr,sizeof(SessionRequest));
|
auto out = new EQProtocolPacket(OP_SessionRequest, nullptr, sizeof(SessionRequest));
|
||||||
SessionRequest *Request=(SessionRequest *)out->pBuffer;
|
SessionRequest *Request=(SessionRequest *)out->pBuffer;
|
||||||
memset(Request,0,sizeof(SessionRequest));
|
memset(Request,0,sizeof(SessionRequest));
|
||||||
Request->Session=htonl(time(nullptr));
|
Request->Session=htonl(time(nullptr));
|
||||||
@ -938,7 +920,7 @@ void EQStream::_SendDisconnect()
|
|||||||
if(GetState() == CLOSED)
|
if(GetState() == CLOSED)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
EQProtocolPacket *out=new EQProtocolPacket(OP_SessionDisconnect,nullptr,sizeof(uint32));
|
auto out = new EQProtocolPacket(OP_SessionDisconnect, nullptr, sizeof(uint32));
|
||||||
*(uint32 *)out->pBuffer=htonl(Session);
|
*(uint32 *)out->pBuffer=htonl(Session);
|
||||||
NonSequencedPush(out);
|
NonSequencedPush(out);
|
||||||
|
|
||||||
@ -957,8 +939,8 @@ EQApplicationPacket *EQStream::PopPacket()
|
|||||||
EQRawApplicationPacket *p=nullptr;
|
EQRawApplicationPacket *p=nullptr;
|
||||||
|
|
||||||
MInboundQueue.lock();
|
MInboundQueue.lock();
|
||||||
if (InboundQueue.size()) {
|
if (!InboundQueue.empty()) {
|
||||||
std::vector<EQRawApplicationPacket *>::iterator itr=InboundQueue.begin();
|
auto itr = InboundQueue.begin();
|
||||||
p=*itr;
|
p=*itr;
|
||||||
InboundQueue.erase(itr);
|
InboundQueue.erase(itr);
|
||||||
}
|
}
|
||||||
@ -982,8 +964,8 @@ EQRawApplicationPacket *EQStream::PopRawPacket()
|
|||||||
EQRawApplicationPacket *p=nullptr;
|
EQRawApplicationPacket *p=nullptr;
|
||||||
|
|
||||||
MInboundQueue.lock();
|
MInboundQueue.lock();
|
||||||
if (InboundQueue.size()) {
|
if (!InboundQueue.empty()) {
|
||||||
std::vector<EQRawApplicationPacket *>::iterator itr=InboundQueue.begin();
|
auto itr = InboundQueue.begin();
|
||||||
p=*itr;
|
p=*itr;
|
||||||
InboundQueue.erase(itr);
|
InboundQueue.erase(itr);
|
||||||
}
|
}
|
||||||
@ -1009,8 +991,8 @@ EQRawApplicationPacket *EQStream::PeekPacket()
|
|||||||
EQRawApplicationPacket *p=nullptr;
|
EQRawApplicationPacket *p=nullptr;
|
||||||
|
|
||||||
MInboundQueue.lock();
|
MInboundQueue.lock();
|
||||||
if (InboundQueue.size()) {
|
if (!InboundQueue.empty()) {
|
||||||
std::vector<EQRawApplicationPacket *>::iterator itr=InboundQueue.begin();
|
auto itr = InboundQueue.begin();
|
||||||
p=*itr;
|
p=*itr;
|
||||||
}
|
}
|
||||||
MInboundQueue.unlock();
|
MInboundQueue.unlock();
|
||||||
@ -1101,8 +1083,8 @@ EQProtocolPacket *p=nullptr;
|
|||||||
|
|
||||||
void EQStream::Process(const unsigned char *buffer, const uint32 length)
|
void EQStream::Process(const unsigned char *buffer, const uint32 length)
|
||||||
{
|
{
|
||||||
static unsigned char newbuffer[2048];
|
static unsigned char newbuffer[2048];
|
||||||
uint32 newlength=0;
|
uint32 newlength=0;
|
||||||
if (EQProtocolPacket::ValidateCRC(buffer,length,Key)) {
|
if (EQProtocolPacket::ValidateCRC(buffer,length,Key)) {
|
||||||
if (compressed) {
|
if (compressed) {
|
||||||
newlength=EQProtocolPacket::Decompress(buffer,length,newbuffer,2048);
|
newlength=EQProtocolPacket::Decompress(buffer,length,newbuffer,2048);
|
||||||
@ -1146,13 +1128,6 @@ void EQStream::AckPackets(uint16 seq)
|
|||||||
std::deque<EQProtocolPacket *>::iterator itr, tmp;
|
std::deque<EQProtocolPacket *>::iterator itr, tmp;
|
||||||
|
|
||||||
MOutboundQueue.lock();
|
MOutboundQueue.lock();
|
||||||
//do a bit of sanity checking.
|
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Ack Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
|
||||||
}
|
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Pre-Ack Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
SeqOrder ord = CompareSequence(SequencedBase, seq);
|
SeqOrder ord = CompareSequence(SequencedBase, seq);
|
||||||
if(ord == SeqInOrder) {
|
if(ord == SeqInOrder) {
|
||||||
@ -1168,28 +1143,21 @@ if(NextSequencedSend > SequencedQueue.size()) {
|
|||||||
//this is a good ack, we get to ack some blocks.
|
//this is a good ack, we get to ack some blocks.
|
||||||
seq++; //we stop at the block right after their ack, counting on the wrap of both numbers.
|
seq++; //we stop at the block right after their ack, counting on the wrap of both numbers.
|
||||||
while(SequencedBase != seq) {
|
while(SequencedBase != seq) {
|
||||||
if(SequencedQueue.empty()) {
|
if(SequencedQueue.empty()) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "OUT OF PACKETS acked packet with sequence %lu. Next send is %d before this." __L, (unsigned long)SequencedBase, NextSequencedSend);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "OUT OF PACKETS acked packet with sequence %lu. Next send is %d before this." __L, (unsigned long)SequencedBase, SequencedQueue.size());
|
||||||
SequencedBase = NextOutSeq;
|
SequencedBase = NextOutSeq;
|
||||||
NextSequencedSend = 0;
|
break;
|
||||||
break;
|
}
|
||||||
}
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Removing acked packet with sequence %lu." __L, (unsigned long)SequencedBase);
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Removing acked packet with sequence %lu. Next send is %d before this." __L, (unsigned long)SequencedBase, NextSequencedSend);
|
|
||||||
//clean out the acked packet
|
//clean out the acked packet
|
||||||
delete SequencedQueue.front();
|
delete SequencedQueue.front();
|
||||||
SequencedQueue.pop_front();
|
SequencedQueue.pop_front();
|
||||||
//adjust our "next" pointer
|
|
||||||
if(NextSequencedSend > 0)
|
|
||||||
NextSequencedSend--;
|
|
||||||
//advance the base sequence number to the seq of the block after the one we just got rid of.
|
//advance the base sequence number to the seq of the block after the one we just got rid of.
|
||||||
SequencedBase++;
|
SequencedBase++;
|
||||||
}
|
}
|
||||||
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
if(uint16(SequencedBase + SequencedQueue.size()) != NextOutSeq) {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-Ack on %d Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, seq, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-Ack on %d Invalid Sequenced queue: BS %d + SQ %d != NOS %d" __L, seq, SequencedBase, SequencedQueue.size(), NextOutSeq);
|
||||||
}
|
}
|
||||||
if(NextSequencedSend > SequencedQueue.size()) {
|
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Post-Ack Next Send Sequence is beyond the end of the queue NSS %d > SQ %d" __L, NextSequencedSend, SequencedQueue.size());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MOutboundQueue.unlock();
|
MOutboundQueue.unlock();
|
||||||
@ -1367,6 +1335,18 @@ void EQStream::Decay()
|
|||||||
if (BytesWritten<0)
|
if (BytesWritten<0)
|
||||||
BytesWritten=0;
|
BytesWritten=0;
|
||||||
}
|
}
|
||||||
|
// check for any timed out acks
|
||||||
|
if ((GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) && RETRANSMIT_TIMEOUT_MULT && retransmittimeout) {
|
||||||
|
int count = 0;
|
||||||
|
MOutboundQueue.lock();
|
||||||
|
for (auto sitr = SequencedQueue.begin(); sitr != SequencedQueue.end(); ++sitr, count++) {
|
||||||
|
if (!(*sitr)->acked && (*sitr)->sent_time > 0 && ((*sitr)->sent_time + retransmittimeout) < Timer::GetCurrentTime()) {
|
||||||
|
(*sitr)->sent_time = 0;
|
||||||
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Timeout exceeded for seq %d. Flagging packet for retransmission" __L, SequencedBase + count);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
MOutboundQueue.unlock();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQStream::AdjustRates(uint32 average_delta)
|
void EQStream::AdjustRates(uint32 average_delta)
|
||||||
@ -1374,18 +1354,24 @@ void EQStream::AdjustRates(uint32 average_delta)
|
|||||||
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
if(GetExecutablePlatform() == ExePlatformWorld || GetExecutablePlatform() == ExePlatformZone) {
|
||||||
if (average_delta && (average_delta <= AVERAGE_DELTA_MAX)) {
|
if (average_delta && (average_delta <= AVERAGE_DELTA_MAX)) {
|
||||||
MRate.lock();
|
MRate.lock();
|
||||||
|
AverageDelta = average_delta;
|
||||||
RateThreshold=RATEBASE/average_delta;
|
RateThreshold=RATEBASE/average_delta;
|
||||||
DecayRate=DECAYBASE/average_delta;
|
DecayRate=DECAYBASE/average_delta;
|
||||||
|
if (BytesWritten > RateThreshold)
|
||||||
|
BytesWritten = RateThreshold + DecayRate;
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||||
RateThreshold, DecayRate, average_delta);
|
RateThreshold, DecayRate, average_delta);
|
||||||
MRate.unlock();
|
MRate.unlock();
|
||||||
} else {
|
} else {
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Not adjusting data rate because avg delta over max (%d > %d)" __L,
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Not adjusting data rate because avg delta over max (%d > %d)" __L,
|
||||||
average_delta, AVERAGE_DELTA_MAX);
|
average_delta, AVERAGE_DELTA_MAX);
|
||||||
|
AverageDelta = AVERAGE_DELTA_MAX;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (average_delta) {
|
if (average_delta) {
|
||||||
MRate.lock();
|
MRate.lock();
|
||||||
|
AverageDelta = average_delta;
|
||||||
|
BytesWritten = 0;
|
||||||
RateThreshold=RATEBASE/average_delta;
|
RateThreshold=RATEBASE/average_delta;
|
||||||
DecayRate=DECAYBASE/average_delta;
|
DecayRate=DECAYBASE/average_delta;
|
||||||
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
Log.Out(Logs::Detail, Logs::Netcode, _L "Adjusting data rate to thresh %d, decay %d based on avg delta %d" __L,
|
||||||
|
|||||||
@ -71,7 +71,7 @@ struct SessionResponse {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//Deltas are in ms, representing round trip times
|
//Deltas are in ms, representing round trip times
|
||||||
struct SessionStats {
|
struct ClientSessionStats {
|
||||||
/*000*/ uint16 RequestID;
|
/*000*/ uint16 RequestID;
|
||||||
/*002*/ uint32 last_local_delta;
|
/*002*/ uint32 last_local_delta;
|
||||||
/*006*/ uint32 average_delta;
|
/*006*/ uint32 average_delta;
|
||||||
@ -83,6 +83,16 @@ struct SessionStats {
|
|||||||
/*038*/
|
/*038*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct ServerSessionStats {
|
||||||
|
/*000*/ uint16 RequestID;
|
||||||
|
/*002*/ uint32 ServerTime;
|
||||||
|
/*006*/ uint64 packets_sent_echo;
|
||||||
|
/*014*/ uint64 packets_received_echo;
|
||||||
|
/*022*/ uint64 packets_sent;
|
||||||
|
/*030*/ uint64 packets_received;
|
||||||
|
/*038*/
|
||||||
|
};
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
class OpcodeManager;
|
class OpcodeManager;
|
||||||
@ -143,7 +153,6 @@ class EQStream : public EQStreamInterface {
|
|||||||
std::deque<EQProtocolPacket *> SequencedQueue;
|
std::deque<EQProtocolPacket *> SequencedQueue;
|
||||||
uint16 NextOutSeq;
|
uint16 NextOutSeq;
|
||||||
uint16 SequencedBase; //the sequence number of SequencedQueue[0]
|
uint16 SequencedBase; //the sequence number of SequencedQueue[0]
|
||||||
long NextSequencedSend; //index into SequencedQueue
|
|
||||||
Mutex MOutboundQueue;
|
Mutex MOutboundQueue;
|
||||||
|
|
||||||
//a buffer we use for compression/decompression
|
//a buffer we use for compression/decompression
|
||||||
@ -158,10 +167,13 @@ class EQStream : public EQStreamInterface {
|
|||||||
|
|
||||||
int32 BytesWritten;
|
int32 BytesWritten;
|
||||||
|
|
||||||
|
uint64 sent_packet_count;
|
||||||
|
uint64 received_packet_count;
|
||||||
|
|
||||||
Mutex MRate;
|
Mutex MRate;
|
||||||
int32 RateThreshold;
|
int32 RateThreshold;
|
||||||
int32 DecayRate;
|
int32 DecayRate;
|
||||||
|
uint32 AverageDelta;
|
||||||
|
|
||||||
OpcodeManager **OpMgr;
|
OpcodeManager **OpMgr;
|
||||||
|
|
||||||
@ -265,11 +277,13 @@ class EQStream : public EQStreamInterface {
|
|||||||
void AddBytesSent(uint32 bytes)
|
void AddBytesSent(uint32 bytes)
|
||||||
{
|
{
|
||||||
bytes_sent += bytes;
|
bytes_sent += bytes;
|
||||||
|
++sent_packet_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddBytesRecv(uint32 bytes)
|
void AddBytesRecv(uint32 bytes)
|
||||||
{
|
{
|
||||||
bytes_recv += bytes;
|
bytes_recv += bytes;
|
||||||
|
++received_packet_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual const uint32 GetBytesSent() const { return bytes_sent; }
|
virtual const uint32 GetBytesSent() const { return bytes_sent; }
|
||||||
@ -288,6 +302,9 @@ class EQStream : public EQStreamInterface {
|
|||||||
return bytes_recv / (Timer::GetTimeSeconds() - create_time);
|
return bytes_recv / (Timer::GetTimeSeconds() - create_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const uint64 GetPacketsSent() { return sent_packet_count; }
|
||||||
|
const uint64 GetPacketsReceived() { return received_packet_count; }
|
||||||
|
|
||||||
//used for dynamic stream identification
|
//used for dynamic stream identification
|
||||||
class Signature {
|
class Signature {
|
||||||
public:
|
public:
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
#include "eq_stream_factory.h"
|
#include "eq_stream_factory.h"
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -120,7 +120,7 @@ std::shared_ptr<EQStream> EQStreamFactory::Pop()
|
|||||||
{
|
{
|
||||||
std::shared_ptr<EQStream> s = nullptr;
|
std::shared_ptr<EQStream> s = nullptr;
|
||||||
MNewStreams.lock();
|
MNewStreams.lock();
|
||||||
if (NewStreams.size()) {
|
if (!NewStreams.empty()) {
|
||||||
s = NewStreams.front();
|
s = NewStreams.front();
|
||||||
NewStreams.pop();
|
NewStreams.pop();
|
||||||
s->PutInUse();
|
s->PutInUse();
|
||||||
@ -235,7 +235,7 @@ void EQStreamFactory::CheckTimeout()
|
|||||||
//give it a little time for everybody to finish with it
|
//give it a little time for everybody to finish with it
|
||||||
} else {
|
} else {
|
||||||
//everybody is done, we can delete it now
|
//everybody is done, we can delete it now
|
||||||
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator temp = stream_itr;
|
auto temp = stream_itr;
|
||||||
++stream_itr;
|
++stream_itr;
|
||||||
temp->second = nullptr;
|
temp->second = nullptr;
|
||||||
Streams.erase(temp);
|
Streams.erase(temp);
|
||||||
@ -250,8 +250,7 @@ void EQStreamFactory::CheckTimeout()
|
|||||||
|
|
||||||
void EQStreamFactory::WriterLoop()
|
void EQStreamFactory::WriterLoop()
|
||||||
{
|
{
|
||||||
std::map<std::pair<uint32, uint16>, std::shared_ptr<EQStream>>::iterator stream_itr;
|
bool havework = true;
|
||||||
bool havework=true;
|
|
||||||
std::vector<std::shared_ptr<EQStream>> wants_write;
|
std::vector<std::shared_ptr<EQStream>> wants_write;
|
||||||
std::vector<std::shared_ptr<EQStream>>::iterator cur, end;
|
std::vector<std::shared_ptr<EQStream>>::iterator cur, end;
|
||||||
bool decay = false;
|
bool decay = false;
|
||||||
@ -260,7 +259,7 @@ void EQStreamFactory::WriterLoop()
|
|||||||
WriterRunning = true;
|
WriterRunning = true;
|
||||||
DecayTimer.Enable();
|
DecayTimer.Enable();
|
||||||
|
|
||||||
while(sock!=-1) {
|
while (sock != -1) {
|
||||||
MWriterRunning.lock();
|
MWriterRunning.lock();
|
||||||
if (!WriterRunning)
|
if (!WriterRunning)
|
||||||
break;
|
break;
|
||||||
@ -269,34 +268,36 @@ void EQStreamFactory::WriterLoop()
|
|||||||
havework = false;
|
havework = false;
|
||||||
wants_write.clear();
|
wants_write.clear();
|
||||||
|
|
||||||
decay=DecayTimer.Check();
|
decay = DecayTimer.Check();
|
||||||
|
|
||||||
//copy streams into a seperate list so we dont have to keep
|
// copy streams into a seperate list so we dont have to keep
|
||||||
//MStreams locked while we are writting
|
// MStreams locked while we are writting
|
||||||
MStreams.lock();
|
MStreams.lock();
|
||||||
for(stream_itr=Streams.begin();stream_itr!=Streams.end();++stream_itr) {
|
for (auto stream_itr = Streams.begin(); stream_itr != Streams.end(); ++stream_itr) {
|
||||||
// If it's time to decay the bytes sent, then let's do it before we try to write
|
// If it's time to decay the bytes sent, then let's do it before we try to write
|
||||||
if (decay)
|
if (decay)
|
||||||
stream_itr->second->Decay();
|
stream_itr->second->Decay();
|
||||||
|
|
||||||
//bullshit checking, to see if this is really happening, GDB seems to think so...
|
// bullshit checking, to see if this is really happening, GDB seems to think so...
|
||||||
if(stream_itr->second == nullptr) {
|
if (stream_itr->second == nullptr) {
|
||||||
fprintf(stderr, "ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i:%i", stream_itr->first.first, stream_itr->first.second);
|
fprintf(stderr,
|
||||||
|
"ERROR: nullptr Stream encountered in EQStreamFactory::WriterLoop for: %i:%i",
|
||||||
|
stream_itr->first.first, stream_itr->first.second);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stream_itr->second->HasOutgoingData()) {
|
if (stream_itr->second->HasOutgoingData()) {
|
||||||
havework=true;
|
havework = true;
|
||||||
stream_itr->second->PutInUse();
|
stream_itr->second->PutInUse();
|
||||||
wants_write.push_back(stream_itr->second);
|
wants_write.push_back(stream_itr->second);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MStreams.unlock();
|
MStreams.unlock();
|
||||||
|
|
||||||
//do the actual writes
|
// do the actual writes
|
||||||
cur = wants_write.begin();
|
cur = wants_write.begin();
|
||||||
end = wants_write.end();
|
end = wants_write.end();
|
||||||
for(; cur != end; ++cur) {
|
for (; cur != end; ++cur) {
|
||||||
(*cur)->Write(sock);
|
(*cur)->Write(sock);
|
||||||
(*cur)->ReleaseFromUse();
|
(*cur)->ReleaseFromUse();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
#include <utility>
|
||||||
|
|
||||||
#include "global_define.h"
|
#include "global_define.h"
|
||||||
#include "eqemu_logsys.h"
|
#include "eqemu_logsys.h"
|
||||||
#include "eq_stream_ident.h"
|
#include "eq_stream_ident.h"
|
||||||
@ -25,7 +27,7 @@ EQStreamIdentifier::~EQStreamIdentifier() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void EQStreamIdentifier::RegisterPatch(const EQStream::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs) {
|
void EQStreamIdentifier::RegisterPatch(const EQStream::Signature &sig, const char *name, OpcodeManager ** opcodes, const StructStrategy *structs) {
|
||||||
Patch *p = new Patch;
|
auto p = new Patch;
|
||||||
p->signature = sig;
|
p->signature = sig;
|
||||||
p->name = name;
|
p->name = name;
|
||||||
p->opcodes = opcodes;
|
p->opcodes = opcodes;
|
||||||
@ -156,7 +158,7 @@ EQStreamInterface *EQStreamIdentifier::PopIdentified() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
EQStreamIdentifier::Record::Record(std::shared_ptr<EQStream> s)
|
EQStreamIdentifier::Record::Record(std::shared_ptr<EQStream> s)
|
||||||
: stream(s),
|
: stream(std::move(s)),
|
||||||
expire(STREAM_IDENT_WAIT_MS)
|
expire(STREAM_IDENT_WAIT_MS)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
//this is the only part of an EQStream that is seen by the application.
|
//this is the only part of an EQStream that is seen by the application.
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include "clientversions.h"
|
#include "emu_versions.h"
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
ESTABLISHED,
|
ESTABLISHED,
|
||||||
@ -35,7 +35,7 @@ public:
|
|||||||
virtual const uint32 GetBytesRecieved() const { return 0; }
|
virtual const uint32 GetBytesRecieved() const { return 0; }
|
||||||
virtual const uint32 GetBytesSentPerSecond() const { return 0; }
|
virtual const uint32 GetBytesSentPerSecond() const { return 0; }
|
||||||
virtual const uint32 GetBytesRecvPerSecond() const { return 0; }
|
virtual const uint32 GetBytesRecvPerSecond() const { return 0; }
|
||||||
virtual const ClientVersion GetClientVersion() const { return ClientVersion::Unknown; }
|
virtual const EQEmu::versions::ClientVersion ClientVersion() const { return EQEmu::versions::ClientVersion::Unknown; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*EQSTREAMINTF_H_*/
|
#endif /*EQSTREAMINTF_H_*/
|
||||||
|
|||||||
@ -21,9 +21,9 @@ std::string EQStreamProxy::Describe() const {
|
|||||||
return(m_structs->Describe());
|
return(m_structs->Describe());
|
||||||
}
|
}
|
||||||
|
|
||||||
const ClientVersion EQStreamProxy::GetClientVersion() const
|
const EQEmu::versions::ClientVersion EQStreamProxy::ClientVersion() const
|
||||||
{
|
{
|
||||||
return m_structs->GetClientVersion();
|
return m_structs->ClientVersion();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
|
void EQStreamProxy::QueuePacket(const EQApplicationPacket *p, bool ack_req) {
|
||||||
|
|||||||
@ -28,7 +28,7 @@ public:
|
|||||||
virtual void RemoveData();
|
virtual void RemoveData();
|
||||||
virtual bool CheckState(EQStreamState state);
|
virtual bool CheckState(EQStreamState state);
|
||||||
virtual std::string Describe() const;
|
virtual std::string Describe() const;
|
||||||
virtual const ClientVersion GetClientVersion() const;
|
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||||
|
|
||||||
virtual const uint32 GetBytesSent() const;
|
virtual const uint32 GetBytesSent() const;
|
||||||
virtual const uint32 GetBytesRecieved() const;
|
virtual const uint32 GetBytesRecieved() const;
|
||||||
|
|||||||
@ -63,7 +63,7 @@ EQDBRes * EQDB::query(Const_char *q) {
|
|||||||
//NOT THREAD SAFE!
|
//NOT THREAD SAFE!
|
||||||
Const_char *EQDB::escape_string(Const_char *from) {
|
Const_char *EQDB::escape_string(Const_char *from) {
|
||||||
int len = strlen(from);
|
int len = strlen(from);
|
||||||
char *res = new char[len*2+1];
|
auto res = new char[len * 2 + 1];
|
||||||
|
|
||||||
mysql_real_escape_string(mysql_ref,res,from,len);
|
mysql_real_escape_string(mysql_ref,res,from,len);
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ void EQEmuConfig::do_world(TiXmlElement *ele)
|
|||||||
sprintf(str, "loginserver%i", ++LoginCount);
|
sprintf(str, "loginserver%i", ++LoginCount);
|
||||||
sub_ele = ele->FirstChildElement(str);
|
sub_ele = ele->FirstChildElement(str);
|
||||||
if (sub_ele) {
|
if (sub_ele) {
|
||||||
LoginConfig* loginconfig = new LoginConfig;
|
auto loginconfig = new LoginConfig;
|
||||||
text = ParseTextBlock(sub_ele, "host", true);
|
text = ParseTextBlock(sub_ele, "host", true);
|
||||||
if (text) {
|
if (text) {
|
||||||
loginconfig->LoginHost = text;
|
loginconfig->LoginHost = text;
|
||||||
@ -277,9 +277,9 @@ void EQEmuConfig::do_files(TiXmlElement *ele)
|
|||||||
if (text) {
|
if (text) {
|
||||||
OpCodesFile = text;
|
OpCodesFile = text;
|
||||||
}
|
}
|
||||||
text = ParseTextBlock(ele, "eqtime", true);
|
text = ParseTextBlock(ele, "plugin.pl", true);
|
||||||
if (text) {
|
if (text) {
|
||||||
EQTimeFile = text;
|
PluginPlFile = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -289,14 +289,45 @@ void EQEmuConfig::do_directories(TiXmlElement *ele)
|
|||||||
text = ParseTextBlock(ele, "maps", true);
|
text = ParseTextBlock(ele, "maps", true);
|
||||||
if (text) {
|
if (text) {
|
||||||
MapDir = text;
|
MapDir = text;
|
||||||
|
if ( MapDir.back() != '/' )
|
||||||
|
MapDir += '/';
|
||||||
}
|
}
|
||||||
text = ParseTextBlock(ele, "quests", true);
|
text = ParseTextBlock(ele, "quests", true);
|
||||||
if (text) {
|
if (text) {
|
||||||
QuestDir = text;
|
QuestDir = text;
|
||||||
|
if ( QuestDir.back() != '/' )
|
||||||
|
QuestDir += '/';
|
||||||
}
|
}
|
||||||
text = ParseTextBlock(ele, "plugins", true);
|
text = ParseTextBlock(ele, "plugins", true);
|
||||||
if (text) {
|
if (text) {
|
||||||
PluginDir = text;
|
PluginDir = text;
|
||||||
|
if ( PluginDir.back() != '/' )
|
||||||
|
PluginDir += '/';
|
||||||
|
}
|
||||||
|
text = ParseTextBlock(ele, "lua_modules", true);
|
||||||
|
if (text) {
|
||||||
|
LuaModuleDir = text;
|
||||||
|
if ( LuaModuleDir.back() != '/' )
|
||||||
|
LuaModuleDir += '/';
|
||||||
|
}
|
||||||
|
text = ParseTextBlock(ele, "patches", true);
|
||||||
|
if (text) {
|
||||||
|
PatchDir = text;
|
||||||
|
if ( PatchDir.back() != '/' )
|
||||||
|
PatchDir += '/';
|
||||||
|
}
|
||||||
|
text = ParseTextBlock(ele, "shared_memory", true);
|
||||||
|
if (text) {
|
||||||
|
SharedMemDir = text;
|
||||||
|
if ( SharedMemDir.back() != '/' )
|
||||||
|
SharedMemDir += '/';
|
||||||
|
}
|
||||||
|
//Not Fully Implemented yet LogDir
|
||||||
|
text = ParseTextBlock(ele, "logs", true);
|
||||||
|
if (text) {
|
||||||
|
LogDir = text;
|
||||||
|
if ( LogDir.back() != '/' )
|
||||||
|
LogDir += '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -431,8 +462,8 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
|
|||||||
if (var_name == "OpCodesFile") {
|
if (var_name == "OpCodesFile") {
|
||||||
return (OpCodesFile);
|
return (OpCodesFile);
|
||||||
}
|
}
|
||||||
if (var_name == "EQTimeFile") {
|
if (var_name == "PluginPlFile") {
|
||||||
return (EQTimeFile);
|
return (PluginPlFile);
|
||||||
}
|
}
|
||||||
if (var_name == "MapDir") {
|
if (var_name == "MapDir") {
|
||||||
return (MapDir);
|
return (MapDir);
|
||||||
@ -443,6 +474,18 @@ std::string EQEmuConfig::GetByName(const std::string &var_name) const
|
|||||||
if (var_name == "PluginDir") {
|
if (var_name == "PluginDir") {
|
||||||
return (PluginDir);
|
return (PluginDir);
|
||||||
}
|
}
|
||||||
|
if (var_name == "LuaModuleDir") {
|
||||||
|
return (LuaModuleDir);
|
||||||
|
}
|
||||||
|
if (var_name == "PatchDir") {
|
||||||
|
return (PatchDir);
|
||||||
|
}
|
||||||
|
if (var_name == "SharedMemDir") {
|
||||||
|
return (SharedMemDir);
|
||||||
|
}
|
||||||
|
if (var_name == "LogDir") {
|
||||||
|
return (LogDir);
|
||||||
|
}
|
||||||
if (var_name == "LogPrefix") {
|
if (var_name == "LogPrefix") {
|
||||||
return (LogPrefix);
|
return (LogPrefix);
|
||||||
}
|
}
|
||||||
@ -504,10 +547,14 @@ void EQEmuConfig::Dump() const
|
|||||||
std::cout << "WebInterfacePrivKey = " << WebInterfacePrivKey << std::endl;
|
std::cout << "WebInterfacePrivKey = " << WebInterfacePrivKey << std::endl;
|
||||||
std::cout << "SpellsFile = " << SpellsFile << std::endl;
|
std::cout << "SpellsFile = " << SpellsFile << std::endl;
|
||||||
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
|
std::cout << "OpCodesFile = " << OpCodesFile << std::endl;
|
||||||
std::cout << "EQTimeFile = " << EQTimeFile << std::endl;
|
std::cout << "PluginPlFile = " << PluginPlFile << std::endl;
|
||||||
std::cout << "MapDir = " << MapDir << std::endl;
|
std::cout << "MapDir = " << MapDir << std::endl;
|
||||||
std::cout << "QuestDir = " << QuestDir << std::endl;
|
std::cout << "QuestDir = " << QuestDir << std::endl;
|
||||||
std::cout << "PluginDir = " << PluginDir << std::endl;
|
std::cout << "PluginDir = " << PluginDir << std::endl;
|
||||||
|
std::cout << "LuaModuleDir = " << LuaModuleDir << std::endl;
|
||||||
|
std::cout << "PatchDir = " << PatchDir << std::endl;
|
||||||
|
std::cout << "SharedMemDir = " << SharedMemDir << std::endl;
|
||||||
|
std::cout << "LogDir = " << LogDir << std::endl;
|
||||||
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
|
std::cout << "ZonePortLow = " << ZonePortLow << std::endl;
|
||||||
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
|
std::cout << "ZonePortHigh = " << ZonePortHigh << std::endl;
|
||||||
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
|
std::cout << "DefaultStatus = " << (int)DefaultStatus << std::endl;
|
||||||
|
|||||||
@ -85,12 +85,16 @@ class EQEmuConfig : public XMLParser
|
|||||||
// From <files/>
|
// From <files/>
|
||||||
std::string SpellsFile;
|
std::string SpellsFile;
|
||||||
std::string OpCodesFile;
|
std::string OpCodesFile;
|
||||||
std::string EQTimeFile;
|
std::string PluginPlFile;
|
||||||
|
|
||||||
// From <directories/>
|
// From <directories/>
|
||||||
std::string MapDir;
|
std::string MapDir;
|
||||||
std::string QuestDir;
|
std::string QuestDir;
|
||||||
std::string PluginDir;
|
std::string PluginDir;
|
||||||
|
std::string LuaModuleDir;
|
||||||
|
std::string PatchDir;
|
||||||
|
std::string SharedMemDir;
|
||||||
|
std::string LogDir;
|
||||||
|
|
||||||
// From <launcher/>
|
// From <launcher/>
|
||||||
std::string LogPrefix;
|
std::string LogPrefix;
|
||||||
@ -160,11 +164,16 @@ class EQEmuConfig : public XMLParser
|
|||||||
// Files
|
// Files
|
||||||
SpellsFile = "spells_us.txt";
|
SpellsFile = "spells_us.txt";
|
||||||
OpCodesFile = "opcodes.conf";
|
OpCodesFile = "opcodes.conf";
|
||||||
EQTimeFile = "eqtime.cfg";
|
PluginPlFile = "plugin.pl";
|
||||||
// Dirs
|
// Dirs
|
||||||
MapDir = "Maps";
|
MapDir = "Maps/";
|
||||||
QuestDir = "quests";
|
QuestDir = "quests/";
|
||||||
PluginDir = "plugins";
|
PluginDir = "plugins/";
|
||||||
|
LuaModuleDir = "lua_modules/";
|
||||||
|
PatchDir = "./";
|
||||||
|
SharedMemDir = "shared/";
|
||||||
|
LogDir = "logs/";
|
||||||
|
|
||||||
// Launcher
|
// Launcher
|
||||||
LogPrefix = "logs/zone-";
|
LogPrefix = "logs/zone-";
|
||||||
LogSuffix = ".log";
|
LogSuffix = ".log";
|
||||||
|
|||||||
@ -102,6 +102,7 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
|||||||
log_settings[Logs::UCS_Server].log_to_console = Logs::General;
|
log_settings[Logs::UCS_Server].log_to_console = Logs::General;
|
||||||
log_settings[Logs::Crash].log_to_console = Logs::General;
|
log_settings[Logs::Crash].log_to_console = Logs::General;
|
||||||
log_settings[Logs::MySQLError].log_to_console = Logs::General;
|
log_settings[Logs::MySQLError].log_to_console = Logs::General;
|
||||||
|
log_settings[Logs::Login_Server].log_to_console = Logs::General;
|
||||||
|
|
||||||
/* Declare process file names for log writing
|
/* Declare process file names for log writing
|
||||||
If there is no process_file_name declared, no log file will be written, simply
|
If there is no process_file_name declared, no log file will be written, simply
|
||||||
@ -116,7 +117,7 @@ void EQEmuLogSys::LoadLogSettingsDefaults()
|
|||||||
platform_file_name = "ucs";
|
platform_file_name = "ucs";
|
||||||
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
|
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
|
||||||
platform_file_name = "login";
|
platform_file_name = "login";
|
||||||
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLogin)
|
else if (EQEmuLogSys::log_platform == EQEmuExePlatform::ExePlatformLaunch)
|
||||||
platform_file_name = "launcher";
|
platform_file_name = "launcher";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -82,6 +82,7 @@ namespace Logs {
|
|||||||
Client_Server_Packet_Unhandled,
|
Client_Server_Packet_Unhandled,
|
||||||
Server_Client_Packet_With_Dump,
|
Server_Client_Packet_With_Dump,
|
||||||
Client_Server_Packet_With_Dump,
|
Client_Server_Packet_With_Dump,
|
||||||
|
Login_Server,
|
||||||
MaxCategoryID /* Don't Remove this*/
|
MaxCategoryID /* Don't Remove this*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -130,6 +131,7 @@ namespace Logs {
|
|||||||
"Packet :: Client -> Server Unhandled",
|
"Packet :: Client -> Server Unhandled",
|
||||||
"Packet :: Server -> Client (Dump)",
|
"Packet :: Server -> Client (Dump)",
|
||||||
"Packet :: Client -> Server (Dump)",
|
"Packet :: Client -> Server (Dump)",
|
||||||
|
"Login Server"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -43,19 +43,19 @@ EQTime::EQTime(TimeOfDay_Struct start_eq, time_t start_real)
|
|||||||
|
|
||||||
EQTime::EQTime()
|
EQTime::EQTime()
|
||||||
{
|
{
|
||||||
timezone=0;
|
timezone = 0;
|
||||||
memset(&eqTime, 0, sizeof(eqTime));
|
memset(&eqTime, 0, sizeof(eqTime));
|
||||||
//Defaults for time
|
//Defaults for time
|
||||||
TimeOfDay_Struct start;
|
TimeOfDay_Struct start;
|
||||||
start.day=1;
|
start.day = 1;
|
||||||
start.hour=9;
|
start.hour = 9;
|
||||||
start.minute=0;
|
start.minute = 0;
|
||||||
start.month=1;
|
start.month = 1;
|
||||||
start.year=3100;
|
start.year = 3100;
|
||||||
//Set default time zone
|
//Set default time zone
|
||||||
timezone=0;
|
timezone = 0;
|
||||||
//Start EQTimer
|
//Start EQTimer
|
||||||
setEQTimeOfDay(start, time(0));
|
SetCurrentEQTimeOfDay(start, time(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
EQTime::~EQTime()
|
EQTime::~EQTime()
|
||||||
@ -67,10 +67,10 @@ EQTime::~EQTime()
|
|||||||
//Input: Current Time (as a time_t), a pointer to the TimeOfDay_Struct that will be written to.
|
//Input: Current Time (as a time_t), a pointer to the TimeOfDay_Struct that will be written to.
|
||||||
//Output: 0=Error, 1=Sucess
|
//Output: 0=Error, 1=Sucess
|
||||||
|
|
||||||
int EQTime::getEQTimeOfDay( time_t timeConvert, struct TimeOfDay_Struct *eqTimeOfDay )
|
int EQTime::GetCurrentEQTimeOfDay(time_t timeConvert, struct TimeOfDay_Struct *eqTimeOfDay)
|
||||||
{
|
{
|
||||||
/* check to see if we have a reference time to go by. */
|
/* check to see if we have a reference time to go by. */
|
||||||
if( eqTime.start_realtime == 0 )
|
if (eqTime.start_realtime == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
unsigned long diff = timeConvert - eqTime.start_realtime;
|
unsigned long diff = timeConvert - eqTime.start_realtime;
|
||||||
@ -83,7 +83,7 @@ int EQTime::getEQTimeOfDay( time_t timeConvert, struct TimeOfDay_Struct *eqTimeO
|
|||||||
int32 ntz = timezone;
|
int32 ntz = timezone;
|
||||||
|
|
||||||
/* The minutes range from 0 - 59 */
|
/* The minutes range from 0 - 59 */
|
||||||
diff += eqTime.start_eqtime.minute + (ntz%60);
|
diff += eqTime.start_eqtime.minute + (ntz % 60);
|
||||||
eqTimeOfDay->minute = diff % 60;
|
eqTimeOfDay->minute = diff % 60;
|
||||||
diff /= 60;
|
diff /= 60;
|
||||||
ntz /= 60;
|
ntz /= 60;
|
||||||
@ -97,24 +97,24 @@ int EQTime::getEQTimeOfDay( time_t timeConvert, struct TimeOfDay_Struct *eqTimeO
|
|||||||
//
|
//
|
||||||
// Modify it so that it works from
|
// Modify it so that it works from
|
||||||
// 0-23 for our calculations
|
// 0-23 for our calculations
|
||||||
diff += ( eqTime.start_eqtime.hour - 1) + (ntz%24);
|
diff += (eqTime.start_eqtime.hour - 1) + (ntz % 24);
|
||||||
eqTimeOfDay->hour = (diff%24) + 1;
|
eqTimeOfDay->hour = (diff % 24) + 1;
|
||||||
diff /= 24;
|
diff /= 24;
|
||||||
ntz /= 24;
|
ntz /= 24;
|
||||||
|
|
||||||
// The days range from 1-28
|
// The days range from 1-28
|
||||||
// Modify it so that it works from
|
// Modify it so that it works from
|
||||||
// 0-27 for our calculations
|
// 0-27 for our calculations
|
||||||
diff += ( eqTime.start_eqtime.day - 1 ) + (ntz%28);
|
diff += (eqTime.start_eqtime.day - 1) + (ntz % 28);
|
||||||
eqTimeOfDay->day = (diff%28) + 1;
|
eqTimeOfDay->day = (diff % 28) + 1;
|
||||||
diff /= 28;
|
diff /= 28;
|
||||||
ntz /= 28;
|
ntz /= 28;
|
||||||
|
|
||||||
// The months range from 1-12
|
// The months range from 1-12
|
||||||
// Modify it so that it works from
|
// Modify it so that it works from
|
||||||
// 0-11 for our calculations
|
// 0-11 for our calculations
|
||||||
diff += ( eqTime.start_eqtime.month - 1 ) + (ntz%12);
|
diff += (eqTime.start_eqtime.month - 1) + (ntz % 12);
|
||||||
eqTimeOfDay->month = (diff%12) + 1;
|
eqTimeOfDay->month = (diff % 12) + 1;
|
||||||
diff /= 12;
|
diff /= 12;
|
||||||
ntz /= 12;
|
ntz /= 12;
|
||||||
|
|
||||||
@ -124,100 +124,34 @@ int EQTime::getEQTimeOfDay( time_t timeConvert, struct TimeOfDay_Struct *eqTimeO
|
|||||||
}
|
}
|
||||||
|
|
||||||
//setEQTimeOfDay
|
//setEQTimeOfDay
|
||||||
int EQTime::setEQTimeOfDay(TimeOfDay_Struct start_eq, time_t start_real)
|
int EQTime::SetCurrentEQTimeOfDay(TimeOfDay_Struct start_eq, time_t start_real)
|
||||||
{
|
{
|
||||||
if(start_real==0)
|
if (start_real == 0)
|
||||||
return 0;
|
return 0;
|
||||||
eqTime.start_eqtime=start_eq;
|
eqTime.start_eqtime = start_eq;
|
||||||
eqTime.start_realtime=start_real;
|
eqTime.start_realtime = start_real;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
//saveFile and loadFile need to use long for the save datatype...
|
|
||||||
//For some reason, ifstream/ofstream have problems with EQEmu datatypes in files.
|
|
||||||
bool EQTime::saveFile(const char *filename)
|
|
||||||
{
|
|
||||||
std::ofstream of;
|
|
||||||
of.open(filename);
|
|
||||||
if(!of)
|
|
||||||
{
|
|
||||||
Log.Out(Logs::General, Logs::Error, "EQTime::saveFile failed: Unable to open file '%s'", filename);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//Enable for debugging
|
|
||||||
of << EQT_VERSION << std::endl;
|
|
||||||
of << (long)eqTime.start_eqtime.day << std::endl;
|
|
||||||
of << (long)eqTime.start_eqtime.hour << std::endl;
|
|
||||||
of << (long)eqTime.start_eqtime.minute << std::endl;
|
|
||||||
of << (long)eqTime.start_eqtime.month << std::endl;
|
|
||||||
of << eqTime.start_eqtime.year << std::endl;
|
|
||||||
of << eqTime.start_realtime << std::endl;
|
|
||||||
of.close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EQTime::loadFile(const char *filename)
|
|
||||||
{
|
|
||||||
int version=0;
|
|
||||||
long in_data=0;
|
|
||||||
std::ifstream in;
|
|
||||||
in.open(filename);
|
|
||||||
if(!in)
|
|
||||||
{
|
|
||||||
Log.Out(Logs::General, Logs::Error, "Could not load EQTime file %s", filename);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
in >> version;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
if(version != EQT_VERSION)
|
|
||||||
{
|
|
||||||
Log.Out(Logs::General, Logs::Error, "'%s' is NOT a valid EQTime file. File version is %i, EQTime version is %i", filename, version, EQT_VERSION);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//in >> eqTime.start_eqtime.day;
|
|
||||||
in >> in_data;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
eqTime.start_eqtime.day = in_data;
|
|
||||||
//in >> eqTime.start_eqtime.hour;
|
|
||||||
in >> in_data;
|
|
||||||
eqTime.start_eqtime.hour = in_data;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
//in >> eqTime.start_eqtime.minute;
|
|
||||||
in >> in_data;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
eqTime.start_eqtime.minute = in_data;
|
|
||||||
//in >> eqTime.start_eqtime.month;
|
|
||||||
in >> in_data;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
eqTime.start_eqtime.month = in_data;
|
|
||||||
in >> eqTime.start_eqtime.year;
|
|
||||||
in.ignore(80, '\n');
|
|
||||||
in >> eqTime.start_realtime;
|
|
||||||
//Enable for debugging...
|
|
||||||
in.close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
bool EQTime::IsTimeBefore(TimeOfDay_Struct *base, TimeOfDay_Struct *test) {
|
bool EQTime::IsTimeBefore(TimeOfDay_Struct *base, TimeOfDay_Struct *test) {
|
||||||
if(base->year > test->year)
|
if (base->year > test->year)
|
||||||
return(true);
|
return(true);
|
||||||
if(base->year < test->year)
|
if (base->year < test->year)
|
||||||
return(false);
|
return(false);
|
||||||
//same years
|
//same years
|
||||||
if(base->month > test->month)
|
if (base->month > test->month)
|
||||||
return(true);
|
return(true);
|
||||||
if(base->month < test->month)
|
if (base->month < test->month)
|
||||||
return(false);
|
return(false);
|
||||||
//same month
|
//same month
|
||||||
if(base->day > test->day)
|
if (base->day > test->day)
|
||||||
return(true);
|
return(true);
|
||||||
if(base->day < test->day)
|
if (base->day < test->day)
|
||||||
return(false);
|
return(false);
|
||||||
//same day
|
//same day
|
||||||
if(base->hour > test->hour)
|
if (base->hour > test->hour)
|
||||||
return(true);
|
return(true);
|
||||||
if(base->hour < test->hour)
|
if (base->hour < test->hour)
|
||||||
return(false);
|
return(false);
|
||||||
//same hour...
|
//same hour...
|
||||||
return(base->minute > test->minute);
|
return(base->minute > test->minute);
|
||||||
@ -230,7 +164,7 @@ void EQTime::AddMinutes(uint32 minutes, TimeOfDay_Struct *to) {
|
|||||||
//minutes start at 0, everything else starts at 1
|
//minutes start at 0, everything else starts at 1
|
||||||
cur = to->minute;
|
cur = to->minute;
|
||||||
cur += minutes;
|
cur += minutes;
|
||||||
if(cur < 60) {
|
if (cur < 60) {
|
||||||
to->minute = cur;
|
to->minute = cur;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -238,29 +172,29 @@ void EQTime::AddMinutes(uint32 minutes, TimeOfDay_Struct *to) {
|
|||||||
//carry hours
|
//carry hours
|
||||||
cur /= 60;
|
cur /= 60;
|
||||||
cur += to->hour;
|
cur += to->hour;
|
||||||
if(cur <= 24) {
|
if (cur <= 24) {
|
||||||
to->hour = cur;
|
to->hour = cur;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
to->hour = ((cur-1) % 24) + 1;
|
to->hour = ((cur - 1) % 24) + 1;
|
||||||
//carry days
|
//carry days
|
||||||
cur = (cur-1) / 24;
|
cur = (cur - 1) / 24;
|
||||||
cur += to->day;
|
cur += to->day;
|
||||||
if(cur <= 28) {
|
if (cur <= 28) {
|
||||||
to->day = cur;
|
to->day = cur;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
to->day = ((cur-1) % 28) + 1;
|
to->day = ((cur - 1) % 28) + 1;
|
||||||
//carry months
|
//carry months
|
||||||
cur = (cur-1) / 28;
|
cur = (cur - 1) / 28;
|
||||||
cur += to->month;
|
cur += to->month;
|
||||||
if(cur <= 12) {
|
if (cur <= 12) {
|
||||||
to->month = cur;
|
to->month = cur;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
to->month = ((cur-1) % 12) + 1;
|
to->month = ((cur - 1) % 12) + 1;
|
||||||
//carry years
|
//carry years
|
||||||
to->year += (cur-1) / 12;
|
to->year += (cur - 1) / 12;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQTime::ToString(TimeOfDay_Struct *t, std::string &str) {
|
void EQTime::ToString(TimeOfDay_Struct *t, std::string &str) {
|
||||||
@ -270,4 +204,3 @@ void EQTime::ToString(TimeOfDay_Struct *t, std::string &str) {
|
|||||||
buf[127] = '\0';
|
buf[127] = '\0';
|
||||||
str = buf;
|
str = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -21,8 +21,8 @@ public:
|
|||||||
~EQTime();
|
~EQTime();
|
||||||
|
|
||||||
//Get functions
|
//Get functions
|
||||||
int getEQTimeOfDay( TimeOfDay_Struct *eqTimeOfDay ) { return(getEQTimeOfDay(time(nullptr), eqTimeOfDay)); }
|
int GetCurrentEQTimeOfDay( TimeOfDay_Struct *eqTimeOfDay ) { return(GetCurrentEQTimeOfDay(time(nullptr), eqTimeOfDay)); }
|
||||||
int getEQTimeOfDay( time_t timeConvert, TimeOfDay_Struct *eqTimeOfDay );
|
int GetCurrentEQTimeOfDay( time_t timeConvert, TimeOfDay_Struct *eqTimeOfDay );
|
||||||
TimeOfDay_Struct getStartEQTime() { return eqTime.start_eqtime; }
|
TimeOfDay_Struct getStartEQTime() { return eqTime.start_eqtime; }
|
||||||
time_t getStartRealTime() { return eqTime.start_realtime; }
|
time_t getStartRealTime() { return eqTime.start_realtime; }
|
||||||
uint32 getEQTimeZone() { return timezone; }
|
uint32 getEQTimeZone() { return timezone; }
|
||||||
@ -30,7 +30,7 @@ public:
|
|||||||
uint32 getEQTimeZoneMin() { return timezone%60; }
|
uint32 getEQTimeZoneMin() { return timezone%60; }
|
||||||
|
|
||||||
//Set functions
|
//Set functions
|
||||||
int setEQTimeOfDay(TimeOfDay_Struct start_eq, time_t start_real);
|
int SetCurrentEQTimeOfDay(TimeOfDay_Struct start_eq, time_t start_real);
|
||||||
void setEQTimeZone(int32 in_timezone) { timezone=in_timezone; }
|
void setEQTimeZone(int32 in_timezone) { timezone=in_timezone; }
|
||||||
|
|
||||||
//Time math/logic functions
|
//Time math/logic functions
|
||||||
@ -39,12 +39,6 @@ public:
|
|||||||
|
|
||||||
static void ToString(TimeOfDay_Struct *t, std::string &str);
|
static void ToString(TimeOfDay_Struct *t, std::string &str);
|
||||||
|
|
||||||
//Database functions
|
|
||||||
//bool loadDB(Database q);
|
|
||||||
//bool setDB(Database q);
|
|
||||||
bool loadFile(const char *filename);
|
|
||||||
bool saveFile(const char *filename);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
//This is our reference clock.
|
//This is our reference clock.
|
||||||
eqTimeOfDay eqTime;
|
eqTimeOfDay eqTime;
|
||||||
|
|||||||
@ -40,7 +40,7 @@ struct ExtendedProfile_Struct {
|
|||||||
uint16 old_pet_hp; /* Not Used */
|
uint16 old_pet_hp; /* Not Used */
|
||||||
uint16 old_pet_mana; /* Not Used */
|
uint16 old_pet_mana; /* Not Used */
|
||||||
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
SpellBuff_Struct pet_buffs[BUFF_COUNT]; /* Not Used */
|
||||||
uint32 pet_items[_MaterialCount]; /* Not Used */
|
EQEmu::TextureShortProfile pet_items; /* Not Used */
|
||||||
char merc_name[64]; /* Used */
|
char merc_name[64]; /* Used */
|
||||||
|
|
||||||
uint32 aa_effects; /* Used */
|
uint32 aa_effects; /* Used */
|
||||||
@ -54,6 +54,8 @@ struct ExtendedProfile_Struct {
|
|||||||
uint32 mercTimerRemaining; /* Not Used */
|
uint32 mercTimerRemaining; /* Not Used */
|
||||||
uint8 mercGender; /* Not Used */
|
uint8 mercGender; /* Not Used */
|
||||||
int32 mercState; /* Not Used */
|
int32 mercState; /* Not Used */
|
||||||
|
uint32 last_invsnapshot_time; /* Used */
|
||||||
|
uint32 next_invsnapshot_time; /* Used */
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|||||||
@ -154,11 +154,12 @@ enum { //reuse times
|
|||||||
enum { //timer settings, all in milliseconds
|
enum { //timer settings, all in milliseconds
|
||||||
AImovement_duration = 100,
|
AImovement_duration = 100,
|
||||||
AIthink_duration = 150,
|
AIthink_duration = 150,
|
||||||
AIscanarea_delay = 500,
|
AIscanarea_delay = 6000,
|
||||||
AIfeignremember_delay = 500,
|
AIfeignremember_delay = 500,
|
||||||
AItarget_check_duration = 500,
|
AItarget_check_duration = 500,
|
||||||
AIClientScanarea_delay = 750, //used in REVERSE_AGGRO
|
AIClientScanarea_delay = 750, //used in REVERSE_AGGRO
|
||||||
AIassistcheck_delay = 3000, //now often a fighting NPC will yell for help
|
AIassistcheck_delay = 3000, //now often a fighting NPC will yell for help
|
||||||
|
AI_check_signal_timer_delay = 500, // How often EVENT_SIGNAL checks are processed
|
||||||
ClientProximity_interval = 150,
|
ClientProximity_interval = 150,
|
||||||
CombatEventTimer_expire = 12000,
|
CombatEventTimer_expire = 12000,
|
||||||
Tribute_duration = 600000,
|
Tribute_duration = 600000,
|
||||||
@ -212,8 +213,8 @@ enum { //some random constants
|
|||||||
#define MAX_NPC_FACTIONS 20
|
#define MAX_NPC_FACTIONS 20
|
||||||
|
|
||||||
//individual faction pool
|
//individual faction pool
|
||||||
#define MAX_PERSONAL_FACTION 1200
|
#define MAX_PERSONAL_FACTION 2000
|
||||||
#define MIN_PERSONAL_FACTION -3000
|
#define MIN_PERSONAL_FACTION -2000
|
||||||
|
|
||||||
//The Level Cap:
|
//The Level Cap:
|
||||||
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
|
//#define LEVEL_CAP RuleI(Character, MaxLevel) //hard cap is 127
|
||||||
@ -232,6 +233,8 @@ enum { //some random constants
|
|||||||
#define GROUP_EXP_PER_POINT 1000
|
#define GROUP_EXP_PER_POINT 1000
|
||||||
#define RAID_EXP_PER_POINT 2000
|
#define RAID_EXP_PER_POINT 2000
|
||||||
|
|
||||||
|
#define ZONE_CONTROLLER_NPC_ID 10
|
||||||
|
|
||||||
//Some hard coded statuses from commands and other places:
|
//Some hard coded statuses from commands and other places:
|
||||||
enum {
|
enum {
|
||||||
minStatusToBeGM = 40,
|
minStatusToBeGM = 40,
|
||||||
@ -270,6 +273,9 @@ enum {
|
|||||||
#define NPC_DEFAULT_LOGGING_ENABLED false
|
#define NPC_DEFAULT_LOGGING_ENABLED false
|
||||||
|
|
||||||
|
|
||||||
|
// This is the item ID we use for say links, we use the max that fits in 5 ASCII chars
|
||||||
|
#define SAYLINK_ITEM_ID 0xFFFFF
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// WHY IS THIS UP HERE
|
||||||
#if defined(_DEBUG) && defined(WIN32)
|
#if defined(_DEBUG) && defined(WIN32)
|
||||||
#ifndef _CRTDBG_MAP_ALLOC
|
#ifndef _CRTDBG_MAP_ALLOC
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -26,16 +27,9 @@
|
|||||||
#ifndef EQDEBUG_H
|
#ifndef EQDEBUG_H
|
||||||
#define EQDEBUG_H
|
#define EQDEBUG_H
|
||||||
|
|
||||||
#define _WINSOCKAPI_ //stupid windows, trying to fix the winsock2 vs. winsock issues
|
|
||||||
#if defined(WIN32) && ( defined(PACKETCOLLECTOR) || defined(COLLECTOR) )
|
|
||||||
// Packet Collector on win32 requires winsock.h due to latest pcap.h
|
|
||||||
// winsock.h must come before windows.h
|
|
||||||
#include <winsock.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <windows.h>
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -179,7 +179,7 @@ BaseGuildManager::GuildInfo *BaseGuildManager::_CreateGuild(uint32 guild_id, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
//make the new entry and store it into the map.
|
//make the new entry and store it into the map.
|
||||||
GuildInfo *info = new GuildInfo;
|
auto info = new GuildInfo;
|
||||||
info->name = guild_name;
|
info->name = guild_name;
|
||||||
info->leader_char_id = leader_char_id;
|
info->leader_char_id = leader_char_id;
|
||||||
info->minstatus = minstatus;
|
info->minstatus = minstatus;
|
||||||
@ -236,9 +236,9 @@ bool BaseGuildManager::_StoreGuildDB(uint32 guild_id) {
|
|||||||
results = m_db->QueryDatabase(query);
|
results = m_db->QueryDatabase(query);
|
||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
char *name_esc = new char[info->name.length()*2+1];
|
auto name_esc = new char[info->name.length() * 2 + 1];
|
||||||
char *motd_esc = new char[info->motd.length()*2+1];
|
auto motd_esc = new char[info->motd.length() * 2 + 1];
|
||||||
char *motd_set_esc = new char[info->motd_setter.length()*2+1];
|
auto motd_set_esc = new char[info->motd_setter.length() * 2 + 1];
|
||||||
m_db->DoEscapeString(name_esc, info->name.c_str(), info->name.length());
|
m_db->DoEscapeString(name_esc, info->name.c_str(), info->name.length());
|
||||||
m_db->DoEscapeString(motd_esc, info->motd.c_str(), info->motd.length());
|
m_db->DoEscapeString(motd_esc, info->motd.c_str(), info->motd.length());
|
||||||
m_db->DoEscapeString(motd_set_esc, info->motd_setter.c_str(), info->motd_setter.length());
|
m_db->DoEscapeString(motd_set_esc, info->motd_setter.c_str(), info->motd_setter.length());
|
||||||
@ -264,7 +264,7 @@ bool BaseGuildManager::_StoreGuildDB(uint32 guild_id) {
|
|||||||
for(rank = 0; rank <= GUILD_MAX_RANK; rank++) {
|
for(rank = 0; rank <= GUILD_MAX_RANK; rank++) {
|
||||||
const RankInfo &rankInfo = info->ranks[rank];
|
const RankInfo &rankInfo = info->ranks[rank];
|
||||||
|
|
||||||
char *title_esc = new char[rankInfo.name.length()*2+1];
|
auto title_esc = new char[rankInfo.name.length() * 2 + 1];
|
||||||
m_db->DoEscapeString(title_esc, rankInfo.name.c_str(), rankInfo.name.length());
|
m_db->DoEscapeString(title_esc, rankInfo.name.c_str(), rankInfo.name.length());
|
||||||
|
|
||||||
query = StringFormat("INSERT INTO guild_ranks "
|
query = StringFormat("INSERT INTO guild_ranks "
|
||||||
@ -564,7 +564,7 @@ bool BaseGuildManager::DBRenameGuild(uint32 guild_id, const char* name) {
|
|||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 len = strlen(name);
|
uint32 len = strlen(name);
|
||||||
char *esc = new char[len*2+1];
|
auto esc = new char[len * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, name, len);
|
m_db->DoEscapeString(esc, name, len);
|
||||||
|
|
||||||
//insert the new `guilds` entry
|
//insert the new `guilds` entry
|
||||||
@ -636,8 +636,8 @@ bool BaseGuildManager::DBSetGuildMOTD(uint32 guild_id, const char* motd, const c
|
|||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 len = strlen(motd);
|
uint32 len = strlen(motd);
|
||||||
uint32 len2 = strlen(setter);
|
uint32 len2 = strlen(setter);
|
||||||
char *esc = new char[len*2+1];
|
auto esc = new char[len * 2 + 1];
|
||||||
char *esc_set = new char[len2*2+1];
|
auto esc_set = new char[len2 * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, motd, len);
|
m_db->DoEscapeString(esc, motd, len);
|
||||||
m_db->DoEscapeString(esc_set, setter, len2);
|
m_db->DoEscapeString(esc_set, setter, len2);
|
||||||
|
|
||||||
@ -675,7 +675,7 @@ bool BaseGuildManager::DBSetGuildURL(uint32 GuildID, const char* URL)
|
|||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 len = strlen(URL);
|
uint32 len = strlen(URL);
|
||||||
char *esc = new char[len*2+1];
|
auto esc = new char[len * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, URL, len);
|
m_db->DoEscapeString(esc, URL, len);
|
||||||
|
|
||||||
std::string query = StringFormat("UPDATE guilds SET url='%s' WHERE id=%d", esc, GuildID);
|
std::string query = StringFormat("UPDATE guilds SET url='%s' WHERE id=%d", esc, GuildID);
|
||||||
@ -709,7 +709,7 @@ bool BaseGuildManager::DBSetGuildChannel(uint32 GuildID, const char* Channel)
|
|||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 len = strlen(Channel);
|
uint32 len = strlen(Channel);
|
||||||
char *esc = new char[len*2+1];
|
auto esc = new char[len * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, Channel, len);
|
m_db->DoEscapeString(esc, Channel, len);
|
||||||
|
|
||||||
std::string query = StringFormat("UPDATE guilds SET channel='%s' WHERE id=%d", esc, GuildID);
|
std::string query = StringFormat("UPDATE guilds SET channel='%s' WHERE id=%d", esc, GuildID);
|
||||||
@ -832,7 +832,7 @@ bool BaseGuildManager::DBSetPublicNote(uint32 charid, const char* note) {
|
|||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 len = strlen(note);
|
uint32 len = strlen(note);
|
||||||
char *esc = new char[len*2+1];
|
auto esc = new char[len * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, note, len);
|
m_db->DoEscapeString(esc, note, len);
|
||||||
|
|
||||||
//insert the new `guilds` entry
|
//insert the new `guilds` entry
|
||||||
@ -867,16 +867,16 @@ bool BaseGuildManager::QueryWithLogging(std::string query, const char *errmsg) {
|
|||||||
//factored out so I dont have to copy this crap.
|
//factored out so I dont have to copy this crap.
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
#define GuildMemberBaseQuery \
|
#define GuildMemberBaseQuery \
|
||||||
"SELECT c.id,c.name,c.class,c.level,c.timelaston,c.zoneid," \
|
"SELECT c.`id`, c.`name`, c.`class`, c.`level`, c.`last_login`, c.`zone_id`," \
|
||||||
" g.guild_id,g.rank,g.tribute_enable,g.total_tribute,g.last_tribute," \
|
" g.`guild_id`, g.`rank`, g.`tribute_enable`, g.`total_tribute`, g.`last_tribute`," \
|
||||||
" g.banker,g.public_note,g.alt" \
|
" g.`banker`, g.`public_note`, g.`alt`" \
|
||||||
" FROM vwBotCharacterMobs AS c LEFT JOIN vwGuildMembers AS g ON c.id=g.char_id AND c.mobtype = g.mobtype "
|
" FROM `vw_bot_character_mobs` AS c LEFT JOIN `vw_guild_members` AS g ON c.`id` = g.`char_id` AND c.`mob_type` = g.`mob_type` "
|
||||||
#else
|
#else
|
||||||
#define GuildMemberBaseQuery \
|
#define GuildMemberBaseQuery \
|
||||||
"SELECT c.id,c.name,c.class,c.level,c.last_login,c.zone_id," \
|
"SELECT c.`id`, c.`name`, c.`class`, c.`level`, c.`last_login`, c.`zone_id`," \
|
||||||
" g.guild_id,g.rank,g.tribute_enable,g.total_tribute,g.last_tribute," \
|
" g.`guild_id`, g.`rank`, g.`tribute_enable`, g.`total_tribute`, g.`last_tribute`," \
|
||||||
" g.banker,g.public_note,g.alt " \
|
" g.`banker`, g.`public_note`, g.`alt` " \
|
||||||
" FROM `character_data` AS c LEFT JOIN guild_members AS g ON c.id=g.char_id "
|
" FROM `character_data` AS c LEFT JOIN `guild_members` AS g ON c.`id` = g.`char_id` "
|
||||||
#endif
|
#endif
|
||||||
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
|
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
|
||||||
//fields from `characer_`
|
//fields from `characer_`
|
||||||
@ -918,8 +918,8 @@ bool BaseGuildManager::GetEntireGuild(uint32 guild_id, std::vector<CharGuildInfo
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
CharGuildInfo *ci = new CharGuildInfo;
|
auto ci = new CharGuildInfo;
|
||||||
ProcessGuildMember(row, *ci);
|
ProcessGuildMember(row, *ci);
|
||||||
members.push_back(ci);
|
members.push_back(ci);
|
||||||
}
|
}
|
||||||
@ -937,7 +937,7 @@ bool BaseGuildManager::GetCharInfo(const char *char_name, CharGuildInfo &into) {
|
|||||||
|
|
||||||
//escape our strings.
|
//escape our strings.
|
||||||
uint32 nl = strlen(char_name);
|
uint32 nl = strlen(char_name);
|
||||||
char *esc = new char[nl*2+1];
|
auto esc = new char[nl * 2 + 1];
|
||||||
m_db->DoEscapeString(esc, char_name, nl);
|
m_db->DoEscapeString(esc, char_name, nl);
|
||||||
|
|
||||||
//load up the rank info for each guild.
|
//load up the rank info for each guild.
|
||||||
@ -969,7 +969,7 @@ bool BaseGuildManager::GetCharInfo(uint32 char_id, CharGuildInfo &into) {
|
|||||||
//load up the rank info for each guild.
|
//load up the rank info for each guild.
|
||||||
std::string query;
|
std::string query;
|
||||||
#ifdef BOTS
|
#ifdef BOTS
|
||||||
query = StringFormat(GuildMemberBaseQuery " WHERE c.id=%d AND c.mobtype = 'C'", char_id);
|
query = StringFormat(GuildMemberBaseQuery " WHERE c.id=%d AND c.mob_type = 'C'", char_id);
|
||||||
#else
|
#else
|
||||||
query = StringFormat(GuildMemberBaseQuery " WHERE c.id=%d", char_id);
|
query = StringFormat(GuildMemberBaseQuery " WHERE c.id=%d", char_id);
|
||||||
#endif
|
#endif
|
||||||
@ -994,7 +994,7 @@ uint8 *BaseGuildManager::MakeGuildList(const char *head_name, uint32 &length) co
|
|||||||
//dynamic structs will make this a lot less painful.
|
//dynamic structs will make this a lot less painful.
|
||||||
|
|
||||||
length = sizeof(GuildsList_Struct);
|
length = sizeof(GuildsList_Struct);
|
||||||
uint8 *buffer = new uint8[length];
|
auto buffer = new uint8[length];
|
||||||
|
|
||||||
//a bit little better than memsetting the whole thing...
|
//a bit little better than memsetting the whole thing...
|
||||||
uint32 r,pos;
|
uint32 r,pos;
|
||||||
|
|||||||
@ -18,7 +18,9 @@
|
|||||||
|
|
||||||
#include "ipc_mutex.h"
|
#include "ipc_mutex.h"
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
#else
|
#else
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
@ -27,7 +29,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "eqemu_exception.h"
|
#include "eqemu_exception.h"
|
||||||
|
#include "eqemu_config.h"
|
||||||
|
|
||||||
namespace EQEmu {
|
namespace EQEmu {
|
||||||
struct IPCMutex::Implementation {
|
struct IPCMutex::Implementation {
|
||||||
@ -41,7 +43,8 @@ namespace EQEmu {
|
|||||||
IPCMutex::IPCMutex(std::string name) : locked_(false) {
|
IPCMutex::IPCMutex(std::string name) : locked_(false) {
|
||||||
imp_ = new Implementation;
|
imp_ = new Implementation;
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
std::string final_name = "EQEmuMutex_";
|
auto Config = EQEmuConfig::get();
|
||||||
|
std::string final_name = Config->SharedMemDir + "EQEmuMutex_";
|
||||||
final_name += name;
|
final_name += name;
|
||||||
|
|
||||||
imp_->mut_ = CreateMutex(nullptr,
|
imp_->mut_ = CreateMutex(nullptr,
|
||||||
@ -52,7 +55,8 @@ namespace EQEmu {
|
|||||||
EQ_EXCEPT("IPC Mutex", "Could not create mutex.");
|
EQ_EXCEPT("IPC Mutex", "Could not create mutex.");
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
std::string final_name = name;
|
auto Config = EQEmuConfig::get();
|
||||||
|
std::string final_name = Config->SharedMemDir + name;
|
||||||
final_name += ".lock";
|
final_name += ".lock";
|
||||||
|
|
||||||
#ifdef __DARWIN
|
#ifdef __DARWIN
|
||||||
|
|||||||
1356
common/item.cpp
1356
common/item.cpp
File diff suppressed because it is too large
Load Diff
160
common/item.h
160
common/item.h
@ -1,5 +1,6 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
/* EQEMu: Everquest Server Emulator
|
||||||
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@ -13,22 +14,26 @@
|
|||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// @merth notes:
|
// @merth notes:
|
||||||
// These classes could be optimized with database reads/writes by storing
|
// These classes could be optimized with database reads/writes by storing
|
||||||
// a status flag indicating how object needs to interact with database
|
// a status flag indicating how object needs to interact with database
|
||||||
|
|
||||||
#ifndef __ITEM_H
|
#ifndef COMMON_ITEM_H
|
||||||
#define __ITEM_H
|
#define COMMON_ITEM_H
|
||||||
|
|
||||||
|
|
||||||
class ItemParse; // Parses item packets
|
class ItemParse; // Parses item packets
|
||||||
class EvolveInfo; // Stores information about an evolving item family
|
class EvolveInfo; // Stores information about an evolving item family
|
||||||
|
|
||||||
#include "../common/eq_constants.h"
|
#include "../common/eq_constants.h"
|
||||||
#include "../common/item_struct.h"
|
#include "../common/item_base.h"
|
||||||
#include "../common/timer.h"
|
#include "../common/timer.h"
|
||||||
|
#include "../common/bodytypes.h"
|
||||||
|
#include "../common/deity.h"
|
||||||
|
#include "../common/memory_buffer.h"
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <map>
|
#include <map>
|
||||||
@ -71,6 +76,7 @@ enum {
|
|||||||
invWhereCursor = 0x20
|
invWhereCursor = 0x20
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class ItemInst;
|
||||||
|
|
||||||
// ########################################
|
// ########################################
|
||||||
// Class: Queue
|
// Class: Queue
|
||||||
@ -114,21 +120,22 @@ public:
|
|||||||
// Public Methods
|
// Public Methods
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
|
|
||||||
Inventory() { m_version = ClientVersion::Unknown; m_versionset = false; }
|
Inventory() { m_inventory_version = EQEmu::versions::InventoryVersion::Unknown; m_inventory_version_set = false; }
|
||||||
~Inventory();
|
~Inventory();
|
||||||
|
|
||||||
// Inventory v2 creep
|
// inv2 creep
|
||||||
bool SetInventoryVersion(ClientVersion version) {
|
bool SetInventoryVersion(EQEmu::versions::InventoryVersion inventory_version) {
|
||||||
if (!m_versionset) {
|
if (!m_inventory_version_set) {
|
||||||
m_version = version;
|
m_inventory_version = EQEmu::versions::ValidateInventoryVersion(inventory_version);
|
||||||
return (m_versionset = true);
|
return (m_inventory_version_set = true);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
bool SetInventoryVersion(EQEmu::versions::ClientVersion client_version) { return SetInventoryVersion(EQEmu::versions::ConvertClientVersionToInventoryVersion(client_version)); }
|
||||||
|
|
||||||
ClientVersion GetInventoryVersion() { return m_version; }
|
EQEmu::versions::InventoryVersion InventoryVersion() { return m_inventory_version; }
|
||||||
|
|
||||||
static void CleanDirty();
|
static void CleanDirty();
|
||||||
static void MarkDirty(ItemInst *inst);
|
static void MarkDirty(ItemInst *inst);
|
||||||
@ -168,7 +175,7 @@ public:
|
|||||||
ItemInst* PopItem(int16 slot_id);
|
ItemInst* PopItem(int16 slot_id);
|
||||||
|
|
||||||
// Check whether there is space for the specified number of the specified item.
|
// Check whether there is space for the specified number of the specified item.
|
||||||
bool HasSpaceForItem(const Item_Struct *ItemToTry, int16 Quantity);
|
bool HasSpaceForItem(const EQEmu::ItemBase *ItemToTry, int16 Quantity);
|
||||||
|
|
||||||
// Check whether item exists in inventory
|
// Check whether item exists in inventory
|
||||||
// where argument specifies OR'd list of invWhere constants to look
|
// where argument specifies OR'd list of invWhere constants to look
|
||||||
@ -193,7 +200,7 @@ public:
|
|||||||
static int16 CalcSlotFromMaterial(uint8 material);
|
static int16 CalcSlotFromMaterial(uint8 material);
|
||||||
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
static uint8 CalcMaterialFromSlot(int16 equipslot);
|
||||||
|
|
||||||
static bool CanItemFitInContainer(const Item_Struct *ItemToTry, const Item_Struct *Container);
|
static bool CanItemFitInContainer(const EQEmu::ItemBase *ItemToTry, const EQEmu::ItemBase *Container);
|
||||||
|
|
||||||
// Test for valid inventory casting slot
|
// Test for valid inventory casting slot
|
||||||
bool SupportsClickCasting(int16 slot_id);
|
bool SupportsClickCasting(int16 slot_id);
|
||||||
@ -251,8 +258,8 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// Active inventory version
|
// Active inventory version
|
||||||
ClientVersion m_version;
|
EQEmu::versions::InventoryVersion m_inventory_version;
|
||||||
bool m_versionset;
|
bool m_inventory_version_set;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SharedDatabase;
|
class SharedDatabase;
|
||||||
@ -270,7 +277,7 @@ public:
|
|||||||
/////////////////////////
|
/////////////////////////
|
||||||
|
|
||||||
// Constructors/Destructor
|
// Constructors/Destructor
|
||||||
ItemInst(const Item_Struct* item = nullptr, int16 charges = 0);
|
ItemInst(const EQEmu::ItemBase* item = nullptr, int16 charges = 0);
|
||||||
|
|
||||||
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
ItemInst(SharedDatabase *db, uint32 item_id, int16 charges = 0);
|
||||||
|
|
||||||
@ -281,7 +288,15 @@ public:
|
|||||||
~ItemInst();
|
~ItemInst();
|
||||||
|
|
||||||
// Query item type
|
// Query item type
|
||||||
bool IsType(ItemClassTypes item_class) const;
|
bool IsType(EQEmu::item::ItemClass item_class) const;
|
||||||
|
|
||||||
|
bool IsClassCommon();
|
||||||
|
bool IsClassBag();
|
||||||
|
bool IsClassBook();
|
||||||
|
|
||||||
|
bool IsClassCommon() const { return const_cast<ItemInst*>(this)->IsClassCommon(); }
|
||||||
|
bool IsClassBag() const { return const_cast<ItemInst*>(this)->IsClassBag(); }
|
||||||
|
bool IsClassBook() const { return const_cast<ItemInst*>(this)->IsClassBook(); }
|
||||||
|
|
||||||
// Can item be stacked?
|
// Can item be stacked?
|
||||||
bool IsStackable() const;
|
bool IsStackable() const;
|
||||||
@ -300,7 +315,7 @@ public:
|
|||||||
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
bool IsAugmentSlotAvailable(int32 augtype, uint8 slot) const;
|
||||||
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : NO_ITEM); }
|
inline int32 GetAugmentType() const { return ((m_item) ? m_item->AugType : NO_ITEM); }
|
||||||
|
|
||||||
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == ET_Expendable ) || (m_item->ItemType == ItemTypePotion)) : false); }
|
inline bool IsExpendable() const { return ((m_item) ? ((m_item->Click.Type == EQEmu::item::ItemEffectExpendable) || (m_item->ItemType == EQEmu::item::ItemTypePotion)) : false); }
|
||||||
|
|
||||||
//
|
//
|
||||||
// Contents
|
// Contents
|
||||||
@ -331,7 +346,7 @@ public:
|
|||||||
bool IsAugmented();
|
bool IsAugmented();
|
||||||
ItemInst* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
ItemInst* GetOrnamentationAug(int32 ornamentationAugtype) const;
|
||||||
bool UpdateOrnamentationInfo();
|
bool UpdateOrnamentationInfo();
|
||||||
static bool CanTransform(const Item_Struct *ItemToTry, const Item_Struct *Container, bool AllowAll = false);
|
static bool CanTransform(const EQEmu::ItemBase *ItemToTry, const EQEmu::ItemBase *Container, bool AllowAll = false);
|
||||||
|
|
||||||
// Has attack/delay?
|
// Has attack/delay?
|
||||||
bool IsWeapon() const;
|
bool IsWeapon() const;
|
||||||
@ -340,8 +355,8 @@ public:
|
|||||||
// Accessors
|
// Accessors
|
||||||
const uint32 GetID() const { return ((m_item) ? m_item->ID : NO_ITEM); }
|
const uint32 GetID() const { return ((m_item) ? m_item->ID : NO_ITEM); }
|
||||||
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : NO_ITEM); }
|
const uint32 GetItemScriptID() const { return ((m_item) ? m_item->ScriptFileID : NO_ITEM); }
|
||||||
const Item_Struct* GetItem() const;
|
const EQEmu::ItemBase* GetItem() const;
|
||||||
const Item_Struct* GetUnscaledItem() const;
|
const EQEmu::ItemBase* GetUnscaledItem() const;
|
||||||
|
|
||||||
int16 GetCharges() const { return m_charges; }
|
int16 GetCharges() const { return m_charges; }
|
||||||
void SetCharges(int16 charges) { m_charges = charges; }
|
void SetCharges(int16 charges) { m_charges = charges; }
|
||||||
@ -409,7 +424,9 @@ public:
|
|||||||
int8 GetMaxEvolveLvl() const;
|
int8 GetMaxEvolveLvl() const;
|
||||||
uint32 GetKillsNeeded(uint8 currentlevel);
|
uint32 GetKillsNeeded(uint8 currentlevel);
|
||||||
|
|
||||||
std::string Serialize(int16 slot_id) const { InternalSerializedItem_Struct s; s.slot_id=slot_id; s.inst=(const void *)this; std::string ser; ser.assign((char *)&s,sizeof(InternalSerializedItem_Struct)); return ser; }
|
std::string Serialize(int16 slot_id) const { EQEmu::InternalSerializedItem_Struct s; s.slot_id = slot_id; s.inst = (const void*)this; std::string ser; ser.assign((char*)&s, sizeof(EQEmu::InternalSerializedItem_Struct)); return ser; }
|
||||||
|
void Serialize(EQEmu::OutBuffer& ob, int16 slot_id) const { EQEmu::InternalSerializedItem_Struct isi; isi.slot_id = slot_id; isi.inst = (const void*)this; ob.write((const char*)&isi, sizeof(isi)); }
|
||||||
|
|
||||||
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
inline int32 GetSerialNumber() const { return m_SerialNumber; }
|
||||||
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
inline void SetSerialNumber(int32 id) { m_SerialNumber = id; }
|
||||||
|
|
||||||
@ -418,6 +435,58 @@ public:
|
|||||||
void StopTimer(std::string name);
|
void StopTimer(std::string name);
|
||||||
void ClearTimers();
|
void ClearTimers();
|
||||||
|
|
||||||
|
// Get a total of a stat, including augs
|
||||||
|
// These functions should be used in place of other code manually totaling
|
||||||
|
// to centralize where it is done to make future changes easier (ex. whenever powersources come around)
|
||||||
|
// and to minimize errors. CalcItemBonuses however doesn't use these in interest of performance
|
||||||
|
// by default these do not recurse into augs
|
||||||
|
int GetItemArmorClass(bool augments = false) const;
|
||||||
|
int GetItemElementalDamage(int &magic, int &fire, int &cold, int &poison, int &disease, int &chromatic, int &prismatic, int &physical, int &corruption, bool augments = false) const;
|
||||||
|
// These two differ in the fact that they're quick checks (they are checked BEFORE the one above
|
||||||
|
int GetItemElementalFlag(bool augments = false) const;
|
||||||
|
int GetItemElementalDamage(bool augments = false) const;
|
||||||
|
int GetItemRecommendedLevel(bool augments = false) const;
|
||||||
|
int GetItemRequiredLevel(bool augments = false) const;
|
||||||
|
int GetItemWeaponDamage(bool augments = false) const;
|
||||||
|
int GetItemBackstabDamage(bool augments = false) const;
|
||||||
|
// these two are just quick checks
|
||||||
|
int GetItemBaneDamageBody(bool augments = false) const;
|
||||||
|
int GetItemBaneDamageRace(bool augments = false) const;
|
||||||
|
int GetItemBaneDamageBody(bodyType against, bool augments = false) const;
|
||||||
|
int GetItemBaneDamageRace(uint16 against, bool augments = false) const;
|
||||||
|
int GetItemMagical(bool augments = false) const;
|
||||||
|
int GetItemHP(bool augments = false) const;
|
||||||
|
int GetItemMana(bool augments = false) const;
|
||||||
|
int GetItemEndur(bool augments = false) const;
|
||||||
|
int GetItemAttack(bool augments = false) const;
|
||||||
|
int GetItemStr(bool augments = false) const;
|
||||||
|
int GetItemSta(bool augments = false) const;
|
||||||
|
int GetItemDex(bool augments = false) const;
|
||||||
|
int GetItemAgi(bool augments = false) const;
|
||||||
|
int GetItemInt(bool augments = false) const;
|
||||||
|
int GetItemWis(bool augments = false) const;
|
||||||
|
int GetItemCha(bool augments = false) const;
|
||||||
|
int GetItemMR(bool augments = false) const;
|
||||||
|
int GetItemFR(bool augments = false) const;
|
||||||
|
int GetItemCR(bool augments = false) const;
|
||||||
|
int GetItemPR(bool augments = false) const;
|
||||||
|
int GetItemDR(bool augments = false) const;
|
||||||
|
int GetItemCorrup(bool augments = false) const;
|
||||||
|
int GetItemHeroicStr(bool augments = false) const;
|
||||||
|
int GetItemHeroicSta(bool augments = false) const;
|
||||||
|
int GetItemHeroicDex(bool augments = false) const;
|
||||||
|
int GetItemHeroicAgi(bool augments = false) const;
|
||||||
|
int GetItemHeroicInt(bool augments = false) const;
|
||||||
|
int GetItemHeroicWis(bool augments = false) const;
|
||||||
|
int GetItemHeroicCha(bool augments = false) const;
|
||||||
|
int GetItemHeroicMR(bool augments = false) const;
|
||||||
|
int GetItemHeroicFR(bool augments = false) const;
|
||||||
|
int GetItemHeroicCR(bool augments = false) const;
|
||||||
|
int GetItemHeroicPR(bool augments = false) const;
|
||||||
|
int GetItemHeroicDR(bool augments = false) const;
|
||||||
|
int GetItemHeroicCorrup(bool augments = false) const;
|
||||||
|
int GetItemHaste(bool augments = false) const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
// Protected Members
|
// Protected Members
|
||||||
@ -431,7 +500,7 @@ protected:
|
|||||||
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
|
void _PutItem(uint8 index, ItemInst* inst) { m_contents[index] = inst; }
|
||||||
|
|
||||||
ItemInstTypes m_use_type; // Usage type for item
|
ItemInstTypes m_use_type; // Usage type for item
|
||||||
const Item_Struct* m_item; // Ptr to item data
|
const EQEmu::ItemBase* m_item; // Ptr to item data
|
||||||
int16 m_charges; // # of charges for chargeable items
|
int16 m_charges; // # of charges for chargeable items
|
||||||
uint32 m_price; // Bazaar /trader price
|
uint32 m_price; // Bazaar /trader price
|
||||||
uint32 m_color;
|
uint32 m_color;
|
||||||
@ -443,7 +512,7 @@ protected:
|
|||||||
uint32 m_exp;
|
uint32 m_exp;
|
||||||
int8 m_evolveLvl;
|
int8 m_evolveLvl;
|
||||||
bool m_activated;
|
bool m_activated;
|
||||||
Item_Struct* m_scaledItem;
|
EQEmu::ItemBase* m_scaledItem;
|
||||||
EvolveInfo* m_evolveInfo;
|
EvolveInfo* m_evolveInfo;
|
||||||
bool m_scaling;
|
bool m_scaling;
|
||||||
uint32 m_ornamenticon;
|
uint32 m_ornamenticon;
|
||||||
@ -472,43 +541,4 @@ public:
|
|||||||
~EvolveInfo();
|
~EvolveInfo();
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LightProfile_Struct
|
#endif /*COMMON_ITEM_H*/
|
||||||
{
|
|
||||||
/*
|
|
||||||
Current criteria (light types):
|
|
||||||
Equipment: { 0 .. 15 }
|
|
||||||
General: { 9 .. 13 }
|
|
||||||
|
|
||||||
Notes:
|
|
||||||
- Initial character load and item movement updates use different light source update behaviors
|
|
||||||
-- Server procedure matches the item movement behavior since most updates occur post-character load
|
|
||||||
- MainAmmo is not considered when determining light sources
|
|
||||||
- No 'Sub' or 'Aug' items are recognized as light sources
|
|
||||||
- Light types '< 9' and '> 13' are not considered for general (carried) light sources
|
|
||||||
- If values > 0x0F are valid, then assignment limiters will need to be removed
|
|
||||||
- MainCursor 'appears' to be a valid light source update slot..but, have not experienced updates during debug sessions
|
|
||||||
- All clients have a bug regarding stackable items (light and sound updates are not processed when picking up an item)
|
|
||||||
-- The timer-based update cancels out the invalid light source
|
|
||||||
*/
|
|
||||||
|
|
||||||
static uint8 TypeToLevel(uint8 lightType);
|
|
||||||
static bool IsLevelGreater(uint8 leftType, uint8 rightType);
|
|
||||||
|
|
||||||
// Light types (classifications)
|
|
||||||
struct {
|
|
||||||
uint8 Innate; // Defined by db field `npc_types`.`light` - where appropriate
|
|
||||||
uint8 Equipment; // Item_Struct::light value of worn/carried equipment
|
|
||||||
uint8 Spell; // Set value of any light-producing spell (can be modded to mimic equip_light behavior)
|
|
||||||
uint8 Active; // Highest value of all light sources
|
|
||||||
} Type;
|
|
||||||
|
|
||||||
// Light levels (intensities) - used to determine which light source should be active
|
|
||||||
struct {
|
|
||||||
uint8 Innate;
|
|
||||||
uint8 Equipment;
|
|
||||||
uint8 Spell;
|
|
||||||
uint8 Active;
|
|
||||||
} Level;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // #define __ITEM_H
|
|
||||||
|
|||||||
209
common/item_base.cpp
Normal file
209
common/item_base.cpp
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "item_base.h"
|
||||||
|
#include "classes.h"
|
||||||
|
#include "races.h"
|
||||||
|
//#include "deity.h"
|
||||||
|
|
||||||
|
|
||||||
|
uint32 EQEmu::item::ConvertAugTypeToAugTypeBit(uint8 aug_type)
|
||||||
|
{
|
||||||
|
switch (aug_type) {
|
||||||
|
case AugTypeGeneralSingleStat:
|
||||||
|
return bit_AugTypeGeneralSingleStat;
|
||||||
|
case AugTypeGeneralMultipleStat:
|
||||||
|
return bit_AugTypeGeneralMultipleStat;
|
||||||
|
case AugTypeGeneralSpellEffect:
|
||||||
|
return bit_AugTypeGeneralSpellEffect;
|
||||||
|
case AugTypeWeaponGeneral:
|
||||||
|
return bit_AugTypeWeaponGeneral;
|
||||||
|
case AugTypeWeaponElemDamage:
|
||||||
|
return bit_AugTypeWeaponElemDamage;
|
||||||
|
case AugTypeWeaponBaseDamage:
|
||||||
|
return bit_AugTypeWeaponBaseDamage;
|
||||||
|
case AugTypeGeneralGroup:
|
||||||
|
return bit_AugTypeGeneralGroup;
|
||||||
|
case AugTypeGeneralRaid:
|
||||||
|
return bit_AugTypeGeneralRaid;
|
||||||
|
case AugTypeGeneralDragonsPoints:
|
||||||
|
return bit_AugTypeGeneralDragonsPoints;
|
||||||
|
case AugTypeCraftedCommon:
|
||||||
|
return bit_AugTypeCraftedCommon;
|
||||||
|
case AugTypeCraftedGroup1:
|
||||||
|
return bit_AugTypeCraftedGroup1;
|
||||||
|
case AugTypeCraftedRaid1:
|
||||||
|
return bit_AugTypeCraftedRaid1;
|
||||||
|
case AugTypeEnergeiacGroup:
|
||||||
|
return bit_AugTypeEnergeiacGroup;
|
||||||
|
case AugTypeEnergeiacRaid:
|
||||||
|
return bit_AugTypeEnergeiacRaid;
|
||||||
|
case AugTypeEmblem:
|
||||||
|
return bit_AugTypeEmblem;
|
||||||
|
case AugTypeCraftedGroup2:
|
||||||
|
return bit_AugTypeCraftedGroup2;
|
||||||
|
case AugTypeCraftedRaid2:
|
||||||
|
return bit_AugTypeCraftedRaid2;
|
||||||
|
case AugTypeUnknown1:
|
||||||
|
return bit_AugTypeUnknown1;
|
||||||
|
case AugTypeUnknown2:
|
||||||
|
return bit_AugTypeUnknown2;
|
||||||
|
case AugTypeOrnamentation:
|
||||||
|
return bit_AugTypeOrnamentation;
|
||||||
|
case AugTypeSpecialOrnamentation:
|
||||||
|
return bit_AugTypeSpecialOrnamentation;
|
||||||
|
case AugTypeUnknown3:
|
||||||
|
return bit_AugTypeUnknown3;
|
||||||
|
case AugTypeUnknown4:
|
||||||
|
return bit_AugTypeUnknown4;
|
||||||
|
case AugTypeUnknown5:
|
||||||
|
return bit_AugTypeUnknown5;
|
||||||
|
case AugTypeUnknown6:
|
||||||
|
return bit_AugTypeUnknown6;
|
||||||
|
case AugTypeUnknown7:
|
||||||
|
return bit_AugTypeUnknown7;
|
||||||
|
case AugTypeUnknown8:
|
||||||
|
return bit_AugTypeUnknown8;
|
||||||
|
case AugTypeUnknown9:
|
||||||
|
return bit_AugTypeUnknown9;
|
||||||
|
case AugTypeUnknown10:
|
||||||
|
return bit_AugTypeUnknown10;
|
||||||
|
case AugTypeEpic2_5:
|
||||||
|
return bit_AugTypeEpic2_5;
|
||||||
|
case AugTypeTest:
|
||||||
|
return bit_AugTypeTest;
|
||||||
|
case AugTypeAll:
|
||||||
|
return bit_AugTypeAll;
|
||||||
|
default:
|
||||||
|
return bit_AugTypeNone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
uint8 EQEmu::item::ConvertAugTypeBitToAugType(uint32 aug_type_bit)
|
||||||
|
{
|
||||||
|
switch (aug_type_bit) {
|
||||||
|
case bit_AugTypeGeneralSingleStat:
|
||||||
|
return AugTypeGeneralSingleStat;
|
||||||
|
case bit_AugTypeGeneralMultipleStat:
|
||||||
|
return AugTypeGeneralMultipleStat;
|
||||||
|
case bit_AugTypeGeneralSpellEffect:
|
||||||
|
return AugTypeGeneralSpellEffect;
|
||||||
|
case bit_AugTypeWeaponGeneral:
|
||||||
|
return AugTypeWeaponGeneral;
|
||||||
|
case bit_AugTypeWeaponElemDamage:
|
||||||
|
return AugTypeWeaponElemDamage;
|
||||||
|
case bit_AugTypeWeaponBaseDamage:
|
||||||
|
return AugTypeWeaponBaseDamage;
|
||||||
|
case bit_AugTypeGeneralGroup:
|
||||||
|
return AugTypeGeneralGroup;
|
||||||
|
case bit_AugTypeGeneralRaid:
|
||||||
|
return AugTypeGeneralRaid;
|
||||||
|
case bit_AugTypeGeneralDragonsPoints:
|
||||||
|
return AugTypeGeneralDragonsPoints;
|
||||||
|
case bit_AugTypeCraftedCommon:
|
||||||
|
return AugTypeCraftedCommon;
|
||||||
|
case bit_AugTypeCraftedGroup1:
|
||||||
|
return AugTypeCraftedGroup1;
|
||||||
|
case bit_AugTypeCraftedRaid1:
|
||||||
|
return AugTypeCraftedRaid1;
|
||||||
|
case bit_AugTypeEnergeiacGroup:
|
||||||
|
return AugTypeEnergeiacGroup;
|
||||||
|
case bit_AugTypeEnergeiacRaid:
|
||||||
|
return AugTypeEnergeiacRaid;
|
||||||
|
case bit_AugTypeEmblem:
|
||||||
|
return AugTypeEmblem;
|
||||||
|
case bit_AugTypeCraftedGroup2:
|
||||||
|
return AugTypeCraftedGroup2;
|
||||||
|
case bit_AugTypeCraftedRaid2:
|
||||||
|
return AugTypeCraftedRaid2;
|
||||||
|
case bit_AugTypeUnknown1:
|
||||||
|
return AugTypeUnknown1;
|
||||||
|
case bit_AugTypeUnknown2:
|
||||||
|
return AugTypeUnknown2;
|
||||||
|
case bit_AugTypeOrnamentation:
|
||||||
|
return AugTypeOrnamentation;
|
||||||
|
case bit_AugTypeSpecialOrnamentation:
|
||||||
|
return AugTypeSpecialOrnamentation;
|
||||||
|
case bit_AugTypeUnknown3:
|
||||||
|
return AugTypeUnknown3;
|
||||||
|
case bit_AugTypeUnknown4:
|
||||||
|
return AugTypeUnknown4;
|
||||||
|
case bit_AugTypeUnknown5:
|
||||||
|
return AugTypeUnknown5;
|
||||||
|
case bit_AugTypeUnknown6:
|
||||||
|
return AugTypeUnknown6;
|
||||||
|
case bit_AugTypeUnknown7:
|
||||||
|
return AugTypeUnknown7;
|
||||||
|
case bit_AugTypeUnknown8:
|
||||||
|
return AugTypeUnknown8;
|
||||||
|
case bit_AugTypeUnknown9:
|
||||||
|
return AugTypeUnknown9;
|
||||||
|
case bit_AugTypeUnknown10:
|
||||||
|
return AugTypeUnknown10;
|
||||||
|
case bit_AugTypeEpic2_5:
|
||||||
|
return AugTypeEpic2_5;
|
||||||
|
case bit_AugTypeTest:
|
||||||
|
return AugTypeTest;
|
||||||
|
case bit_AugTypeAll:
|
||||||
|
return AugTypeAll;
|
||||||
|
default:
|
||||||
|
return AugTypeNone;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsEquipable(uint16 race_id, uint16 class_id)
|
||||||
|
{
|
||||||
|
if (!(Races & GetPlayerRaceBit(race_id)))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (!(Classes & GetPlayerClassBit(GetPlayerClassValue(class_id))))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsClassCommon()
|
||||||
|
{
|
||||||
|
return (ItemClass == item::ItemClassCommon);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsClassBag()
|
||||||
|
{
|
||||||
|
return (ItemClass == item::ItemClassBag);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsClassBook()
|
||||||
|
{
|
||||||
|
return (ItemClass == item::ItemClassBook);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsType1HWeapon()
|
||||||
|
{
|
||||||
|
return ((ItemType == item::ItemType1HBlunt) || (ItemType == item::ItemType1HSlash) || (ItemType == item::ItemType1HPiercing));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsType2HWeapon()
|
||||||
|
{
|
||||||
|
return ((ItemType == item::ItemType2HBlunt) || (ItemType == item::ItemType2HSlash) || (ItemType == item::ItemType2HPiercing));
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::ItemBase::IsTypeShield()
|
||||||
|
{
|
||||||
|
return (ItemType == item::ItemTypeShield);
|
||||||
|
}
|
||||||
565
common/item_base.h
Normal file
565
common/item_base.h
Normal file
@ -0,0 +1,565 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ITEM_BASE_H
|
||||||
|
#define COMMON_ITEM_BASE_H
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Note: (Doodman)
|
||||||
|
* This structure has field names that match the DB name exactly.
|
||||||
|
* Please take care as to not mess this up as it should make
|
||||||
|
* everyones life (i.e. mine) much easier. And the DB names
|
||||||
|
* match the field name from the 13th floor (SEQ) item collectors,
|
||||||
|
* so please maintain that as well.
|
||||||
|
*
|
||||||
|
* Note #2: (Doodman)
|
||||||
|
* UnkXXX fields are left in here for completeness but commented
|
||||||
|
* out since they are really unknown and since the items are now
|
||||||
|
* preserialized they should not be needed. Conversly if they
|
||||||
|
* -are- needed, then they shouldn't be unkown.
|
||||||
|
*
|
||||||
|
* Note #3: (Doodman)
|
||||||
|
* Please take care when adding new found data fields to add them
|
||||||
|
* to the appropriate structure. Item_Struct has elements that are
|
||||||
|
* global to all types of items only.
|
||||||
|
*
|
||||||
|
* Note #4: (Doodman)
|
||||||
|
* Made ya look! Ha!
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "emu_constants.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace item {
|
||||||
|
enum ItemAttributeBit : uint32 {
|
||||||
|
bit_ItemAttributeNone = 0x00000000,
|
||||||
|
bit_ItemAttributeLore = 0x00000001,
|
||||||
|
bit_ItemAttributeArtifact = 0x00000002,
|
||||||
|
bit_ItemAttributeSummoned = 0x00000004,
|
||||||
|
bit_ItemAttributeMagic = 0x00000008,
|
||||||
|
bit_ItemAttributeAugment = 0x00000010,
|
||||||
|
bit_ItemAttributePendingLore = 0x00000020,
|
||||||
|
bit_ItemAttributeUnknown = 0xFFFFFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ItemClass {
|
||||||
|
ItemClassCommon = 0,
|
||||||
|
ItemClassBag,
|
||||||
|
ItemClassBook,
|
||||||
|
ItemClassCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ItemType : uint8 {
|
||||||
|
/*9138*/ ItemType1HSlash = 0,
|
||||||
|
/*9141*/ ItemType2HSlash,
|
||||||
|
/*9140*/ ItemType1HPiercing,
|
||||||
|
/*9139*/ ItemType1HBlunt,
|
||||||
|
/*9142*/ ItemType2HBlunt,
|
||||||
|
/*5504*/ ItemTypeBow, // 5
|
||||||
|
/*----*/ ItemTypeUnknown1,
|
||||||
|
/*----*/ ItemTypeLargeThrowing,
|
||||||
|
/*5505*/ ItemTypeShield,
|
||||||
|
/*5506*/ ItemTypeScroll,
|
||||||
|
/*5507*/ ItemTypeArmor, // 10
|
||||||
|
/*5508*/ ItemTypeMisc, // a lot of random crap has this item use.
|
||||||
|
/*7564*/ ItemTypeLockPick,
|
||||||
|
/*----*/ ItemTypeUnknown2,
|
||||||
|
/*5509*/ ItemTypeFood,
|
||||||
|
/*5510*/ ItemTypeDrink, // 15
|
||||||
|
/*5511*/ ItemTypeLight,
|
||||||
|
/*5512*/ ItemTypeCombinable, // not all stackable items are this use...
|
||||||
|
/*5513*/ ItemTypeBandage,
|
||||||
|
/*----*/ ItemTypeSmallThrowing,
|
||||||
|
/*----*/ ItemTypeSpell, // 20 // spells and tomes
|
||||||
|
/*5514*/ ItemTypePotion,
|
||||||
|
/*----*/ ItemTypeUnknown3,
|
||||||
|
/*0406*/ ItemTypeWindInstrument,
|
||||||
|
/*0407*/ ItemTypeStringedInstrument,
|
||||||
|
/*0408*/ ItemTypeBrassInstrument, // 25
|
||||||
|
/*0405*/ ItemTypePercussionInstrument,
|
||||||
|
/*5515*/ ItemTypeArrow,
|
||||||
|
/*----*/ ItemTypeUnknown4,
|
||||||
|
/*5521*/ ItemTypeJewelry,
|
||||||
|
/*----*/ ItemTypeSkull, // 30
|
||||||
|
/*5516*/ ItemTypeBook, // skill-up tomes/books? (would probably need a pp flag if true...)
|
||||||
|
/*5517*/ ItemTypeNote,
|
||||||
|
/*5518*/ ItemTypeKey,
|
||||||
|
/*----*/ ItemTypeCoin,
|
||||||
|
/*5520*/ ItemType2HPiercing, // 35
|
||||||
|
/*----*/ ItemTypeFishingPole,
|
||||||
|
/*----*/ ItemTypeFishingBait,
|
||||||
|
/*5519*/ ItemTypeAlcohol,
|
||||||
|
/*----*/ ItemTypeKey2, // keys and satchels?? (questable keys?)
|
||||||
|
/*----*/ ItemTypeCompass, // 40
|
||||||
|
/*----*/ ItemTypeUnknown5,
|
||||||
|
/*----*/ ItemTypePoison, // might be wrong, but includes poisons
|
||||||
|
/*----*/ ItemTypeUnknown6,
|
||||||
|
/*----*/ ItemTypeUnknown7,
|
||||||
|
/*5522*/ ItemTypeMartial, // 45
|
||||||
|
/*----*/ ItemTypeUnknown8,
|
||||||
|
/*----*/ ItemTypeUnknown9,
|
||||||
|
/*----*/ ItemTypeUnknown10,
|
||||||
|
/*----*/ ItemTypeUnknown11,
|
||||||
|
/*----*/ ItemTypeSinging, // 50
|
||||||
|
/*5750*/ ItemTypeAllInstrumentTypes,
|
||||||
|
/*5776*/ ItemTypeCharm,
|
||||||
|
/*----*/ ItemTypeDye,
|
||||||
|
/*----*/ ItemTypeAugmentation,
|
||||||
|
/*----*/ ItemTypeAugmentationSolvent, // 55
|
||||||
|
/*----*/ ItemTypeAugmentationDistiller,
|
||||||
|
/*----*/ ItemTypeUnknown12,
|
||||||
|
/*----*/ ItemTypeFellowshipKit,
|
||||||
|
/*----*/ ItemTypeUnknown13,
|
||||||
|
/*----*/ ItemTypeRecipe, // 60
|
||||||
|
/*----*/ ItemTypeAdvancedRecipe,
|
||||||
|
/*----*/ ItemTypeJournal, // only one(1) database entry
|
||||||
|
/*----*/ ItemTypeAltCurrency, // alt-currency (as opposed to coinage)
|
||||||
|
/*5881*/ ItemTypePerfectedAugmentationDistiller,
|
||||||
|
/*----*/ ItemTypeCount
|
||||||
|
|
||||||
|
/*
|
||||||
|
Unknowns:
|
||||||
|
|
||||||
|
Mounts?
|
||||||
|
Ornamentations?
|
||||||
|
GuildBanners?
|
||||||
|
Collectible?
|
||||||
|
Placeable?
|
||||||
|
(others?)
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AugTypeBit : uint32 {
|
||||||
|
bit_AugTypeNone = 0x00000000,
|
||||||
|
bit_AugTypeGeneralSingleStat = 0x00000001, /*1^16^1 (General: Single Stat)^0*/
|
||||||
|
bit_AugTypeGeneralMultipleStat = 0x00000002, /*2^16^2 (General: Multiple Stat)^0*/
|
||||||
|
bit_AugTypeGeneralSpellEffect = 0x00000004, /*3^16^3 (General: Spell Effect)^0*/
|
||||||
|
bit_AugTypeWeaponGeneral = 0x00000008, /*4^16^4 (Weapon: General)^0*/
|
||||||
|
bit_AugTypeWeaponElemDamage = 0x00000010, /*5^16^5 (Weapon: Elem Damage)^0*/
|
||||||
|
bit_AugTypeWeaponBaseDamage = 0x00000020, /*6^16^6 (Weapon: Base Damage)^0*/
|
||||||
|
bit_AugTypeGeneralGroup = 0x00000040, /*7^16^7 (General: Group)^0*/
|
||||||
|
bit_AugTypeGeneralRaid = 0x00000080, /*8^16^8 (General: Raid)^0*/
|
||||||
|
bit_AugTypeGeneralDragonsPoints = 0x00000100, /*9^16^9 (General: Dragons Points)^0*/
|
||||||
|
bit_AugTypeCraftedCommon = 0x00000200, /*10^16^10 (Crafted: Common)^0*/
|
||||||
|
bit_AugTypeCraftedGroup1 = 0x00000400, /*11^16^11 (Crafted: Group)^0*/
|
||||||
|
bit_AugTypeCraftedRaid1 = 0x00000800, /*12^16^12 (Crafted: Raid)^0*/
|
||||||
|
bit_AugTypeEnergeiacGroup = 0x00001000, /*13^16^13 (Energeiac: Group)^0*/
|
||||||
|
bit_AugTypeEnergeiacRaid = 0x00002000, /*14^16^14 (Energeiac: Raid)^0*/
|
||||||
|
bit_AugTypeEmblem = 0x00004000, /*15^16^15 (Emblem)^0*/
|
||||||
|
bit_AugTypeCraftedGroup2 = 0x00008000, /*16^16^16 (Crafted: Group)^0*/
|
||||||
|
bit_AugTypeCraftedRaid2 = 0x00010000, /*17^16^17 (Crafted: Raid)^0*/
|
||||||
|
bit_AugTypeUnknown1 = 0x00020000, /*18^16^18^0*/
|
||||||
|
bit_AugTypeUnknown2 = 0x00040000, /*19^16^19^0*/
|
||||||
|
bit_AugTypeOrnamentation = 0x00080000, /*20^16^20 (Ornamentation)^0*/
|
||||||
|
bit_AugTypeSpecialOrnamentation = 0x00100000, /*21^16^21 (Special Ornamentation)^0*/
|
||||||
|
bit_AugTypeUnknown3 = 0x00200000, /*22^16^22^0*/
|
||||||
|
bit_AugTypeUnknown4 = 0x00400000, /*23^16^23^0*/
|
||||||
|
bit_AugTypeUnknown5 = 0x00800000, /*24^16^24^0*/
|
||||||
|
bit_AugTypeUnknown6 = 0x01000000, /*25^16^25^0*/
|
||||||
|
bit_AugTypeUnknown7 = 0x02000000, /*26^16^26^0*/
|
||||||
|
bit_AugTypeUnknown8 = 0x04000000, /*27^16^27^0*/
|
||||||
|
bit_AugTypeUnknown9 = 0x08000000, /*28^16^28^0*/
|
||||||
|
bit_AugTypeUnknown10 = 0x10000000, /*29^16^29^0*/
|
||||||
|
bit_AugTypeEpic2_5 = 0x20000000, /*30^16^30^0*/
|
||||||
|
bit_AugTypeTest = 0x40000000, /*31^16^Test^0*/ // listed as 31^16^31^0 in 5-10 client
|
||||||
|
bit_AugTypeAll = 0xFFFFFFFF
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AugType : uint8 {
|
||||||
|
AugTypeNone = 0,
|
||||||
|
AugTypeGeneralSingleStat,
|
||||||
|
AugTypeGeneralMultipleStat,
|
||||||
|
AugTypeGeneralSpellEffect,
|
||||||
|
AugTypeWeaponGeneral,
|
||||||
|
AugTypeWeaponElemDamage, // 5
|
||||||
|
AugTypeWeaponBaseDamage,
|
||||||
|
AugTypeGeneralGroup,
|
||||||
|
AugTypeGeneralRaid,
|
||||||
|
AugTypeGeneralDragonsPoints,
|
||||||
|
AugTypeCraftedCommon, // 10
|
||||||
|
AugTypeCraftedGroup1,
|
||||||
|
AugTypeCraftedRaid1,
|
||||||
|
AugTypeEnergeiacGroup,
|
||||||
|
AugTypeEnergeiacRaid,
|
||||||
|
AugTypeEmblem, // 15
|
||||||
|
AugTypeCraftedGroup2,
|
||||||
|
AugTypeCraftedRaid2,
|
||||||
|
AugTypeUnknown1,
|
||||||
|
AugTypeUnknown2,
|
||||||
|
AugTypeOrnamentation, // 20
|
||||||
|
AugTypeSpecialOrnamentation,
|
||||||
|
AugTypeUnknown3,
|
||||||
|
AugTypeUnknown4,
|
||||||
|
AugTypeUnknown5,
|
||||||
|
AugTypeUnknown6, // 25
|
||||||
|
AugTypeUnknown7,
|
||||||
|
AugTypeUnknown8,
|
||||||
|
AugTypeUnknown9,
|
||||||
|
AugTypeUnknown10,
|
||||||
|
AugTypeEpic2_5, // 30
|
||||||
|
AugTypeTest,
|
||||||
|
AugTypeCount,
|
||||||
|
AugTypeAll = 255
|
||||||
|
};
|
||||||
|
|
||||||
|
enum AugRestriction : uint8 {
|
||||||
|
/*4690*/ AugRestrictionAny = 0,
|
||||||
|
/*9134*/ AugRestrictionArmor,
|
||||||
|
/*9135*/ AugRestrictionWeapons,
|
||||||
|
/*9136*/ AugRestriction1HWeapons,
|
||||||
|
/*9137*/ AugRestriction2HWeapons,
|
||||||
|
/*9138*/ AugRestriction1HSlash, // 5
|
||||||
|
/*9139*/ AugRestriction1HBlunt,
|
||||||
|
/*9140*/ AugRestrictionPiercing,
|
||||||
|
/*9148*/ AugRestrictionHandToHand,
|
||||||
|
/*9141*/ AugRestriction2HSlash,
|
||||||
|
/*9142*/ AugRestriction2HBlunt, // 10
|
||||||
|
/*9143*/ AugRestriction2HPierce,
|
||||||
|
/*9144*/ AugRestrictionBows,
|
||||||
|
/*9145*/ AugRestrictionShields,
|
||||||
|
/*8052*/ AugRestriction1HSlash1HBluntOrHandToHand,
|
||||||
|
/*9200*/ AugRestriction1HBluntOrHandToHand, // 15 // no listed peq entries
|
||||||
|
|
||||||
|
// these three appear to be post-RoF (12-10-2012) and can not be verified until RoF (05-10-2013) is supported
|
||||||
|
/*????*/ AugRestrictionUnknown1,
|
||||||
|
/*????*/ AugRestrictionUnknown2,
|
||||||
|
/*????*/ AugRestrictionUnknown3, // last value in peq entries
|
||||||
|
AugRestrictionCount
|
||||||
|
|
||||||
|
/*4687*/ //AugTypeAllItems, // ?? unknown atm
|
||||||
|
/*4688*/ //AugTypePrestige, // ?? unknown atm
|
||||||
|
/*4689*/ //AugTypeNonPrestige, // ?? unknown atm
|
||||||
|
};
|
||||||
|
|
||||||
|
enum BagType : uint8 {
|
||||||
|
/*3400*/ BagTypeSmallBag = 0,
|
||||||
|
/*3401*/ BagTypeLargeBag,
|
||||||
|
/*3402*/ BagTypeQuiver,
|
||||||
|
/*3403*/ BagTypeBeltPouch,
|
||||||
|
/*3404*/ BagTypeWristPouch,
|
||||||
|
/*3405*/ BagTypeBackPack, // 5
|
||||||
|
/*3406*/ BagTypeSmallChest,
|
||||||
|
/*3407*/ BagTypeLargeChest,
|
||||||
|
/*----*/ BagTypeBandolier, // <*Database Reference Only>
|
||||||
|
/*3408*/ BagTypeMedicineBag,
|
||||||
|
/*3409*/ BagTypeToolBox, // 10
|
||||||
|
/*3410*/ BagTypeLexicon,
|
||||||
|
/*3411*/ BagTypeMortar,
|
||||||
|
/*3412*/ BagTypeSelfDusting, // Quest container (Auto-clear contents?)
|
||||||
|
/*3413*/ BagTypeMixingBowl,
|
||||||
|
/*3414*/ BagTypeOven, // 15
|
||||||
|
/*3415*/ BagTypeSewingKit,
|
||||||
|
/*3416*/ BagTypeForge,
|
||||||
|
/*3417*/ BagTypeFletchingKit,
|
||||||
|
/*3418*/ BagTypeBrewBarrel,
|
||||||
|
/*3419*/ BagTypeJewelersKit, // 20
|
||||||
|
/*3420*/ BagTypePotteryWheel,
|
||||||
|
/*3421*/ BagTypeKiln,
|
||||||
|
/*3422*/ BagTypeKeymaker, // (no database entries as of peq rev 69)
|
||||||
|
/*3423*/ BagTypeWizardsLexicon,
|
||||||
|
/*3424*/ BagTypeMagesLexicon, // 25
|
||||||
|
/*3425*/ BagTypeNecromancersLexicon,
|
||||||
|
/*3426*/ BagTypeEnchantersLexicon,
|
||||||
|
/*----*/ BagTypeUnknown1, // (a coin pouch/purse?) (no database entries as of peq rev 69)
|
||||||
|
/*----*/ BagTypeConcordanceofResearch, // <*Database Reference Only>
|
||||||
|
/*3427*/ BagTypeAlwaysWorks, // 30 // Quest container (Never-fail combines?)
|
||||||
|
/*3428*/ BagTypeKoadaDalForge, // High Elf
|
||||||
|
/*3429*/ BagTypeTeirDalForge, // Dark Elf
|
||||||
|
/*3430*/ BagTypeOggokForge, // Ogre
|
||||||
|
/*3431*/ BagTypeStormguardForge, // Dwarf
|
||||||
|
/*3432*/ BagTypeAkanonForge, // 35 // Gnome
|
||||||
|
/*3433*/ BagTypeNorthmanForge, // Barbarian
|
||||||
|
/*----*/ BagTypeUnknown2, // (no database entries as of peq rev 69)
|
||||||
|
/*3434*/ BagTypeCabilisForge, // Iksar
|
||||||
|
/*3435*/ BagTypeFreeportForge, // Human 1
|
||||||
|
/*3436*/ BagTypeRoyalQeynosForge, // 40 // Human 2
|
||||||
|
/*3439*/ BagTypeHalflingTailoringKit,
|
||||||
|
/*3438*/ BagTypeErudTailoringKit,
|
||||||
|
/*3440*/ BagTypeFierDalTailoringKit, // Wood Elf
|
||||||
|
/*3441*/ BagTypeFierDalFletchingKit, // Wood Elf
|
||||||
|
/*3437*/ BagTypeIksarPotteryWheel, // 45
|
||||||
|
/*3442*/ BagTypeTackleBox,
|
||||||
|
/*3443*/ BagTypeTrollForge,
|
||||||
|
/*3445*/ BagTypeFierDalForge, // Wood Elf
|
||||||
|
/*3444*/ BagTypeValeForge, // Halfling
|
||||||
|
/*3446*/ BagTypeErudForge, // 50
|
||||||
|
/*----*/ BagTypeTradersSatchel, // <*Database Reference Only> (db: Yellow Trader's Satchel Token?)
|
||||||
|
/*5785*/ BagTypeGuktaForge, // Froglok (no database entries as of peq rev 69)
|
||||||
|
/*3359*/ BagTypeAugmentationSealer,
|
||||||
|
/*----*/ BagTypeIceCreamChurn, // <*Database Reference Only>
|
||||||
|
/*6325*/ BagTypeTransformationmold, // 55 // Ornamentation
|
||||||
|
/*6340*/ BagTypeDetransformationmold, // Ornamentation Stripper
|
||||||
|
/*5400*/ BagTypeUnattuner,
|
||||||
|
/*7684*/ BagTypeTradeskillBag,
|
||||||
|
/*7692*/ BagTypeCollectibleBag,
|
||||||
|
/*----*/ BagTypeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ItemEffect {
|
||||||
|
ItemEffectCombatProc = 0,
|
||||||
|
ItemEffectClick,
|
||||||
|
ItemEffectWorn,
|
||||||
|
ItemEffectExpendable,
|
||||||
|
ItemEffectEquipClick,
|
||||||
|
ItemEffectClick2, //5 //name unknown
|
||||||
|
ItemEffectFocus,
|
||||||
|
ItemEffectScroll,
|
||||||
|
ItemEffectCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ItemSize : uint8 {
|
||||||
|
ItemSizeTiny = 0,
|
||||||
|
ItemSizeSmall,
|
||||||
|
ItemSizeMedium,
|
||||||
|
ItemSizeLarge,
|
||||||
|
ItemSizeGiant,
|
||||||
|
ItemSizeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum ItemDataType : uint8 {
|
||||||
|
ItemDataBase = 0,
|
||||||
|
ItemDataScaling,
|
||||||
|
ItemDataEvolving,
|
||||||
|
ItemDataCount
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ItemEffect_Struct {
|
||||||
|
int16 Effect;
|
||||||
|
uint8 Type;
|
||||||
|
uint8 Level;
|
||||||
|
uint8 Level2;
|
||||||
|
//MaxCharges
|
||||||
|
//CastTime
|
||||||
|
//RecastDelay
|
||||||
|
//RecastType
|
||||||
|
//ProcRate
|
||||||
|
};
|
||||||
|
|
||||||
|
extern uint32 ConvertAugTypeToAugTypeBit(uint8 aug_type);
|
||||||
|
extern uint8 ConvertAugTypeBitToAugType(uint32 aug_type_bit);
|
||||||
|
|
||||||
|
} /*item*/
|
||||||
|
|
||||||
|
struct InternalSerializedItem_Struct {
|
||||||
|
int16 slot_id;
|
||||||
|
const void * inst;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct ItemBase {
|
||||||
|
// Non packet based fields
|
||||||
|
uint8 MinStatus;
|
||||||
|
uint8 ItemDataType; // memset to item::ItemDataBase ('0') during mmf load
|
||||||
|
|
||||||
|
// Packet based fields
|
||||||
|
uint8 ItemClass; // Item Type: 0=common, 1=container, 2=book
|
||||||
|
char Name[64]; // Name
|
||||||
|
char Lore[80]; // Lore Name: *=lore, &=summoned, #=artifact, ~=pending lore
|
||||||
|
char IDFile[30]; // Visible model
|
||||||
|
uint32 ID; // Unique ID (also PK for DB)
|
||||||
|
int32 Weight; // Item weight * 10
|
||||||
|
uint8 NoRent; // No Rent: 0=norent, 255=not norent
|
||||||
|
uint8 NoDrop; // No Drop: 0=nodrop, 255=not nodrop
|
||||||
|
uint8 Size; // Size: 0=tiny, 1=small, 2=medium, 3=large, 4=giant
|
||||||
|
uint32 Slots; // Bitfield for which slots this item can be used in
|
||||||
|
uint32 Price; // Item cost (?)
|
||||||
|
uint32 Icon; // Icon Number
|
||||||
|
uint32 LoreGroup; // Later items use LoreGroup instead of LoreFlag. we might want to see about changing this to int32 since it is commonly -1 and is constantly being cast from signed (-1) to unsigned (4294967295)
|
||||||
|
bool LoreFlag; // This will be true if LoreGroup is non-zero
|
||||||
|
bool PendingLoreFlag;
|
||||||
|
bool ArtifactFlag;
|
||||||
|
bool SummonedFlag;
|
||||||
|
uint8 FVNoDrop; // Firiona Vie nodrop flag
|
||||||
|
uint32 Favor; // Individual favor
|
||||||
|
uint32 GuildFavor; // Guild favor
|
||||||
|
uint32 PointType;
|
||||||
|
|
||||||
|
//uint32 Unk117;
|
||||||
|
//uint32 Unk118;
|
||||||
|
//uint32 Unk121;
|
||||||
|
//uint32 Unk124;
|
||||||
|
|
||||||
|
uint8 BagType; // 0:Small Bag, 1:Large Bag, 2:Quiver, 3:Belt Pouch ... there are 50 types
|
||||||
|
uint8 BagSlots; // Number of slots: can only be 2, 4, 6, 8, or 10
|
||||||
|
uint8 BagSize; // 0:TINY, 1:SMALL, 2:MEDIUM, 3:LARGE, 4:GIANT
|
||||||
|
uint8 BagWR; // 0->100
|
||||||
|
|
||||||
|
bool BenefitFlag;
|
||||||
|
bool Tradeskills; // Is this a tradeskill item?
|
||||||
|
int8 CR; // Save vs Cold
|
||||||
|
int8 DR; // Save vs Disease
|
||||||
|
int8 PR; // Save vs Poison
|
||||||
|
int8 MR; // Save vs Magic
|
||||||
|
int8 FR; // Save vs Fire
|
||||||
|
int8 AStr; // Strength
|
||||||
|
int8 ASta; // Stamina
|
||||||
|
int8 AAgi; // Agility
|
||||||
|
int8 ADex; // Dexterity
|
||||||
|
int8 ACha; // Charisma
|
||||||
|
int8 AInt; // Intelligence
|
||||||
|
int8 AWis; // Wisdom
|
||||||
|
int32 HP; // HP
|
||||||
|
int32 Mana; // Mana
|
||||||
|
int32 AC; // AC
|
||||||
|
uint32 Deity; // Bitmask of Deities that can equip this item
|
||||||
|
//uint32 Unk033
|
||||||
|
int32 SkillModValue; // % Mod to skill specified in SkillModType
|
||||||
|
int32 SkillModMax; // Max skill point modification
|
||||||
|
uint32 SkillModType; // Type of skill for SkillModValue to apply to
|
||||||
|
uint32 BaneDmgRace; // Bane Damage Race
|
||||||
|
int8 BaneDmgAmt; // Bane Damage Body Amount
|
||||||
|
uint32 BaneDmgBody; // Bane Damage Body
|
||||||
|
bool Magic; // True=Magic Item, False=not
|
||||||
|
int32 CastTime_;
|
||||||
|
uint8 ReqLevel; // Required Level to use item
|
||||||
|
uint32 BardType; // Bard Skill Type
|
||||||
|
int32 BardValue; // Bard Skill Amount
|
||||||
|
int8 Light; // Light
|
||||||
|
uint8 Delay; // Delay * 10
|
||||||
|
uint8 RecLevel; // Recommended level to use item
|
||||||
|
uint8 RecSkill; // Recommended skill to use item (refers to primary skill of item)
|
||||||
|
uint8 ElemDmgType; // Elemental Damage Type (1=magic, 2=fire)
|
||||||
|
uint8 ElemDmgAmt; // Elemental Damage
|
||||||
|
uint8 Range; // Range of item
|
||||||
|
uint32 Damage; // Delay between item usage (in 0.1 sec increments)
|
||||||
|
uint32 Color; // RR GG BB 00 <-- as it appears in pc
|
||||||
|
uint32 Classes; // Bitfield of classes that can equip item (1 << class#)
|
||||||
|
uint32 Races; // Bitfield of races that can equip item (1 << race#)
|
||||||
|
//uint32 Unk054;
|
||||||
|
int16 MaxCharges; // Maximum charges items can hold: -1 if not a chargeable item
|
||||||
|
uint8 ItemType; // Item Type/Skill (itemClass* from above)
|
||||||
|
uint8 Material; // Item material type
|
||||||
|
uint32 HerosForgeModel;// Hero's Forge Armor Model Type (2-13?)
|
||||||
|
float SellRate; // Sell rate
|
||||||
|
//uint32 Unk059;
|
||||||
|
union {
|
||||||
|
uint32 Fulfilment; // Food fulfilment (How long it lasts)
|
||||||
|
uint32 CastTime; // Cast Time for clicky effects, in milliseconds
|
||||||
|
};
|
||||||
|
uint32 EliteMaterial;
|
||||||
|
int32 ProcRate;
|
||||||
|
int8 CombatEffects; // PoP: Combat Effects +
|
||||||
|
int8 Shielding; // PoP: Shielding %
|
||||||
|
int8 StunResist; // PoP: Stun Resist %
|
||||||
|
int8 StrikeThrough; // PoP: Strike Through %
|
||||||
|
uint32 ExtraDmgSkill;
|
||||||
|
uint32 ExtraDmgAmt;
|
||||||
|
int8 SpellShield; // PoP: Spell Shield %
|
||||||
|
int8 Avoidance; // PoP: Avoidance +
|
||||||
|
int8 Accuracy; // PoP: Accuracy +
|
||||||
|
uint32 CharmFileID;
|
||||||
|
int32 FactionMod1; // Faction Mod 1
|
||||||
|
int32 FactionMod2; // Faction Mod 2
|
||||||
|
int32 FactionMod3; // Faction Mod 3
|
||||||
|
int32 FactionMod4; // Faction Mod 4
|
||||||
|
int32 FactionAmt1; // Faction Amt 1
|
||||||
|
int32 FactionAmt2; // Faction Amt 2
|
||||||
|
int32 FactionAmt3; // Faction Amt 3
|
||||||
|
int32 FactionAmt4; // Faction Amt 4
|
||||||
|
char CharmFile[32]; // ?
|
||||||
|
uint32 AugType;
|
||||||
|
uint8 AugSlotType[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
||||||
|
uint8 AugSlotVisible[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
||||||
|
uint8 AugSlotUnk2[EQEmu::legacy::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown Most likely Powersource related
|
||||||
|
uint32 LDoNTheme;
|
||||||
|
uint32 LDoNPrice;
|
||||||
|
uint32 LDoNSold;
|
||||||
|
uint32 BaneDmgRaceAmt;
|
||||||
|
uint32 AugRestrict;
|
||||||
|
uint32 Endur;
|
||||||
|
uint32 DotShielding;
|
||||||
|
uint32 Attack;
|
||||||
|
uint32 Regen;
|
||||||
|
uint32 ManaRegen;
|
||||||
|
uint32 EnduranceRegen;
|
||||||
|
uint32 Haste;
|
||||||
|
uint32 DamageShield;
|
||||||
|
uint32 RecastDelay;
|
||||||
|
uint32 RecastType;
|
||||||
|
uint32 AugDistiller;
|
||||||
|
bool Attuneable;
|
||||||
|
bool NoPet;
|
||||||
|
bool PotionBelt;
|
||||||
|
bool Stackable;
|
||||||
|
bool NoTransfer;
|
||||||
|
bool QuestItemFlag;
|
||||||
|
int16 StackSize;
|
||||||
|
uint8 PotionBeltSlots;
|
||||||
|
item::ItemEffect_Struct Click, Proc, Worn, Focus, Scroll, Bard;
|
||||||
|
|
||||||
|
uint8 Book; // 0=Not book, 1=Book
|
||||||
|
uint32 BookType;
|
||||||
|
char Filename[33]; // Filename for book data
|
||||||
|
// Begin SoF Fields
|
||||||
|
int32 SVCorruption;
|
||||||
|
uint32 Purity;
|
||||||
|
uint8 EvolvingItem;
|
||||||
|
uint32 EvolvingID;
|
||||||
|
uint8 EvolvingLevel;
|
||||||
|
uint8 EvolvingMax;
|
||||||
|
uint32 BackstabDmg;
|
||||||
|
uint32 DSMitigation;
|
||||||
|
int32 HeroicStr;
|
||||||
|
int32 HeroicInt;
|
||||||
|
int32 HeroicWis;
|
||||||
|
int32 HeroicAgi;
|
||||||
|
int32 HeroicDex;
|
||||||
|
int32 HeroicSta;
|
||||||
|
int32 HeroicCha;
|
||||||
|
int32 HeroicMR;
|
||||||
|
int32 HeroicFR;
|
||||||
|
int32 HeroicCR;
|
||||||
|
int32 HeroicDR;
|
||||||
|
int32 HeroicPR;
|
||||||
|
int32 HeroicSVCorrup;
|
||||||
|
int32 HealAmt;
|
||||||
|
int32 SpellDmg;
|
||||||
|
uint32 LDoNSellBackRate;
|
||||||
|
uint32 ScriptFileID;
|
||||||
|
uint16 ExpendableArrow;
|
||||||
|
uint32 Clairvoyance;
|
||||||
|
char ClickName[65];
|
||||||
|
char ProcName[65];
|
||||||
|
char WornName[65];
|
||||||
|
char FocusName[65];
|
||||||
|
char ScrollName[65];
|
||||||
|
//BardName
|
||||||
|
|
||||||
|
bool IsEquipable(uint16 Race, uint16 Class);
|
||||||
|
bool IsClassCommon();
|
||||||
|
bool IsClassBag();
|
||||||
|
bool IsClassBook();
|
||||||
|
bool IsType1HWeapon();
|
||||||
|
bool IsType2HWeapon();
|
||||||
|
bool IsTypeShield();
|
||||||
|
|
||||||
|
bool IsEquipable(uint16 Race, uint16 Class) const { return const_cast<ItemBase*>(this)->IsEquipable(Race, Class); }
|
||||||
|
bool IsClassCommon() const { return const_cast<ItemBase*>(this)->IsClassCommon(); }
|
||||||
|
bool IsClassBag() const { return const_cast<ItemBase*>(this)->IsClassBag(); }
|
||||||
|
bool IsClassBook() const { return const_cast<ItemBase*>(this)->IsClassBook(); }
|
||||||
|
bool IsType1HWeapon() const { return const_cast<ItemBase*>(this)->IsType1HWeapon(); }
|
||||||
|
bool IsType2HWeapon() const { return const_cast<ItemBase*>(this)->IsType2HWeapon(); }
|
||||||
|
bool IsTypeShield() const { return const_cast<ItemBase*>(this)->IsTypeShield(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ITEM_BASE_H*/
|
||||||
@ -41,6 +41,7 @@ F(ac)
|
|||||||
F(deity)
|
F(deity)
|
||||||
F(skillmodvalue)
|
F(skillmodvalue)
|
||||||
F(UNK033)
|
F(UNK033)
|
||||||
|
F(skillmodmax)
|
||||||
F(skillmodtype)
|
F(skillmodtype)
|
||||||
F(banedmgrace)
|
F(banedmgrace)
|
||||||
F(banedmgamt)
|
F(banedmgamt)
|
||||||
@ -172,7 +173,10 @@ F(bardlevel)
|
|||||||
F(questitemflag)
|
F(questitemflag)
|
||||||
F(svcorruption)
|
F(svcorruption)
|
||||||
F(purity)
|
F(purity)
|
||||||
|
F(evoitem)
|
||||||
|
F(evoid)
|
||||||
F(evolvinglevel)
|
F(evolvinglevel)
|
||||||
|
F(evomax)
|
||||||
F(backstabdmg)
|
F(backstabdmg)
|
||||||
F(dsmitigation)
|
F(dsmitigation)
|
||||||
F(heroic_str)
|
F(heroic_str)
|
||||||
|
|||||||
@ -1,251 +0,0 @@
|
|||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2003 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 04111-1307 USA
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ITEM_STRUCT_H
|
|
||||||
#define ITEM_STRUCT_H
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Note: (Doodman)
|
|
||||||
* This structure has field names that match the DB name exactly.
|
|
||||||
* Please take care as to not mess this up as it should make
|
|
||||||
* everyones life (i.e. mine) much easier. And the DB names
|
|
||||||
* match the field name from the 13th floor (SEQ) item collectors,
|
|
||||||
* so please maintain that as well.
|
|
||||||
*
|
|
||||||
* Note #2: (Doodman)
|
|
||||||
* UnkXXX fields are left in here for completeness but commented
|
|
||||||
* out since they are really unknown and since the items are now
|
|
||||||
* preserialized they should not be needed. Conversly if they
|
|
||||||
* -are- needed, then they shouldn't be unkown.
|
|
||||||
*
|
|
||||||
* Note #3: (Doodman)
|
|
||||||
* Please take care when adding new found data fields to add them
|
|
||||||
* to the appropriate structure. Item_Struct has elements that are
|
|
||||||
* global to all types of items only.
|
|
||||||
*
|
|
||||||
* Note #4: (Doodman)
|
|
||||||
* Made ya look! Ha!
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#include "eq_constants.h"
|
|
||||||
#include "eq_dictionary.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Child struct of Item_Struct:
|
|
||||||
** Effect data: Click, Proc, Focus, Worn, Scroll
|
|
||||||
**
|
|
||||||
*/
|
|
||||||
struct ItemEffect_Struct {
|
|
||||||
int16 Effect;
|
|
||||||
uint8 Type;
|
|
||||||
uint8 Level;
|
|
||||||
uint8 Level2;
|
|
||||||
//MaxCharges
|
|
||||||
//CastTime
|
|
||||||
//RecastDelay
|
|
||||||
//RecastType
|
|
||||||
//ProcRate
|
|
||||||
};
|
|
||||||
|
|
||||||
class ItemInst;
|
|
||||||
|
|
||||||
struct InternalSerializedItem_Struct {
|
|
||||||
int16 slot_id;
|
|
||||||
const void * inst;
|
|
||||||
};
|
|
||||||
|
|
||||||
// use EmuConstants::ITEM_COMMON_SIZE
|
|
||||||
//#define MAX_AUGMENT_SLOTS 5
|
|
||||||
|
|
||||||
struct Item_Struct {
|
|
||||||
bool IsEquipable(uint16 Race, uint16 Class) const;
|
|
||||||
// Non packet based fields
|
|
||||||
uint8 MinStatus;
|
|
||||||
|
|
||||||
// Packet based fields
|
|
||||||
uint8 ItemClass; // Item Type: 0=common, 1=container, 2=book
|
|
||||||
char Name[64]; // Name
|
|
||||||
char Lore[80]; // Lore Name: *=lore, &=summoned, #=artifact, ~=pending lore
|
|
||||||
char IDFile[30]; // Visible model
|
|
||||||
uint32 ID; // Unique ID (also PK for DB)
|
|
||||||
uint8 Weight; // Item weight * 10
|
|
||||||
uint8 NoRent; // No Rent: 0=norent, 255=not norent
|
|
||||||
uint8 NoDrop; // No Drop: 0=nodrop, 255=not nodrop
|
|
||||||
uint8 Size; // Size: 0=tiny, 1=small, 2=medium, 3=large, 4=giant
|
|
||||||
uint32 Slots; // Bitfield for which slots this item can be used in
|
|
||||||
uint32 Price; // Item cost (?)
|
|
||||||
uint32 Icon; // Icon Number
|
|
||||||
uint32 LoreGroup; // Later items use LoreGroup instead of LoreFlag. we might want to see about changing this to int32 since it is commonly -1 and is constantly being cast from signed (-1) to unsigned (4294967295)
|
|
||||||
bool LoreFlag; // This will be true if LoreGroup is non-zero
|
|
||||||
bool PendingLoreFlag;
|
|
||||||
bool ArtifactFlag;
|
|
||||||
bool SummonedFlag;
|
|
||||||
uint8 FVNoDrop; // Firiona Vie nodrop flag
|
|
||||||
uint32 Favor; // Individual favor
|
|
||||||
uint32 GuildFavor; // Guild favor
|
|
||||||
uint32 PointType;
|
|
||||||
|
|
||||||
//uint32 Unk117;
|
|
||||||
//uint32 Unk118;
|
|
||||||
//uint32 Unk121;
|
|
||||||
//uint32 Unk124;
|
|
||||||
|
|
||||||
uint8 BagType; // 0:Small Bag, 1:Large Bag, 2:Quiver, 3:Belt Pouch ... there are 50 types
|
|
||||||
uint8 BagSlots; // Number of slots: can only be 2, 4, 6, 8, or 10
|
|
||||||
uint8 BagSize; // 0:TINY, 1:SMALL, 2:MEDIUM, 3:LARGE, 4:GIANT
|
|
||||||
uint8 BagWR; // 0->100
|
|
||||||
|
|
||||||
bool BenefitFlag;
|
|
||||||
bool Tradeskills; // Is this a tradeskill item?
|
|
||||||
int8 CR; // Save vs Cold
|
|
||||||
int8 DR; // Save vs Disease
|
|
||||||
int8 PR; // Save vs Poison
|
|
||||||
int8 MR; // Save vs Magic
|
|
||||||
int8 FR; // Save vs Fire
|
|
||||||
int8 AStr; // Strength
|
|
||||||
int8 ASta; // Stamina
|
|
||||||
int8 AAgi; // Agility
|
|
||||||
int8 ADex; // Dexterity
|
|
||||||
int8 ACha; // Charisma
|
|
||||||
int8 AInt; // Intelligence
|
|
||||||
int8 AWis; // Wisdom
|
|
||||||
int32 HP; // HP
|
|
||||||
int32 Mana; // Mana
|
|
||||||
int32 AC; // AC
|
|
||||||
uint32 Deity; // Bitmask of Deities that can equip this item
|
|
||||||
//uint32 Unk033
|
|
||||||
int32 SkillModValue; // % Mod to skill specified in SkillModType
|
|
||||||
uint32 SkillModType; // Type of skill for SkillModValue to apply to
|
|
||||||
uint32 BaneDmgRace; // Bane Damage Race
|
|
||||||
int8 BaneDmgAmt; // Bane Damage Body Amount
|
|
||||||
uint32 BaneDmgBody; // Bane Damage Body
|
|
||||||
bool Magic; // True=Magic Item, False=not
|
|
||||||
int32 CastTime_;
|
|
||||||
uint8 ReqLevel; // Required Level to use item
|
|
||||||
uint32 BardType; // Bard Skill Type
|
|
||||||
int32 BardValue; // Bard Skill Amount
|
|
||||||
int8 Light; // Light
|
|
||||||
uint8 Delay; // Delay * 10
|
|
||||||
uint8 RecLevel; // Recommended level to use item
|
|
||||||
uint8 RecSkill; // Recommended skill to use item (refers to primary skill of item)
|
|
||||||
uint8 ElemDmgType; // Elemental Damage Type (1=magic, 2=fire)
|
|
||||||
uint8 ElemDmgAmt; // Elemental Damage
|
|
||||||
uint8 Range; // Range of item
|
|
||||||
uint32 Damage; // Delay between item usage (in 0.1 sec increments)
|
|
||||||
uint32 Color; // RR GG BB 00 <-- as it appears in pc
|
|
||||||
uint32 Classes; // Bitfield of classes that can equip item (1 << class#)
|
|
||||||
uint32 Races; // Bitfield of races that can equip item (1 << race#)
|
|
||||||
//uint32 Unk054;
|
|
||||||
int16 MaxCharges; // Maximum charges items can hold: -1 if not a chargeable item
|
|
||||||
uint8 ItemType; // Item Type/Skill (itemClass* from above)
|
|
||||||
uint8 Material; // Item material type
|
|
||||||
uint32 HerosForgeModel;// Hero's Forge Armor Model Type (2-13?)
|
|
||||||
float SellRate; // Sell rate
|
|
||||||
//uint32 Unk059;
|
|
||||||
union {
|
|
||||||
uint32 Fulfilment; // Food fulfilment (How long it lasts)
|
|
||||||
int16 CastTime; // Cast Time for clicky effects, in milliseconds
|
|
||||||
};
|
|
||||||
uint32 EliteMaterial;
|
|
||||||
int32 ProcRate;
|
|
||||||
int8 CombatEffects; // PoP: Combat Effects +
|
|
||||||
int8 Shielding; // PoP: Shielding %
|
|
||||||
int8 StunResist; // PoP: Stun Resist %
|
|
||||||
int8 StrikeThrough; // PoP: Strike Through %
|
|
||||||
uint32 ExtraDmgSkill;
|
|
||||||
uint32 ExtraDmgAmt;
|
|
||||||
int8 SpellShield; // PoP: Spell Shield %
|
|
||||||
int8 Avoidance; // PoP: Avoidance +
|
|
||||||
int8 Accuracy; // PoP: Accuracy +
|
|
||||||
uint32 CharmFileID;
|
|
||||||
int32 FactionMod1; // Faction Mod 1
|
|
||||||
int32 FactionMod2; // Faction Mod 2
|
|
||||||
int32 FactionMod3; // Faction Mod 3
|
|
||||||
int32 FactionMod4; // Faction Mod 4
|
|
||||||
int32 FactionAmt1; // Faction Amt 1
|
|
||||||
int32 FactionAmt2; // Faction Amt 2
|
|
||||||
int32 FactionAmt3; // Faction Amt 3
|
|
||||||
int32 FactionAmt4; // Faction Amt 4
|
|
||||||
char CharmFile[32]; // ?
|
|
||||||
uint32 AugType;
|
|
||||||
uint8 AugSlotType[EmuConstants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Type
|
|
||||||
uint8 AugSlotVisible[EmuConstants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Visible
|
|
||||||
uint8 AugSlotUnk2[EmuConstants::ITEM_COMMON_SIZE]; // RoF: Augment Slot 1-6 Unknown
|
|
||||||
uint32 LDoNTheme;
|
|
||||||
uint32 LDoNPrice;
|
|
||||||
uint32 LDoNSold;
|
|
||||||
uint32 BaneDmgRaceAmt;
|
|
||||||
uint32 AugRestrict;
|
|
||||||
uint32 Endur;
|
|
||||||
uint32 DotShielding;
|
|
||||||
uint32 Attack;
|
|
||||||
uint32 Regen;
|
|
||||||
uint32 ManaRegen;
|
|
||||||
uint32 EnduranceRegen;
|
|
||||||
uint32 Haste;
|
|
||||||
uint32 DamageShield;
|
|
||||||
uint32 RecastDelay;
|
|
||||||
uint32 RecastType;
|
|
||||||
uint32 AugDistiller;
|
|
||||||
bool Attuneable;
|
|
||||||
bool NoPet;
|
|
||||||
bool PotionBelt;
|
|
||||||
bool Stackable;
|
|
||||||
bool NoTransfer;
|
|
||||||
bool QuestItemFlag;
|
|
||||||
int16 StackSize;
|
|
||||||
uint8 PotionBeltSlots;
|
|
||||||
ItemEffect_Struct Click, Proc, Worn, Focus, Scroll, Bard;
|
|
||||||
|
|
||||||
uint8 Book; // 0=Not book, 1=Book
|
|
||||||
uint32 BookType;
|
|
||||||
char Filename[33]; // Filename for book data
|
|
||||||
// Begin SoF Fields
|
|
||||||
int32 SVCorruption;
|
|
||||||
uint32 Purity;
|
|
||||||
uint8 EvolvingLevel;
|
|
||||||
uint32 BackstabDmg;
|
|
||||||
uint32 DSMitigation;
|
|
||||||
int32 HeroicStr;
|
|
||||||
int32 HeroicInt;
|
|
||||||
int32 HeroicWis;
|
|
||||||
int32 HeroicAgi;
|
|
||||||
int32 HeroicDex;
|
|
||||||
int32 HeroicSta;
|
|
||||||
int32 HeroicCha;
|
|
||||||
int32 HeroicMR;
|
|
||||||
int32 HeroicFR;
|
|
||||||
int32 HeroicCR;
|
|
||||||
int32 HeroicDR;
|
|
||||||
int32 HeroicPR;
|
|
||||||
int32 HeroicSVCorrup;
|
|
||||||
int32 HealAmt;
|
|
||||||
int32 SpellDmg;
|
|
||||||
uint32 LDoNSellBackRate;
|
|
||||||
uint32 ScriptFileID;
|
|
||||||
uint16 ExpendableArrow;
|
|
||||||
uint32 Clairvoyance;
|
|
||||||
char ClickName[65];
|
|
||||||
char ProcName[65];
|
|
||||||
char WornName[65];
|
|
||||||
char FocusName[65];
|
|
||||||
char ScrollName[65];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif
|
|
||||||
99
common/light_source.cpp
Normal file
99
common/light_source.cpp
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "light_source.h"
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
|
uint8 EQEmu::lightsource::TypeToLevel(uint8 light_type)
|
||||||
|
{
|
||||||
|
switch (light_type) {
|
||||||
|
case LightTypeGlobeOfStars:
|
||||||
|
return LightLevelBrilliant; // 10
|
||||||
|
case LightTypeFlamelessLantern:
|
||||||
|
case LightTypeGreaterLightstone:
|
||||||
|
return LightLevelLargeMagic; // 9
|
||||||
|
case LightTypeLargeLantern:
|
||||||
|
return LightLevelLargeLantern; // 8
|
||||||
|
case LightTypeSteinOfMoggok:
|
||||||
|
case LightTypeLightstone:
|
||||||
|
return LightLevelMagicLantern; // 7
|
||||||
|
case LightTypeSmallLantern:
|
||||||
|
return LightLevelSmallLantern; // 6
|
||||||
|
case LightTypeColdlight:
|
||||||
|
case LightTypeUnknown2:
|
||||||
|
return LightLevelBlueLight; // 5
|
||||||
|
case LightTypeFireBeetleEye:
|
||||||
|
case LightTypeUnknown1:
|
||||||
|
return LightLevelRedLight; // 4
|
||||||
|
case LightTypeTinyGlowingSkull:
|
||||||
|
case LightTypeLightGlobe:
|
||||||
|
return LightLevelSmallMagic; // 3
|
||||||
|
case LightTypeTorch:
|
||||||
|
return LightLevelTorch; // 2
|
||||||
|
case LightTypeCandle:
|
||||||
|
return LightLevelCandle; // 1
|
||||||
|
default:
|
||||||
|
return LightLevelUnlit; // 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::lightsource::IsLevelGreater(uint8 left_type, uint8 right_type)
|
||||||
|
{
|
||||||
|
static const uint8 light_levels[LightTypeCount] = {
|
||||||
|
LightLevelUnlit, /* LightTypeNone */
|
||||||
|
LightLevelCandle, /* LightTypeCandle */
|
||||||
|
LightLevelTorch, /* LightTypeTorch */
|
||||||
|
LightLevelSmallMagic, /* LightTypeTinyGlowingSkull */
|
||||||
|
LightLevelSmallLantern, /* LightTypeSmallLantern */
|
||||||
|
LightLevelMagicLantern, /* LightTypeSteinOfMoggok */
|
||||||
|
LightLevelLargeLantern, /* LightTypeLargeLantern */
|
||||||
|
LightLevelLargeMagic, /* LightTypeFlamelessLantern */
|
||||||
|
LightLevelBrilliant, /* LightTypeGlobeOfStars */
|
||||||
|
LightLevelSmallMagic, /* LightTypeLightGlobe */
|
||||||
|
LightLevelMagicLantern, /* LightTypeLightstone */
|
||||||
|
LightLevelLargeMagic, /* LightTypeGreaterLightstone */
|
||||||
|
LightLevelRedLight, /* LightTypeFireBeetleEye */
|
||||||
|
LightLevelBlueLight, /* LightTypeColdlight */
|
||||||
|
LightLevelRedLight, /* LightTypeUnknown1 */
|
||||||
|
LightLevelBlueLight /* LightTypeUnknown2 */
|
||||||
|
};
|
||||||
|
|
||||||
|
if (left_type >= LightTypeCount) { left_type = LightTypeNone; }
|
||||||
|
if (right_type >= LightTypeCount) { right_type = LightTypeNone; }
|
||||||
|
|
||||||
|
return (light_levels[left_type] > light_levels[right_type]);
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::LightSource_Struct::LightSource_Struct()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::LightSource_Struct::Clear()
|
||||||
|
{
|
||||||
|
memset(&Slot, 0, (sizeof(uint8) * lightsource::LightCount));
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::LightSourceProfile::Clear()
|
||||||
|
{
|
||||||
|
Type.Clear();
|
||||||
|
Level.Clear();
|
||||||
|
}
|
||||||
115
common/light_source.h
Normal file
115
common/light_source.h
Normal file
@ -0,0 +1,115 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_LIGHT_SOURCE_H
|
||||||
|
#define COMMON_LIGHT_SOURCE_H
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
namespace lightsource {
|
||||||
|
enum LightSlot {
|
||||||
|
LightInnate = 0, // Defined by db field `npc_types`.`light` - where appropriate
|
||||||
|
LightEquipment, // Item_Struct::light value of worn/carried equipment
|
||||||
|
LightSpell, // Set value of any light-producing spell (can be modded to mimic equip_light behavior)
|
||||||
|
LightActive, // Highest value of all light sources
|
||||||
|
LightCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum LightType {
|
||||||
|
LightTypeNone = 0,
|
||||||
|
LightTypeCandle,
|
||||||
|
LightTypeTorch,
|
||||||
|
LightTypeTinyGlowingSkull,
|
||||||
|
LightTypeSmallLantern,
|
||||||
|
LightTypeSteinOfMoggok, // 5
|
||||||
|
LightTypeLargeLantern,
|
||||||
|
LightTypeFlamelessLantern,
|
||||||
|
LightTypeGlobeOfStars,
|
||||||
|
LightTypeLightGlobe,
|
||||||
|
LightTypeLightstone, // 10
|
||||||
|
LightTypeGreaterLightstone,
|
||||||
|
LightTypeFireBeetleEye,
|
||||||
|
LightTypeColdlight,
|
||||||
|
LightTypeUnknown1,
|
||||||
|
LightTypeUnknown2, // 15
|
||||||
|
LightTypeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
enum LightLevel {
|
||||||
|
LightLevelUnlit = 0,
|
||||||
|
LightLevelCandle,
|
||||||
|
LightLevelTorch,
|
||||||
|
LightLevelSmallMagic,
|
||||||
|
LightLevelRedLight,
|
||||||
|
LightLevelBlueLight, // 5
|
||||||
|
LightLevelSmallLantern,
|
||||||
|
LightLevelMagicLantern,
|
||||||
|
LightLevelLargeLantern,
|
||||||
|
LightLevelLargeMagic,
|
||||||
|
LightLevelBrilliant, // 10
|
||||||
|
LightLevelCount
|
||||||
|
};
|
||||||
|
|
||||||
|
extern uint8 TypeToLevel(uint8 light_type);
|
||||||
|
extern bool IsLevelGreater(uint8 left_type, uint8 right_type);
|
||||||
|
|
||||||
|
}; /*lightsource*/
|
||||||
|
|
||||||
|
struct LightSource_Struct {
|
||||||
|
uint8 Slot[lightsource::LightCount];
|
||||||
|
|
||||||
|
LightSource_Struct();
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
|
||||||
|
inline uint8& operator[](lightsource::LightSlot index) { return Slot[index]; }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LightSourceProfile {
|
||||||
|
/*
|
||||||
|
Current criteria (light types):
|
||||||
|
Equipment: { 0 .. 15 }
|
||||||
|
General: { 9 .. 13 }
|
||||||
|
|
||||||
|
Notes:
|
||||||
|
- Initial character load and item movement updates use different light source update behaviors
|
||||||
|
-- Server procedure matches the item movement behavior since most updates occur post-character load
|
||||||
|
- MainAmmo is not considered when determining light sources
|
||||||
|
- No 'Sub' or 'Aug' items are recognized as light sources
|
||||||
|
- Light types '< 9' and '> 13' are not considered for general (carried) light sources
|
||||||
|
- If values > 0x0F are valid, then assignment limiters will need to be removed
|
||||||
|
- MainCursor 'appears' to be a valid light source update slot..but, have not experienced updates during debug sessions
|
||||||
|
- All clients have a bug regarding stackable items (light and sound updates are not processed when picking up an item)
|
||||||
|
-- The timer-based update cancels out the invalid light source
|
||||||
|
*/
|
||||||
|
|
||||||
|
LightSource_Struct Type; // Light types (classifications)
|
||||||
|
LightSource_Struct Level; // Light levels (intensities) - used to determine which light source should be active
|
||||||
|
|
||||||
|
LightSourceProfile() { }
|
||||||
|
|
||||||
|
void Clear();
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_LIGHT_SOURCE_H*/
|
||||||
277
common/memory_buffer.cpp
Normal file
277
common/memory_buffer.cpp
Normal file
@ -0,0 +1,277 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "memory_buffer.h"
|
||||||
|
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer()
|
||||||
|
{
|
||||||
|
buffer_ = nullptr;
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(size_t sz)
|
||||||
|
{
|
||||||
|
buffer_ = nullptr;
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
Resize(sz);
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(const MemoryBuffer &other)
|
||||||
|
{
|
||||||
|
if(other.capacity_) {
|
||||||
|
buffer_ = new uchar[other.capacity_];
|
||||||
|
memcpy(buffer_, other.buffer_, other.capacity_);
|
||||||
|
} else {
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = other.size_;
|
||||||
|
capacity_ = other.capacity_;
|
||||||
|
write_pos_ = other.write_pos_;
|
||||||
|
read_pos_ = other.read_pos_;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::MemoryBuffer(MemoryBuffer &&other)
|
||||||
|
{
|
||||||
|
uchar *tbuf = other.buffer_;
|
||||||
|
size_t tsz = other.size_;
|
||||||
|
size_t tcapacity = other.capacity_;
|
||||||
|
size_t twrite_pos = other.write_pos_;
|
||||||
|
size_t tread_pos = other.read_pos_;
|
||||||
|
|
||||||
|
other.buffer_ = nullptr;
|
||||||
|
other.size_ = 0;
|
||||||
|
other.capacity_ = 0;
|
||||||
|
other.read_pos_ = 0;
|
||||||
|
other.write_pos_ = 0;
|
||||||
|
|
||||||
|
buffer_ = tbuf;
|
||||||
|
size_ = tsz;
|
||||||
|
capacity_ = tcapacity;
|
||||||
|
write_pos_ = twrite_pos;
|
||||||
|
read_pos_ = tread_pos;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator=(const MemoryBuffer &other)
|
||||||
|
{
|
||||||
|
if(this == &other) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buffer_) {
|
||||||
|
delete[] buffer_;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(other.capacity_) {
|
||||||
|
buffer_ = new uchar[other.capacity_];
|
||||||
|
memcpy(buffer_, other.buffer_, other.capacity_);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = other.size_;
|
||||||
|
capacity_ = other.capacity_;
|
||||||
|
write_pos_ = other.write_pos_;
|
||||||
|
read_pos_ = other.read_pos_;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator=(MemoryBuffer &&other)
|
||||||
|
{
|
||||||
|
uchar *tbuf = other.buffer_;
|
||||||
|
size_t tsz = other.size_;
|
||||||
|
size_t tcapacity = other.capacity_;
|
||||||
|
size_t twrite_pos = other.write_pos_;
|
||||||
|
size_t tread_pos = other.read_pos_;
|
||||||
|
|
||||||
|
other.buffer_ = nullptr;
|
||||||
|
other.size_ = 0;
|
||||||
|
other.capacity_ = 0;
|
||||||
|
other.read_pos_ = 0;
|
||||||
|
other.write_pos_ = 0;
|
||||||
|
|
||||||
|
buffer_ = tbuf;
|
||||||
|
size_ = tsz;
|
||||||
|
capacity_ = tcapacity;
|
||||||
|
write_pos_ = twrite_pos;
|
||||||
|
read_pos_ = tread_pos;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer& EQEmu::MemoryBuffer::operator+=(const MemoryBuffer &rhs)
|
||||||
|
{
|
||||||
|
if(!rhs.buffer_) {
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(buffer_) {
|
||||||
|
size_t old_size = size_;
|
||||||
|
Resize(size_ + rhs.size_);
|
||||||
|
memcpy(&buffer_[old_size], rhs.buffer_, rhs.size_);
|
||||||
|
} else {
|
||||||
|
buffer_ = new uchar[rhs.capacity_];
|
||||||
|
memcpy(buffer_, rhs.buffer_, rhs.capacity_);
|
||||||
|
size_ = rhs.size_;
|
||||||
|
capacity_ = rhs.capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
|
EQEmu::MemoryBuffer::~MemoryBuffer()
|
||||||
|
{
|
||||||
|
Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
uchar& EQEmu::MemoryBuffer::operator[](size_t pos)
|
||||||
|
{
|
||||||
|
return buffer_[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
const uchar& EQEmu::MemoryBuffer::operator[](size_t pos) const
|
||||||
|
{
|
||||||
|
return buffer_[pos];
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::MemoryBuffer::Empty()
|
||||||
|
{
|
||||||
|
return size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool EQEmu::MemoryBuffer::Empty() const
|
||||||
|
{
|
||||||
|
return size_ == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Size()
|
||||||
|
{
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Size() const
|
||||||
|
{
|
||||||
|
return size_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Capacity()
|
||||||
|
{
|
||||||
|
return capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_t EQEmu::MemoryBuffer::Capacity() const
|
||||||
|
{
|
||||||
|
return capacity_;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Resize(size_t sz)
|
||||||
|
{
|
||||||
|
if(!buffer_) {
|
||||||
|
size_t new_size = sz + 64;
|
||||||
|
buffer_ = new uchar[new_size];
|
||||||
|
capacity_ = new_size;
|
||||||
|
size_ = sz;
|
||||||
|
memset(buffer_, 0, capacity_);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(sz > capacity_) {
|
||||||
|
size_t new_size = sz + 32;
|
||||||
|
uchar *temp = new uchar[new_size];
|
||||||
|
memcpy(temp, buffer_, capacity_);
|
||||||
|
delete[] buffer_;
|
||||||
|
buffer_ = temp;
|
||||||
|
|
||||||
|
capacity_ = new_size;
|
||||||
|
size_ = sz;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
size_ = sz;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Clear()
|
||||||
|
{
|
||||||
|
if(buffer_) {
|
||||||
|
delete[] buffer_;
|
||||||
|
buffer_ = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
size_ = 0;
|
||||||
|
capacity_ = 0;
|
||||||
|
write_pos_ = 0;
|
||||||
|
read_pos_ = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Zero()
|
||||||
|
{
|
||||||
|
if(buffer_) {
|
||||||
|
memset(buffer_, 0, capacity_);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Write(const char *val, size_t len)
|
||||||
|
{
|
||||||
|
size_t size_needed = write_pos_ + len;
|
||||||
|
Resize(size_needed);
|
||||||
|
|
||||||
|
memcpy(&buffer_[write_pos_], val, len);
|
||||||
|
write_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Read(uchar *buf, size_t len)
|
||||||
|
{
|
||||||
|
memcpy(buf, &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::MemoryBuffer::Read(char *str)
|
||||||
|
{
|
||||||
|
size_t len = strlen((const char*)&buffer_[read_pos_]);
|
||||||
|
memcpy(str, &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len;
|
||||||
|
}
|
||||||
|
|
||||||
|
void EQEmu::OutBuffer::overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count)
|
||||||
|
{
|
||||||
|
auto last_pos = tellp();
|
||||||
|
seekp(position);
|
||||||
|
write(_Str, _Count);
|
||||||
|
seekp(last_pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
uchar* EQEmu::OutBuffer::detach()
|
||||||
|
{
|
||||||
|
size_t buffer_size = tellp();
|
||||||
|
if (buffer_size == 0)
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
auto out_buffer = new uchar[buffer_size];
|
||||||
|
memcpy(out_buffer, str().c_str(), buffer_size);
|
||||||
|
flush();
|
||||||
|
|
||||||
|
return out_buffer;
|
||||||
|
}
|
||||||
134
common/memory_buffer.h
Normal file
134
common/memory_buffer.h
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_MEMORY_BUFFER
|
||||||
|
#define COMMON_MEMORY_BUFFER
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
#include <type_traits>
|
||||||
|
#include <string.h>
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
|
|
||||||
|
namespace EQEmu
|
||||||
|
{
|
||||||
|
class MemoryBuffer {
|
||||||
|
public:
|
||||||
|
MemoryBuffer();
|
||||||
|
MemoryBuffer(size_t sz);
|
||||||
|
MemoryBuffer(const MemoryBuffer &other);
|
||||||
|
MemoryBuffer(MemoryBuffer &&other);
|
||||||
|
MemoryBuffer& operator=(const MemoryBuffer &other);
|
||||||
|
MemoryBuffer& operator=(MemoryBuffer &&other);
|
||||||
|
MemoryBuffer& operator+=(const MemoryBuffer &rhs);
|
||||||
|
friend MemoryBuffer operator+(MemoryBuffer lhs, const MemoryBuffer& rhs) { return lhs += rhs; }
|
||||||
|
~MemoryBuffer();
|
||||||
|
|
||||||
|
uchar& operator[](size_t pos);
|
||||||
|
const uchar& operator[](size_t pos) const;
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
operator T*() {
|
||||||
|
return reinterpret_cast<T*>(buffer_);
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
operator T*() const {
|
||||||
|
return reinterpret_cast<T*>(buffer_);
|
||||||
|
}
|
||||||
|
|
||||||
|
operator bool() { return buffer_ != nullptr; }
|
||||||
|
operator bool() const { return buffer_ != nullptr; }
|
||||||
|
|
||||||
|
bool Empty();
|
||||||
|
bool Empty() const;
|
||||||
|
size_t Size();
|
||||||
|
size_t Size() const;
|
||||||
|
size_t Capacity();
|
||||||
|
size_t Capacity() const;
|
||||||
|
|
||||||
|
void Resize(size_t sz);
|
||||||
|
void Clear();
|
||||||
|
void Zero();
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
void Write(T val) {
|
||||||
|
static_assert(std::is_pod<T>::value, "MemoryBuffer::Write<T>(T val) only works on pod and string types.");
|
||||||
|
Write((const char*)&val, sizeof(T));
|
||||||
|
}
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
T Read() {
|
||||||
|
static_assert(std::is_pod<T>::value, "MemoryBuffer::Read<T>() only works on pod and string types.");
|
||||||
|
T temp;
|
||||||
|
Read((uchar*)&temp, sizeof(T));
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const std::string &val) {
|
||||||
|
Write(val.c_str(), val.length());
|
||||||
|
Write((uint8)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const char *val) {
|
||||||
|
size_t len = strlen(val);
|
||||||
|
Write(val, len);
|
||||||
|
Write((uint8)0);
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string ReadString() {
|
||||||
|
std::string ret;
|
||||||
|
size_t len = strlen((const char*)&buffer_[read_pos_]);
|
||||||
|
ret.resize(len);
|
||||||
|
memcpy(&ret[0], &buffer_[read_pos_], len);
|
||||||
|
read_pos_ += len + 1;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Write(const char *val, size_t len);
|
||||||
|
void Read(uchar *buf, size_t len);
|
||||||
|
void Read(char *str);
|
||||||
|
|
||||||
|
inline size_t GetWritePosition() { return write_pos_; }
|
||||||
|
inline void SetWritePosition(size_t wp) { write_pos_ = wp; }
|
||||||
|
inline void WriteSkipBytes(size_t skip) { write_pos_ += skip; }
|
||||||
|
inline size_t GetReadPosition() { return read_pos_; }
|
||||||
|
inline void SetReadPosition(size_t rp) { read_pos_ = rp; }
|
||||||
|
inline void ReadSkipBytes(size_t skip) { read_pos_ += skip; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
uchar *buffer_;
|
||||||
|
size_t size_;
|
||||||
|
size_t capacity_;
|
||||||
|
size_t write_pos_;
|
||||||
|
size_t read_pos_;
|
||||||
|
};
|
||||||
|
|
||||||
|
class OutBuffer : public std::stringstream {
|
||||||
|
public:
|
||||||
|
inline size_t size() { return tellp(); }
|
||||||
|
void overwrite(OutBuffer::pos_type position, const char *_Str, std::streamsize _Count);
|
||||||
|
uchar* detach();
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*EQEmu*/
|
||||||
|
|
||||||
|
#endif /*COMMON_MEMORY_BUFFER*/
|
||||||
@ -18,7 +18,7 @@
|
|||||||
#ifndef MYMUTEX_H
|
#ifndef MYMUTEX_H
|
||||||
#define MYMUTEX_H
|
#define MYMUTEX_H
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define MYSQL_REQUEST_RESULT_H
|
#define MYSQL_REQUEST_RESULT_H
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -10,6 +10,12 @@
|
|||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "mysql_request_row.h"
|
#include "mysql_request_row.h"
|
||||||
|
|
||||||
|
#ifdef __FreeBSD__
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
||||||
|
#include <iostream>
|
||||||
|
#endif
|
||||||
|
|
||||||
class MySQLRequestResult {
|
class MySQLRequestResult {
|
||||||
private:
|
private:
|
||||||
MYSQL_RES* m_Result;
|
MYSQL_RES* m_Result;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
#define MYSQL_REQUEST_ROW_H
|
#define MYSQL_REQUEST_ROW_H
|
||||||
|
|
||||||
#ifdef _WINDOWS
|
#ifdef _WINDOWS
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@ -146,6 +146,7 @@ INr(OP_GuildDelete); //?
|
|||||||
IN(OP_GuildPublicNote, GuildUpdate_PublicNote);
|
IN(OP_GuildPublicNote, GuildUpdate_PublicNote);
|
||||||
INz(OP_GetGuildsList); //?
|
INz(OP_GetGuildsList); //?
|
||||||
IN(OP_SetGuildMOTD, GuildMOTD_Struct);
|
IN(OP_SetGuildMOTD, GuildMOTD_Struct);
|
||||||
|
IN(OP_SetRunMode, SetRunMode_Struct);
|
||||||
INz(OP_GuildPeace); //?
|
INz(OP_GuildPeace); //?
|
||||||
INz(OP_GuildWar); //?
|
INz(OP_GuildWar); //?
|
||||||
IN(OP_GuildLeader, GuildMakeLeader);
|
IN(OP_GuildLeader, GuildMakeLeader);
|
||||||
@ -172,7 +173,7 @@ IN(OP_TradeAcceptClick, TradeAccept_Struct);
|
|||||||
IN(OP_BoardBoat, EntityId_Struct); //not really the struct, just 4 bytes
|
IN(OP_BoardBoat, EntityId_Struct); //not really the struct, just 4 bytes
|
||||||
INz(OP_LeaveBoat); //?
|
INz(OP_LeaveBoat); //?
|
||||||
IN(OP_RandomReq, RandomReq_Struct);
|
IN(OP_RandomReq, RandomReq_Struct);
|
||||||
IN(OP_Buff, SpellBuffFade_Struct);
|
IN(OP_Buff, SpellBuffPacket_Struct);
|
||||||
IN(OP_GMHideMe, SpawnAppearance_Struct);
|
IN(OP_GMHideMe, SpawnAppearance_Struct);
|
||||||
IN(OP_GMNameChange, GMName_Struct);
|
IN(OP_GMNameChange, GMName_Struct);
|
||||||
IN(OP_GMKill, GMKill_Struct);
|
IN(OP_GMKill, GMKill_Struct);
|
||||||
@ -414,7 +415,7 @@ OUTv(OP_SendAATable, SendAA_Struct);
|
|||||||
OUT(OP_AAAction, UseAA_Struct);
|
OUT(OP_AAAction, UseAA_Struct);
|
||||||
OUT(OP_Bazaar, BazaarReturnDone_Struct);
|
OUT(OP_Bazaar, BazaarReturnDone_Struct);
|
||||||
//alt:OUT(OP_Bazaar, BazaarWelcome_Struct);
|
//alt:OUT(OP_Bazaar, BazaarWelcome_Struct);
|
||||||
OUT(OP_Buff, SpellBuffFade_Struct);
|
OUT(OP_Buff, SpellBuffPacket_Struct);
|
||||||
OUT(OP_ClickObject, ClickObject_Struct);
|
OUT(OP_ClickObject, ClickObject_Struct);
|
||||||
OUT(OP_ClientUpdate, PlayerPositionUpdateServer_Struct);
|
OUT(OP_ClientUpdate, PlayerPositionUpdateServer_Struct);
|
||||||
OUT(OP_SpawnPositionUpdate, SpawnPositionUpdate_Struct);
|
OUT(OP_SpawnPositionUpdate, SpawnPositionUpdate_Struct);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ void DumpPacketHex(const uchar* buf, uint32 size, uint32 cols, uint32 skip) {
|
|||||||
// Output as HEX
|
// Output as HEX
|
||||||
char output[4];
|
char output[4];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char* ascii = new char[cols+1];
|
auto ascii = new char[cols + 1];
|
||||||
memset(ascii, 0, cols+1);
|
memset(ascii, 0, cols+1);
|
||||||
uint32 i;
|
uint32 i;
|
||||||
for(i=skip; i<size; i++)
|
for(i=skip; i<size; i++)
|
||||||
@ -100,7 +100,7 @@ std::string DumpPacketHexToString(const uchar* buf, uint32 size, uint32 cols, ui
|
|||||||
// Output as HEX
|
// Output as HEX
|
||||||
char output[4];
|
char output[4];
|
||||||
int j = 0;
|
int j = 0;
|
||||||
char* ascii = new char[cols + 1];
|
auto ascii = new char[cols + 1];
|
||||||
memset(ascii, 0, cols + 1);
|
memset(ascii, 0, cols + 1);
|
||||||
uint32 i;
|
uint32 i;
|
||||||
for (i = skip; i < size; i++)
|
for (i = skip; i < size; i++)
|
||||||
|
|||||||
@ -94,7 +94,9 @@ void FileDumpPacketHex(const char* filename, const uchar* buf, uint32 size, uint
|
|||||||
std::ofstream logfile(filename, std::ios::app);
|
std::ofstream logfile(filename, std::ios::app);
|
||||||
// Output as HEX
|
// Output as HEX
|
||||||
char output[4];
|
char output[4];
|
||||||
int j = 0; char* ascii = new char[cols+1]; memset(ascii, 0, cols+1);
|
int j = 0;
|
||||||
|
auto ascii = new char[cols + 1];
|
||||||
|
memset(ascii, 0, cols + 1);
|
||||||
uint32 i;
|
uint32 i;
|
||||||
for(i=skip; i<size; i++)
|
for(i=skip; i<size; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
19
common/patches/deprecated_titanium_itemfields_a.h
Normal file
19
common/patches/deprecated_titanium_itemfields_a.h
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
|
||||||
|
|
||||||
|
These fields must be in the order of how they are serialized!
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/* 000 */ //I(ItemClass) Leave this one off on purpose
|
||||||
|
/* 001 */ S(Name)
|
||||||
|
/* 002 */ S(Lore)
|
||||||
|
/* 003 */ S(IDFile)
|
||||||
|
/* 004 */ I(ID)
|
||||||
|
|
||||||
|
/* 005 */ //I(Weight) handled manually
|
||||||
|
|
||||||
|
// titanium_itemfields_b.h
|
||||||
@ -8,12 +8,10 @@ These fields must be in the order of how they are serialized!
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* 000 */ //I(ItemClass) Leave this one off on purpose
|
// titanium_itemfields_a.h
|
||||||
/* 001 */ S(Name)
|
|
||||||
/* 002 */ S(Lore)
|
/* 005 */ //I(Weight) handled manually
|
||||||
/* 003 */ S(IDFile)
|
|
||||||
/* 004 */ I(ID)
|
|
||||||
/* 005 */ I(Weight)
|
|
||||||
/* 006 */ I(NoRent)
|
/* 006 */ I(NoRent)
|
||||||
/* 007 */ I(NoDrop)
|
/* 007 */ I(NoDrop)
|
||||||
/* 008 */ I(Size)
|
/* 008 */ I(Size)
|
||||||
@ -41,7 +39,7 @@ These fields must be in the order of how they are serialized!
|
|||||||
/* 030 */ I(AC)
|
/* 030 */ I(AC)
|
||||||
/* 031 */ I(Deity)
|
/* 031 */ I(Deity)
|
||||||
/* 032 */ I(SkillModValue)
|
/* 032 */ I(SkillModValue)
|
||||||
/* 033 */ C("0")
|
/* 033 */ I(SkillModMax)
|
||||||
/* 034 */ I(SkillModType)
|
/* 034 */ I(SkillModType)
|
||||||
/* 035 */ I(BaneDmgRace)
|
/* 035 */ I(BaneDmgRace)
|
||||||
/* 036 */ I(BaneDmgAmt)
|
/* 036 */ I(BaneDmgAmt)
|
||||||
@ -5,7 +5,7 @@ if [ -z "$1" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for ext in .cpp .h _ops.h _constants.h _structs.h
|
for ext in .cpp _limits.cpp .h _ops.h _limits.h _structs.h
|
||||||
do
|
do
|
||||||
cp template$ext $1$ext
|
cp template$ext $1$ext
|
||||||
perl -pi -e "s/TEMPLATE/$1/g" $1$ext
|
perl -pi -e "s/TEMPLATE/$1/g" $1$ext
|
||||||
|
|||||||
@ -1,3 +1,21 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
#include "../global_define.h"
|
#include "../global_define.h"
|
||||||
#include "patches.h"
|
#include "patches.h"
|
||||||
@ -9,7 +27,9 @@
|
|||||||
#include "rof.h"
|
#include "rof.h"
|
||||||
#include "rof2.h"
|
#include "rof2.h"
|
||||||
|
|
||||||
void RegisterAllPatches(EQStreamIdentifier &into) {
|
|
||||||
|
void RegisterAllPatches(EQStreamIdentifier &into)
|
||||||
|
{
|
||||||
Titanium::Register(into);
|
Titanium::Register(into);
|
||||||
SoF::Register(into);
|
SoF::Register(into);
|
||||||
SoD::Register(into);
|
SoD::Register(into);
|
||||||
@ -18,7 +38,8 @@ void RegisterAllPatches(EQStreamIdentifier &into) {
|
|||||||
RoF2::Register(into);
|
RoF2::Register(into);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ReloadAllPatches() {
|
void ReloadAllPatches()
|
||||||
|
{
|
||||||
Titanium::Reload();
|
Titanium::Reload();
|
||||||
SoF::Reload();
|
SoF::Reload();
|
||||||
SoD::Reload();
|
SoD::Reload();
|
||||||
|
|||||||
@ -1,5 +1,25 @@
|
|||||||
#ifndef PATCHES_H_
|
/* EQEMu: Everquest Server Emulator
|
||||||
#define PATCHES_H_
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_PATCHES_H
|
||||||
|
#define COMMON_PATCHES_H
|
||||||
|
|
||||||
|
|
||||||
/*enum {
|
/*enum {
|
||||||
Patch_062,
|
Patch_062,
|
||||||
@ -12,4 +32,4 @@ class EQStreamIdentifier;
|
|||||||
void RegisterAllPatches(EQStreamIdentifier &into);
|
void RegisterAllPatches(EQStreamIdentifier &into);
|
||||||
void ReloadAllPatches();
|
void ReloadAllPatches();
|
||||||
|
|
||||||
#endif /*PATCHES_H_*/
|
#endif /*COMMON_PATCHES_H*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,31 @@
|
|||||||
#ifndef ROF_H_
|
/* EQEMu: Everquest Server Emulator
|
||||||
#define ROF_H_
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF_H
|
||||||
|
#define COMMON_ROF_H
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
class EQStreamIdentifier;
|
class EQStreamIdentifier;
|
||||||
|
|
||||||
namespace RoF {
|
namespace RoF
|
||||||
|
{
|
||||||
|
|
||||||
//these are the only public member of this namespace.
|
//these are the only public member of this namespace.
|
||||||
extern void Register(EQStreamIdentifier &into);
|
extern void Register(EQStreamIdentifier &into);
|
||||||
@ -23,13 +43,31 @@ namespace RoF {
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual std::string Describe() const;
|
virtual std::string Describe() const;
|
||||||
virtual const ClientVersion GetClientVersion() const;
|
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||||
|
|
||||||
//magic macro to declare our opcode processors
|
//magic macro to declare our opcode processors
|
||||||
#include "ss_declare.h"
|
#include "ss_declare.h"
|
||||||
#include "rof_ops.h"
|
#include "rof_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
Item = 12,
|
||||||
|
Discipline = 13,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
#endif /*ROF_H_*/
|
}; /*RoF*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF_H*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,31 @@
|
|||||||
#ifndef ROF2_H_
|
/* EQEMu: Everquest Server Emulator
|
||||||
#define ROF2_H_
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF2_H
|
||||||
|
#define COMMON_ROF2_H
|
||||||
|
|
||||||
#include "../struct_strategy.h"
|
#include "../struct_strategy.h"
|
||||||
|
|
||||||
class EQStreamIdentifier;
|
class EQStreamIdentifier;
|
||||||
|
|
||||||
namespace RoF2 {
|
namespace RoF2
|
||||||
|
{
|
||||||
|
|
||||||
//these are the only public member of this namespace.
|
//these are the only public member of this namespace.
|
||||||
extern void Register(EQStreamIdentifier &into);
|
extern void Register(EQStreamIdentifier &into);
|
||||||
@ -23,13 +43,31 @@ namespace RoF2 {
|
|||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual std::string Describe() const;
|
virtual std::string Describe() const;
|
||||||
virtual const ClientVersion GetClientVersion() const;
|
virtual const EQEmu::versions::ClientVersion ClientVersion() const;
|
||||||
|
|
||||||
//magic macro to declare our opcode processors
|
//magic macro to declare our opcode processors
|
||||||
#include "ss_declare.h"
|
#include "ss_declare.h"
|
||||||
#include "rof2_ops.h"
|
#include "rof2_ops.h"
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
enum class CastingSlot : uint32 {
|
||||||
|
Gem1 = 0,
|
||||||
|
Gem2 = 1,
|
||||||
|
Gem3 = 2,
|
||||||
|
Gem4 = 3,
|
||||||
|
Gem5 = 4,
|
||||||
|
Gem6 = 5,
|
||||||
|
Gem7 = 6,
|
||||||
|
Gem8 = 7,
|
||||||
|
Gem9 = 8,
|
||||||
|
Gem10 = 9,
|
||||||
|
Gem11 = 10,
|
||||||
|
Gem12 = 11,
|
||||||
|
Item = 12,
|
||||||
|
Discipline = 13,
|
||||||
|
AltAbility = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
#endif /*ROF2_H_*/
|
}; /*RoF2*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF2_H*/
|
||||||
|
|||||||
@ -1,222 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ROF2_CONSTANTS_H_
|
|
||||||
#define ROF2_CONSTANTS_H_
|
|
||||||
|
|
||||||
#include "../types.h"
|
|
||||||
|
|
||||||
namespace RoF2 {
|
|
||||||
namespace maps {
|
|
||||||
typedef enum : int16 {
|
|
||||||
MapPossessions = 0,
|
|
||||||
MapBank,
|
|
||||||
MapSharedBank,
|
|
||||||
MapTrade,
|
|
||||||
MapWorld,
|
|
||||||
MapLimbo,
|
|
||||||
MapTribute,
|
|
||||||
MapTrophyTribute,
|
|
||||||
MapGuildTribute,
|
|
||||||
MapMerchant,
|
|
||||||
MapDeleted,
|
|
||||||
MapCorpse,
|
|
||||||
MapBazaar,
|
|
||||||
MapInspect,
|
|
||||||
MapRealEstate,
|
|
||||||
MapViewMODPC,
|
|
||||||
MapViewMODBank,
|
|
||||||
MapViewMODSharedBank,
|
|
||||||
MapViewMODLimbo,
|
|
||||||
MapAltStorage,
|
|
||||||
MapArchived,
|
|
||||||
MapMail,
|
|
||||||
MapGuildTrophyTribute,
|
|
||||||
MapKrono,
|
|
||||||
MapOther,
|
|
||||||
_MapCount
|
|
||||||
} InventoryMaps;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace slots {
|
|
||||||
typedef enum : int16 {
|
|
||||||
MainCharm = 0,
|
|
||||||
MainEar1,
|
|
||||||
MainHead,
|
|
||||||
MainFace,
|
|
||||||
MainEar2,
|
|
||||||
MainNeck,
|
|
||||||
MainShoulders,
|
|
||||||
MainArms,
|
|
||||||
MainBack,
|
|
||||||
MainWrist1,
|
|
||||||
MainWrist2,
|
|
||||||
MainRange,
|
|
||||||
MainHands,
|
|
||||||
MainPrimary,
|
|
||||||
MainSecondary,
|
|
||||||
MainFinger1,
|
|
||||||
MainFinger2,
|
|
||||||
MainChest,
|
|
||||||
MainLegs,
|
|
||||||
MainFeet,
|
|
||||||
MainWaist,
|
|
||||||
MainPowerSource,
|
|
||||||
MainAmmo,
|
|
||||||
MainGeneral1,
|
|
||||||
MainGeneral2,
|
|
||||||
MainGeneral3,
|
|
||||||
MainGeneral4,
|
|
||||||
MainGeneral5,
|
|
||||||
MainGeneral6,
|
|
||||||
MainGeneral7,
|
|
||||||
MainGeneral8,
|
|
||||||
MainGeneral9,
|
|
||||||
MainGeneral10,
|
|
||||||
MainCursor,
|
|
||||||
_MainCount,
|
|
||||||
_MainEquipmentBegin = MainCharm,
|
|
||||||
_MainEquipmentEnd = MainAmmo,
|
|
||||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
|
||||||
_MainGeneralBegin = MainGeneral1,
|
|
||||||
_MainGeneralEnd = MainGeneral10,
|
|
||||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
|
||||||
} EquipmentSlots;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace consts {
|
|
||||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
|
||||||
|
|
||||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BANK_SIZE = 24;
|
|
||||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
|
||||||
static const uint16 MAP_TRADE_SIZE = 8;
|
|
||||||
static const uint16 MAP_WORLD_SIZE = 10;
|
|
||||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
|
||||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
|
||||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
|
||||||
static const uint16 MAP_DELETED_SIZE = 0;
|
|
||||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BAZAAR_SIZE = 200;
|
|
||||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
|
||||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
|
||||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
|
||||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
|
||||||
static const uint16 MAP_MAIL_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_OTHER_SIZE = 0;
|
|
||||||
|
|
||||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
|
||||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
|
||||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
|
||||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
|
||||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
|
|
||||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 GENERAL_END = slots::MainGeneral10;
|
|
||||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
|
||||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
|
||||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
|
||||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 CURSOR = slots::MainCursor;
|
|
||||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
|
||||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
|
||||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 BANK_BEGIN = 2000;
|
|
||||||
static const int16 BANK_END = 2023;
|
|
||||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
|
||||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
|
||||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
|
||||||
static const int16 SHARED_BANK_END = 2501;
|
|
||||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 TRADE_BEGIN = 3000;
|
|
||||||
static const int16 TRADE_END = 3007;
|
|
||||||
static const int16 TRADE_NPC_END = 3003;
|
|
||||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
|
||||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 WORLD_BEGIN = 4000;
|
|
||||||
static const int16 WORLD_END = 4009;
|
|
||||||
|
|
||||||
static const int16 TRIBUTE_BEGIN = 400;
|
|
||||||
static const int16 TRIBUTE_END = 404;
|
|
||||||
|
|
||||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
|
||||||
|
|
||||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
|
||||||
|
|
||||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
|
||||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
|
||||||
|
|
||||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
|
||||||
|
|
||||||
static const size_t TEXT_LINK_BODY_LENGTH = 56;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace limits {
|
|
||||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
|
||||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
|
||||||
static const bool COIN_HAS_WEIGHT = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}; //end namespace RoF2
|
|
||||||
|
|
||||||
#endif /*ROF2_CONSTANTS_H_*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
RoF2 Notes:
|
|
||||||
** Structure-based inventory **
|
|
||||||
ok Possessions: ( 0, { 0 .. 33 }, -1, -1 ) (Corpse: { 23 .. 56 } [Offset 23])
|
|
||||||
ok [Equipment: ( 0, { 0 .. 22 }, -1, -1 )]
|
|
||||||
ok [General: ( 0, { 23 .. 32 }, -1, -1 )]
|
|
||||||
ok [Cursor: ( 0, 33, -1, -1 )]
|
|
||||||
General Bags: ( 0, { 23 .. 32 }, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
Cursor Bags: ( 0, 33, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
|
|
||||||
Bank: ( 1, { 0 .. 23 }, -1, -1 )
|
|
||||||
Bank Bags: ( 1, { 0 .. 23 }, { 0 .. (maxsize - 1)}, -1 )
|
|
||||||
|
|
||||||
Shared Bank: ( 2, { 0 .. 1 }, -1, -1 )
|
|
||||||
Shared Bank Bags: ( 2, { 0 .. 1 }, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
|
|
||||||
Trade: ( 3, { 0 .. 8 }, -1, -1 )
|
|
||||||
(Trade Bags: 3031 - 3110 -- server values)
|
|
||||||
|
|
||||||
World: ( 4, { 0 .. 10 }, -1, -1 )
|
|
||||||
|
|
||||||
*/
|
|
||||||
284
common/patches/rof2_limits.cpp
Normal file
284
common/patches/rof2_limits.cpp
Normal file
@ -0,0 +1,284 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rof2_limits.h"
|
||||||
|
|
||||||
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
size_t RoF2::invtype::GetInvTypeSize(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
return invtype::InvTypePossessionsSize;
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
return invtype::InvTypeBankSize;
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
return invtype::InvTypeSharedBankSize;
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
return invtype::InvTypeTradeSize;
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
return invtype::InvTypeWorldSize;
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
return invtype::InvTypeLimboSize;
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
return invtype::InvTypeTributeSize;
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
return invtype::InvTypeTrophyTributeSize;
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return invtype::InvTypeGuildTributeSize;
|
||||||
|
case invtype::InvTypeMerchant:
|
||||||
|
return invtype::InvTypeMerchantSize;
|
||||||
|
case invtype::InvTypeDeleted:
|
||||||
|
return invtype::InvTypeDeletedSize;
|
||||||
|
case invtype::InvTypeCorpse:
|
||||||
|
return invtype::InvTypeCorpseSize;
|
||||||
|
case invtype::InvTypeBazaar:
|
||||||
|
return invtype::InvTypeBazaarSize;
|
||||||
|
case invtype::InvTypeInspect:
|
||||||
|
return invtype::InvTypeInspectSize;
|
||||||
|
case invtype::InvTypeRealEstate:
|
||||||
|
return invtype::InvTypeRealEstateSize;
|
||||||
|
case invtype::InvTypeViewMODPC:
|
||||||
|
return invtype::InvTypeViewMODPCSize;
|
||||||
|
case invtype::InvTypeViewMODBank:
|
||||||
|
return invtype::InvTypeViewMODBankSize;
|
||||||
|
case invtype::InvTypeViewMODSharedBank:
|
||||||
|
return invtype::InvTypeViewMODSharedBankSize;
|
||||||
|
case invtype::InvTypeViewMODLimbo:
|
||||||
|
return invtype::InvTypeViewMODLimboSize;
|
||||||
|
case invtype::InvTypeAltStorage:
|
||||||
|
return invtype::InvTypeAltStorageSize;
|
||||||
|
case invtype::InvTypeArchived:
|
||||||
|
return invtype::InvTypeArchivedSize;
|
||||||
|
case invtype::InvTypeMail:
|
||||||
|
return invtype::InvTypeMailSize;
|
||||||
|
case invtype::InvTypeGuildTrophyTribute:
|
||||||
|
return invtype::InvTypeGuildTrophyTributeSize;
|
||||||
|
case invtype::InvTypeKrono:
|
||||||
|
return invtype::InvTypeKronoSize;
|
||||||
|
case invtype::InvTypeOther:
|
||||||
|
return invtype::InvTypeOtherSize;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invtype::GetInvTypeName(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypeInvalid:
|
||||||
|
return "Invalid Type";
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
return "Possessions";
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
return "Bank";
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
return "Shared Bank";
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
return "Trade";
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
return "World";
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
return "Limbo";
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
return "Tribute";
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
return "Trophy Tribute";
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return "Guild Tribute";
|
||||||
|
case invtype::InvTypeMerchant:
|
||||||
|
return "Merchant";
|
||||||
|
case invtype::InvTypeDeleted:
|
||||||
|
return "Deleted";
|
||||||
|
case invtype::InvTypeCorpse:
|
||||||
|
return "Corpse";
|
||||||
|
case invtype::InvTypeBazaar:
|
||||||
|
return "Bazaar";
|
||||||
|
case invtype::InvTypeInspect:
|
||||||
|
return "Inspect";
|
||||||
|
case invtype::InvTypeRealEstate:
|
||||||
|
return "Real Estate";
|
||||||
|
case invtype::InvTypeViewMODPC:
|
||||||
|
return "View MOD PC";
|
||||||
|
case invtype::InvTypeViewMODBank:
|
||||||
|
return "View MOD Bank";
|
||||||
|
case invtype::InvTypeViewMODSharedBank:
|
||||||
|
return "View MOD Shared Bank";
|
||||||
|
case invtype::InvTypeViewMODLimbo:
|
||||||
|
return "View MOD Limbo";
|
||||||
|
case invtype::InvTypeAltStorage:
|
||||||
|
return "Alt Storage";
|
||||||
|
case invtype::InvTypeArchived:
|
||||||
|
return "Archived";
|
||||||
|
case invtype::InvTypeMail:
|
||||||
|
return "Mail";
|
||||||
|
case invtype::InvTypeGuildTrophyTribute:
|
||||||
|
return "Guild Trophy Tribute";
|
||||||
|
case invtype::InvTypeKrono:
|
||||||
|
return "Krono";
|
||||||
|
case invtype::InvTypeOther:
|
||||||
|
return "Other";
|
||||||
|
default:
|
||||||
|
return "Unknown Type";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RoF2::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
|
{
|
||||||
|
switch (inv_slot) {
|
||||||
|
case invslot::InvSlotInvalid:
|
||||||
|
return "Invalid Slot";
|
||||||
|
case invslot::PossessionsCharm:
|
||||||
|
return "Charm";
|
||||||
|
case invslot::PossessionsEar1:
|
||||||
|
return "Ear 1";
|
||||||
|
case invslot::PossessionsHead:
|
||||||
|
return "Head";
|
||||||
|
case invslot::PossessionsFace:
|
||||||
|
return "Face";
|
||||||
|
case invslot::PossessionsEar2:
|
||||||
|
return "Ear 2";
|
||||||
|
case invslot::PossessionsNeck:
|
||||||
|
return "Neck";
|
||||||
|
case invslot::PossessionsShoulders:
|
||||||
|
return "Shoulders";
|
||||||
|
case invslot::PossessionsArms:
|
||||||
|
return "Arms";
|
||||||
|
case invslot::PossessionsBack:
|
||||||
|
return "Back";
|
||||||
|
case invslot::PossessionsWrist1:
|
||||||
|
return "Wrist 1";
|
||||||
|
case invslot::PossessionsWrist2:
|
||||||
|
return "Wrist 2";
|
||||||
|
case invslot::PossessionsRange:
|
||||||
|
return "Range";
|
||||||
|
case invslot::PossessionsHands:
|
||||||
|
return "Hands";
|
||||||
|
case invslot::PossessionsPrimary:
|
||||||
|
return "Primary";
|
||||||
|
case invslot::PossessionsSecondary:
|
||||||
|
return "Secondary";
|
||||||
|
case invslot::PossessionsFinger1:
|
||||||
|
return "Finger 1";
|
||||||
|
case invslot::PossessionsFinger2:
|
||||||
|
return "Finger 2";
|
||||||
|
case invslot::PossessionsChest:
|
||||||
|
return "Chest";
|
||||||
|
case invslot::PossessionsLegs:
|
||||||
|
return "Legs";
|
||||||
|
case invslot::PossessionsFeet:
|
||||||
|
return "Feet";
|
||||||
|
case invslot::PossessionsWaist:
|
||||||
|
return "Waist";
|
||||||
|
case invslot::PossessionsPowerSource:
|
||||||
|
return "Power Source";
|
||||||
|
case invslot::PossessionsAmmo:
|
||||||
|
return "Ammo";
|
||||||
|
case invslot::PossessionsGeneral1:
|
||||||
|
return "General 1";
|
||||||
|
case invslot::PossessionsGeneral2:
|
||||||
|
return "General 2";
|
||||||
|
case invslot::PossessionsGeneral3:
|
||||||
|
return "General 3";
|
||||||
|
case invslot::PossessionsGeneral4:
|
||||||
|
return "General 4";
|
||||||
|
case invslot::PossessionsGeneral5:
|
||||||
|
return "General 5";
|
||||||
|
case invslot::PossessionsGeneral6:
|
||||||
|
return "General 6";
|
||||||
|
case invslot::PossessionsGeneral7:
|
||||||
|
return "General 7";
|
||||||
|
case invslot::PossessionsGeneral8:
|
||||||
|
return "General 8";
|
||||||
|
case invslot::PossessionsGeneral9:
|
||||||
|
return "General 9";
|
||||||
|
case invslot::PossessionsGeneral10:
|
||||||
|
return "General 10";
|
||||||
|
case invslot::PossessionsCursor:
|
||||||
|
return "Cursor";
|
||||||
|
default:
|
||||||
|
return "Unknown Slot";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
|
{
|
||||||
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
|
|
||||||
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
|
return "Invalid Slot";
|
||||||
|
|
||||||
|
if ((size_t)(inv_slot + 1) >= type_size)
|
||||||
|
return "Unknown Slot";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invbag::GetInvBagIndexName(int bag_index)
|
||||||
|
{
|
||||||
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
|
return "Invalid Bag";
|
||||||
|
|
||||||
|
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||||
|
return "Unknown Bag";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF2::invaug::GetInvAugIndexName(int aug_index)
|
||||||
|
{
|
||||||
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
|
return "Invalid Augment";
|
||||||
|
|
||||||
|
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||||
|
return "Unknown Augment";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
294
common/patches/rof2_limits.h
Normal file
294
common/patches/rof2_limits.h
Normal file
@ -0,0 +1,294 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF2_LIMITS_H
|
||||||
|
#define COMMON_ROF2_LIMITS_H
|
||||||
|
|
||||||
|
#include "../types.h"
|
||||||
|
#include "../emu_versions.h"
|
||||||
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace RoF2
|
||||||
|
{
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace invtype {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
|
enum InventoryType : int {
|
||||||
|
InvTypePossessions = InvTypeBegin,
|
||||||
|
InvTypeBank,
|
||||||
|
InvTypeSharedBank,
|
||||||
|
InvTypeTrade,
|
||||||
|
InvTypeWorld,
|
||||||
|
InvTypeLimbo,
|
||||||
|
InvTypeTribute,
|
||||||
|
InvTypeTrophyTribute,
|
||||||
|
InvTypeGuildTribute,
|
||||||
|
InvTypeMerchant,
|
||||||
|
InvTypeDeleted,
|
||||||
|
InvTypeCorpse,
|
||||||
|
InvTypeBazaar,
|
||||||
|
InvTypeInspect,
|
||||||
|
InvTypeRealEstate,
|
||||||
|
InvTypeViewMODPC,
|
||||||
|
InvTypeViewMODBank,
|
||||||
|
InvTypeViewMODSharedBank,
|
||||||
|
InvTypeViewMODLimbo,
|
||||||
|
InvTypeAltStorage,
|
||||||
|
InvTypeArchived,
|
||||||
|
InvTypeMail,
|
||||||
|
InvTypeGuildTrophyTribute,
|
||||||
|
InvTypeKrono,
|
||||||
|
InvTypeOther,
|
||||||
|
InvTypeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*invtype*/
|
||||||
|
|
||||||
|
namespace invslot {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
|
enum PossessionsSlot : int {
|
||||||
|
PossessionsCharm = InvSlotBegin,
|
||||||
|
PossessionsEar1,
|
||||||
|
PossessionsHead,
|
||||||
|
PossessionsFace,
|
||||||
|
PossessionsEar2,
|
||||||
|
PossessionsNeck,
|
||||||
|
PossessionsShoulders,
|
||||||
|
PossessionsArms,
|
||||||
|
PossessionsBack,
|
||||||
|
PossessionsWrist1,
|
||||||
|
PossessionsWrist2,
|
||||||
|
PossessionsRange,
|
||||||
|
PossessionsHands,
|
||||||
|
PossessionsPrimary,
|
||||||
|
PossessionsSecondary,
|
||||||
|
PossessionsFinger1,
|
||||||
|
PossessionsFinger2,
|
||||||
|
PossessionsChest,
|
||||||
|
PossessionsLegs,
|
||||||
|
PossessionsFeet,
|
||||||
|
PossessionsWaist,
|
||||||
|
PossessionsPowerSource,
|
||||||
|
PossessionsAmmo,
|
||||||
|
PossessionsGeneral1,
|
||||||
|
PossessionsGeneral2,
|
||||||
|
PossessionsGeneral3,
|
||||||
|
PossessionsGeneral4,
|
||||||
|
PossessionsGeneral5,
|
||||||
|
PossessionsGeneral6,
|
||||||
|
PossessionsGeneral7,
|
||||||
|
PossessionsGeneral8,
|
||||||
|
PossessionsGeneral9,
|
||||||
|
PossessionsGeneral10,
|
||||||
|
PossessionsCursor,
|
||||||
|
PossessionsCount
|
||||||
|
};
|
||||||
|
|
||||||
|
const int EquipmentBegin = PossessionsCharm;
|
||||||
|
const int EquipmentEnd = PossessionsAmmo;
|
||||||
|
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||||
|
|
||||||
|
const int GeneralBegin = PossessionsGeneral1;
|
||||||
|
const int GeneralEnd = PossessionsGeneral10;
|
||||||
|
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||||
|
|
||||||
|
} /*invslot*/
|
||||||
|
|
||||||
|
namespace invbag {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
|
} /*invbag*/
|
||||||
|
|
||||||
|
namespace invaug {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
|
} /*invaug*/
|
||||||
|
|
||||||
|
namespace item {
|
||||||
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
//enum Unknown : int { // looks like item class..but, RoF has it too - nothing in UF-
|
||||||
|
// Unknown1 = 0,
|
||||||
|
// Unknown2 = 1,
|
||||||
|
// Unknown3 = 2,
|
||||||
|
// Unknown4 = 5 // krono?
|
||||||
|
//};
|
||||||
|
|
||||||
|
enum ItemPacketType : int {
|
||||||
|
ItemPacketMerchant = 100,
|
||||||
|
ItemPacketTradeView = 101,
|
||||||
|
ItemPacketLoot = 102,
|
||||||
|
ItemPacketTrade = 103,
|
||||||
|
ItemPacketCharInventory = 105,
|
||||||
|
ItemPacketLimbo = 106,
|
||||||
|
ItemPacketWorldContainer = 107,
|
||||||
|
ItemPacketTributeItem = 108,
|
||||||
|
ItemPacketGuildTribute = 109,
|
||||||
|
ItemPacket10 = 110,
|
||||||
|
ItemPacket11 = 111,
|
||||||
|
ItemPacket12 = 112,
|
||||||
|
ItemPacketRecovery = 113,
|
||||||
|
ItemPacket14 = 115
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*item*/
|
||||||
|
|
||||||
|
namespace profile {
|
||||||
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*profile*/
|
||||||
|
|
||||||
|
namespace constants {
|
||||||
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
|
||||||
|
namespace behavior {
|
||||||
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
|
namespace skills {
|
||||||
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF2; }
|
||||||
|
|
||||||
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = false;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = true;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = true;
|
||||||
|
const bool AllowClickCastFromBag = true;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace invtype {
|
||||||
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
|
const size_t InvTypeBankSize = 24;
|
||||||
|
const size_t InvTypeSharedBankSize = 2;
|
||||||
|
const size_t InvTypeTradeSize = 8;
|
||||||
|
const size_t InvTypeWorldSize = 10;
|
||||||
|
const size_t InvTypeLimboSize = 36;
|
||||||
|
const size_t InvTypeTributeSize = 5;
|
||||||
|
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||||
|
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||||
|
const size_t InvTypeMerchantSize = 200;
|
||||||
|
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||||
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
|
const size_t InvTypeBazaarSize = 200;
|
||||||
|
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||||
|
const size_t InvTypeRealEstateSize = 0;//unknown
|
||||||
|
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||||
|
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||||
|
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||||
|
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||||
|
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||||
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
|
const size_t InvTypeMailSize = 0;//unknown
|
||||||
|
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
||||||
|
const size_t InvTypeKronoSize = 0;//unknown
|
||||||
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
|
|
||||||
|
} /*invtype*/
|
||||||
|
|
||||||
|
namespace invslot {
|
||||||
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
|
} /*invslot*/
|
||||||
|
|
||||||
|
namespace invbag {
|
||||||
|
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||||
|
|
||||||
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
|
} /*invbag*/
|
||||||
|
|
||||||
|
namespace invaug {
|
||||||
|
const size_t ItemAugSize = 6;
|
||||||
|
|
||||||
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
|
} /*invaug*/
|
||||||
|
|
||||||
|
namespace item {
|
||||||
|
|
||||||
|
} /*item*/
|
||||||
|
|
||||||
|
namespace profile {
|
||||||
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
|
|
||||||
|
const size_t PotionBeltSize = 5;
|
||||||
|
|
||||||
|
const size_t SkillArraySize = 100;
|
||||||
|
|
||||||
|
} /*profile*/
|
||||||
|
|
||||||
|
namespace constants {
|
||||||
|
const size_t CharacterCreationLimit = 12;
|
||||||
|
|
||||||
|
const size_t SayLinkBodySize = 56;
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
|
||||||
|
namespace behavior {
|
||||||
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
|
namespace skills {
|
||||||
|
const size_t LastUsableSkill = EQEmu::skills::Skill2HPiercing;
|
||||||
|
|
||||||
|
} /*skills*/
|
||||||
|
|
||||||
|
}; /*RoF2*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF2_LIMITS_H*/
|
||||||
@ -1,3 +1,23 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// out-going packets that require an ENCODE translation:
|
// out-going packets that require an ENCODE translation:
|
||||||
// Begin RoF2 Encodes
|
// Begin RoF2 Encodes
|
||||||
|
|
||||||
@ -57,6 +77,7 @@ E(OP_GroupFollow)
|
|||||||
E(OP_GroupFollow2)
|
E(OP_GroupFollow2)
|
||||||
E(OP_GroupInvite)
|
E(OP_GroupInvite)
|
||||||
E(OP_GroupUpdate)
|
E(OP_GroupUpdate)
|
||||||
|
E(OP_GuildBank)
|
||||||
E(OP_GuildMemberList)
|
E(OP_GuildMemberList)
|
||||||
E(OP_GuildMemberUpdate)
|
E(OP_GuildMemberUpdate)
|
||||||
E(OP_GuildsList)
|
E(OP_GuildsList)
|
||||||
@ -120,10 +141,12 @@ E(OP_ZoneEntry)
|
|||||||
E(OP_ZonePlayerToBind)
|
E(OP_ZonePlayerToBind)
|
||||||
E(OP_ZoneServerInfo)
|
E(OP_ZoneServerInfo)
|
||||||
E(OP_ZoneSpawns)
|
E(OP_ZoneSpawns)
|
||||||
|
E(OP_CrystalCountUpdate)
|
||||||
// Begin RoF Decodes
|
// Begin RoF Decodes
|
||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_AltCurrencySell)
|
D(OP_AltCurrencySell)
|
||||||
D(OP_AltCurrencySellSelection)
|
D(OP_AltCurrencySellSelection)
|
||||||
|
D(OP_Animation)
|
||||||
D(OP_ApplyPoison)
|
D(OP_ApplyPoison)
|
||||||
D(OP_AugmentInfo)
|
D(OP_AugmentInfo)
|
||||||
D(OP_AugmentItem)
|
D(OP_AugmentItem)
|
||||||
@ -151,6 +174,7 @@ D(OP_GroupFollow)
|
|||||||
D(OP_GroupFollow2)
|
D(OP_GroupFollow2)
|
||||||
D(OP_GroupInvite)
|
D(OP_GroupInvite)
|
||||||
D(OP_GroupInvite2)
|
D(OP_GroupInvite2)
|
||||||
|
D(OP_GuildBank)
|
||||||
D(OP_GuildDemote)
|
D(OP_GuildDemote)
|
||||||
D(OP_GuildRemove)
|
D(OP_GuildRemove)
|
||||||
D(OP_GuildStatus)
|
D(OP_GuildStatus)
|
||||||
|
|||||||
@ -1,7 +1,28 @@
|
|||||||
#ifndef ROF2_STRUCTS_H_
|
/* EQEMu: Everquest Server Emulator
|
||||||
#define ROF2_STRUCTS_H_
|
|
||||||
|
|
||||||
namespace RoF2 {
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF2_STRUCTS_H
|
||||||
|
#define COMMON_ROF2_STRUCTS_H
|
||||||
|
|
||||||
|
|
||||||
|
namespace RoF2
|
||||||
|
{
|
||||||
namespace structs {
|
namespace structs {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -29,22 +50,24 @@ struct WorldObjectsSent_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// New for RoF2 - Size: 12
|
// New for RoF2 - Size: 12
|
||||||
struct ItemSlotStruct {
|
struct InventorySlot_Struct
|
||||||
/*000*/ int16 SlotType; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Delete Item = -1
|
{
|
||||||
|
/*000*/ int16 Type; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Delete Item = -1
|
||||||
/*002*/ int16 Unknown02;
|
/*002*/ int16 Unknown02;
|
||||||
/*004*/ int16 MainSlot;
|
/*004*/ int16 Slot;
|
||||||
/*006*/ int16 SubSlot;
|
/*006*/ int16 SubIndex;
|
||||||
/*008*/ int16 AugSlot; // Guessing - Seen 0xffff
|
/*008*/ int16 AugIndex; // Guessing - Seen 0xffff
|
||||||
/*010*/ int16 Unknown01; // Normally 0 - Seen 13262 when deleting an item, but didn't match item ID
|
/*010*/ int16 Unknown01; // Normally 0 - Seen 13262 when deleting an item, but didn't match item ID
|
||||||
/*012*/
|
/*012*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// New for RoF2 - Used for Merchant_Purchase_Struct
|
// New for RoF2 - Used for Merchant_Purchase_Struct
|
||||||
// Can't sellfrom other than main inventory so Slot Type is not needed.
|
// Can't sellfrom other than main inventory so Slot Type is not needed.
|
||||||
struct MainInvItemSlotStruct {
|
struct TypelessInventorySlot_Struct
|
||||||
/*000*/ int16 MainSlot;
|
{
|
||||||
/*002*/ int16 SubSlot;
|
/*000*/ int16 Slot;
|
||||||
/*004*/ int16 AugSlot;
|
/*002*/ int16 SubIndex;
|
||||||
|
/*004*/ int16 AugIndex;
|
||||||
/*006*/ int16 Unknown01;
|
/*006*/ int16 Unknown01;
|
||||||
/*008*/
|
/*008*/
|
||||||
};
|
};
|
||||||
@ -140,7 +163,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -148,21 +171,65 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 20 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
uint32 HeroForgeModel;
|
uint32 HeroForgeModel;
|
||||||
uint32 Material2;
|
uint32 Material2; // Same as material?
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Needs more research regarding new slots
|
||||||
|
//struct TextureProfile
|
||||||
|
//{
|
||||||
|
// union {
|
||||||
|
// struct {
|
||||||
|
// Texture_Struct Head;
|
||||||
|
// Texture_Struct Chest;
|
||||||
|
// Texture_Struct Arms;
|
||||||
|
// Texture_Struct Wrist;
|
||||||
|
// Texture_Struct Hands;
|
||||||
|
// Texture_Struct Legs;
|
||||||
|
// Texture_Struct Feet;
|
||||||
|
// Texture_Struct Primary;
|
||||||
|
// Texture_Struct Secondary;
|
||||||
|
// };
|
||||||
|
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// TextureProfile();
|
||||||
|
//};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ char Name[1]; // Name null terminated
|
/*0000*/ char Name[1]; // Name null terminated
|
||||||
@ -208,21 +275,6 @@ struct CharacterSelect_Struct
|
|||||||
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 20 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/ uint32 HeroForgeModel;
|
|
||||||
/*16*/ uint32 Material2; // Same as material?
|
|
||||||
/*20*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct Membership_Entry_Struct
|
struct Membership_Entry_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
||||||
@ -416,7 +468,7 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint8 unknown12;
|
/*0000*/ uint8 unknown12;
|
||||||
/*0000*/ uint32 petOwnerId;
|
/*0000*/ uint32 petOwnerId;
|
||||||
/*0000*/ uint8 unknown13;
|
/*0000*/ uint8 unknown13;
|
||||||
/*0000*/ uint32 unknown14; // Stance 64 = normal 4 = aggressive 40 = stun/mezzed
|
/*0000*/ uint32 PlayerState; // Stance 64 = normal 4 = aggressive 40 = stun/mezzed
|
||||||
/*0000*/ uint32 unknown15;
|
/*0000*/ uint32 unknown15;
|
||||||
/*0000*/ uint32 unknown16;
|
/*0000*/ uint32 unknown16;
|
||||||
/*0000*/ uint32 unknown17;
|
/*0000*/ uint32 unknown17;
|
||||||
@ -424,39 +476,24 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*0000*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*0000*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*0000*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*0000*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*0000*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*0000*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*0000*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*0000*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*0000*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
} equip;
|
} equip;
|
||||||
/*0000*/ EquipStruct equipment[9];
|
/*0000*/ Texture_Struct equipment[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
@ -598,7 +635,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -631,11 +668,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@ -656,9 +694,12 @@ struct CastSpell_Struct
|
|||||||
{
|
{
|
||||||
/*00*/ uint32 slot;
|
/*00*/ uint32 slot;
|
||||||
/*04*/ uint32 spell_id;
|
/*04*/ uint32 spell_id;
|
||||||
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
/*08*/ InventorySlot_Struct inventory_slot; // slot for clicky item, Seen unknown of 131 = normal cast
|
||||||
/*20*/ uint32 target_id;
|
/*20*/ uint32 target_id;
|
||||||
/*24*/ uint32 cs_unknown[5];
|
/*24*/ uint32 cs_unknown[2];
|
||||||
|
/*32*/ float y_pos;
|
||||||
|
/*36*/ float x_pos;
|
||||||
|
/*40*/ float z_pos;
|
||||||
/*44*/
|
/*44*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -679,69 +720,31 @@ struct SpawnAppearance_Struct
|
|||||||
|
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ float unknown004; // Seen 1 for no buff
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*002*/ uint8 unknown002; //pretty sure padding now
|
||||||
/*009*/ uint32 unknown016;
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*013*/ uint8 bard_modifier;
|
/*004*/ float bard_modifier;
|
||||||
/*014*/ uint32 duration;
|
/*008*/ uint32 spellid;
|
||||||
/*018*/ uint8 level;
|
|
||||||
/*019*/ uint32 spellid;
|
|
||||||
/*023*/ uint32 counters;
|
|
||||||
/*027*/ uint8 unknown0028[53];
|
|
||||||
/*080*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SpellBuff_Struct_Old
|
|
||||||
{
|
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
|
||||||
/*001*/ uint8 level;
|
|
||||||
/*002*/ uint8 bard_modifier;
|
|
||||||
/*003*/ uint8 effect; // not real
|
|
||||||
/*004*/ float unknown004; // Seen 1 for no buff
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ uint32 duration;
|
/*012*/ uint32 duration;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 num_hits;
|
||||||
/*024*/ uint32 counters;
|
/*024*/ float y; // referenced by SPA 441
|
||||||
/*028*/ uint8 unknown0028[60];
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/ uint32 unknown036;
|
||||||
|
/*040*/ int32 slot_data[12]; // book keeping stuff per slot (counters, rune/vie)
|
||||||
/*088*/
|
/*088*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not functional yet, but this is what the packet looks like on Live
|
struct SpellBuffPacket_Struct {
|
||||||
struct SpellBuffFade_Struct_Live {
|
/*000*/ uint32 entityid; // Player id who cast the buff
|
||||||
/*000*/ uint32 entityid; // Player id who cast the buff
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*004*/ uint8 unknown004;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown007;
|
|
||||||
/*008*/ float unknown008;
|
|
||||||
/*012*/ uint32 spellid;
|
|
||||||
/*016*/ uint32 duration;
|
|
||||||
/*020*/ uint32 playerId; // Global player ID?
|
|
||||||
/*024*/ uint32 num_hits;
|
|
||||||
/*028*/ uint8 unknown0028[64];
|
|
||||||
/*092*/ uint32 slotid;
|
/*092*/ uint32 slotid;
|
||||||
/*096*/ uint32 bufffade;
|
/*096*/ uint32 bufffade;
|
||||||
/*100*/
|
/*100*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
|
||||||
/*000*/ uint32 entityid;
|
|
||||||
/*004*/ uint8 slot;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ uint32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; // Global player ID?
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
|
||||||
/*032*/ uint32 bufffade;
|
|
||||||
/*036*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BuffRemoveRequest_Struct
|
struct BuffRemoveRequest_Struct
|
||||||
{
|
{
|
||||||
/*00*/ uint32 SlotID;
|
/*00*/ uint32 SlotID;
|
||||||
@ -874,7 +877,7 @@ struct AA_Array
|
|||||||
{
|
{
|
||||||
uint32 AA;
|
uint32 AA;
|
||||||
uint32 value;
|
uint32 value;
|
||||||
uint32 unknown08; // Looks like AA_Array is now 12 bytes in Live
|
uint32 charges; // expendable charges
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Disciplines_Struct {
|
struct Disciplines_Struct {
|
||||||
@ -922,13 +925,13 @@ struct BandolierItem_Struct_Old
|
|||||||
struct Bandolier_Struct
|
struct Bandolier_Struct
|
||||||
{
|
{
|
||||||
char Name[1]; // Variable Length
|
char Name[1]; // Variable Length
|
||||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bandolier_Struct_Old
|
struct Bandolier_Struct_Old
|
||||||
{
|
{
|
||||||
char Name[32];
|
char Name[32];
|
||||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBeltItem_Struct
|
struct PotionBeltItem_Struct
|
||||||
@ -948,12 +951,12 @@ struct PotionBeltItem_Struct_Old
|
|||||||
|
|
||||||
struct PotionBelt_Struct
|
struct PotionBelt_Struct
|
||||||
{
|
{
|
||||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBelt_Struct_Old
|
struct PotionBelt_Struct_Old
|
||||||
{
|
{
|
||||||
PotionBeltItem_Struct_Old Items[consts::POTION_BELT_ITEM_COUNT];
|
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GroupLeadershipAA_Struct {
|
struct GroupLeadershipAA_Struct {
|
||||||
@ -1052,38 +1055,38 @@ union
|
|||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*00184*/ EquipStruct equip_helmet; // Equipment: Helmet visual
|
/*00184*/ Texture_Struct equip_helmet; // Equipment: Helmet visual
|
||||||
/*00204*/ EquipStruct equip_chest; // Equipment: Chest visual
|
/*00204*/ Texture_Struct equip_chest; // Equipment: Chest visual
|
||||||
/*00224*/ EquipStruct equip_arms; // Equipment: Arms visual
|
/*00224*/ Texture_Struct equip_arms; // Equipment: Arms visual
|
||||||
/*00244*/ EquipStruct equip_bracers; // Equipment: Wrist visual
|
/*00244*/ Texture_Struct equip_bracers; // Equipment: Wrist visual
|
||||||
/*00264*/ EquipStruct equip_hands; // Equipment: Hands visual
|
/*00264*/ Texture_Struct equip_hands; // Equipment: Hands visual
|
||||||
/*00284*/ EquipStruct equip_legs; // Equipment: Legs visual
|
/*00284*/ Texture_Struct equip_legs; // Equipment: Legs visual
|
||||||
/*00304*/ EquipStruct equip_feet; // Equipment: Boots visual
|
/*00304*/ Texture_Struct equip_feet; // Equipment: Boots visual
|
||||||
/*00324*/ EquipStruct equip_primary; // Equipment: Main visual
|
/*00324*/ Texture_Struct equip_primary; // Equipment: Main visual
|
||||||
/*00344*/ EquipStruct equip_secondary; // Equipment: Off visual
|
/*00344*/ Texture_Struct equip_secondary; // Equipment: Off visual
|
||||||
// Below slots are just guesses, but all 0s anyway...
|
// Below slots are just guesses, but all 0s anyway...
|
||||||
/*00364*/ EquipStruct equip_charm; // Equipment: Non-visual
|
/*00364*/ Texture_Struct equip_charm; // Equipment: Non-visual
|
||||||
/*00384*/ EquipStruct equip_ear1; // Equipment: Non-visual
|
/*00384*/ Texture_Struct equip_ear1; // Equipment: Non-visual
|
||||||
/*00404*/ EquipStruct equip_ear2; // Equipment: Non-visual
|
/*00404*/ Texture_Struct equip_ear2; // Equipment: Non-visual
|
||||||
/*00424*/ EquipStruct equip_face; // Equipment: Non-visual
|
/*00424*/ Texture_Struct equip_face; // Equipment: Non-visual
|
||||||
/*00444*/ EquipStruct equip_neck; // Equipment: Non-visual
|
/*00444*/ Texture_Struct equip_neck; // Equipment: Non-visual
|
||||||
/*00464*/ EquipStruct equip_shoulder; // Equipment: Non-visual
|
/*00464*/ Texture_Struct equip_shoulder; // Equipment: Non-visual
|
||||||
/*00484*/ EquipStruct equip_bracer2; // Equipment: Non-visual
|
/*00484*/ Texture_Struct equip_bracer2; // Equipment: Non-visual
|
||||||
/*00504*/ EquipStruct equip_range; // Equipment: Non-visual
|
/*00504*/ Texture_Struct equip_range; // Equipment: Non-visual
|
||||||
/*00524*/ EquipStruct equip_ring1; // Equipment: Non-visual
|
/*00524*/ Texture_Struct equip_ring1; // Equipment: Non-visual
|
||||||
/*00544*/ EquipStruct equip_ring2; // Equipment: Non-visual
|
/*00544*/ Texture_Struct equip_ring2; // Equipment: Non-visual
|
||||||
/*00564*/ EquipStruct equip_waist; // Equipment: Non-visual
|
/*00564*/ Texture_Struct equip_waist; // Equipment: Non-visual
|
||||||
/*00584*/ EquipStruct equip_powersource;// Equipment: Non-visual
|
/*00584*/ Texture_Struct equip_powersource;// Equipment: Non-visual
|
||||||
/*00604*/ EquipStruct equip_ammo; // Equipment: Non-visual
|
/*00604*/ Texture_Struct equip_ammo; // Equipment: Non-visual
|
||||||
} equip;
|
} equip;
|
||||||
/*00184*/ EquipStruct equipment[22]; // Total Slots
|
/*00184*/ Texture_Struct equipment[22]; // Total Slots
|
||||||
};
|
};
|
||||||
/*00624*/ uint32 equip2_count; // Seen 9
|
/*00624*/ uint32 equip2_count; // Seen 9
|
||||||
/*00628*/ EquipStruct equipment2[_MaterialCount]; // Appears to be Visible slots, but all 0s
|
/*00628*/ Texture_Struct equipment2[EQEmu::textures::TextureCount]; // Appears to be Visible slots, but all 0s
|
||||||
/*00808*/ uint32 tint_count; // Seen 9
|
/*00808*/ uint32 tint_count; // Seen 9
|
||||||
/*00812*/ Color_Struct item_tint[_MaterialCount]; // RR GG BB 00
|
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00848*/ uint32 tint_count2; // Seen 9
|
/*00848*/ uint32 tint_count2; // Seen 9
|
||||||
/*00852*/ Color_Struct item_tint2[_MaterialCount]; // RR GG BB 00
|
/*00852*/ TintProfile item_tint2; // RR GG BB 00
|
||||||
/*00888*/ uint8 haircolor; // Player hair color
|
/*00888*/ uint8 haircolor; // Player hair color
|
||||||
/*00889*/ uint8 beardcolor; // Player beard color
|
/*00889*/ uint8 beardcolor; // Player beard color
|
||||||
/*00890*/ uint32 unknown_rof5; //
|
/*00890*/ uint32 unknown_rof5; //
|
||||||
@ -1163,7 +1166,7 @@ union
|
|||||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||||
/*12953*/ uint16 unknown_rof20; //
|
/*12953*/ uint16 unknown_rof20; //
|
||||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||||
/*12959*/ Bandolier_Struct bandoliers[consts::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||||
/*13699*/ uint32 potionbelt_count; // Seen 5
|
/*13699*/ uint32 potionbelt_count; // Seen 5
|
||||||
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
||||||
/*13748*/ int32 unknown_rof21; // Seen -1
|
/*13748*/ int32 unknown_rof21; // Seen -1
|
||||||
@ -1290,7 +1293,7 @@ struct TargetReject_Struct {
|
|||||||
|
|
||||||
struct PetCommand_Struct {
|
struct PetCommand_Struct {
|
||||||
/*00*/ uint32 command;
|
/*00*/ uint32 command;
|
||||||
/*04*/ uint32 unknown04;
|
/*04*/ uint32 target;
|
||||||
/*08*/ uint32 unknown08;
|
/*08*/ uint32 unknown08;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1359,7 +1362,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF2
|
/*018*/ uint32 unknown18; // New to RoF2
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@ -1415,8 +1418,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 value;
|
/*02*/ uint8 action;
|
||||||
/*03*/ uint8 action;
|
/*03*/ uint8 speed;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1481,9 +1484,11 @@ struct CombatDamage_Struct
|
|||||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
||||||
/* 05 */ uint32 spellid;
|
/* 05 */ uint32 spellid;
|
||||||
/* 09 */ int32 damage;
|
/* 09 */ int32 damage;
|
||||||
/* 13 */ float unknown11; // cd cc cc 3d
|
/* 13 */ float force; // cd cc cc 3d
|
||||||
/* 17 */ float sequence; // see above notes in Action_Struct
|
/* 17 */ float meleepush_xy; // see above notes in Action_Struct
|
||||||
/* 21 */ uint8 unknown19[9]; // was [9]
|
/* 21 */ float meleepush_z;
|
||||||
|
/* 25 */ uint8 unknown25; // was [9]
|
||||||
|
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||||
/* 30 */
|
/* 30 */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1742,7 +1747,7 @@ struct BulkItemPacket_Struct
|
|||||||
|
|
||||||
struct Consume_Struct
|
struct Consume_Struct
|
||||||
{
|
{
|
||||||
/*000*/ ItemSlotStruct slot;
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||||
/*016*/ uint32 type; // 0x01=Food 0x02=Water
|
/*016*/ uint32 type; // 0x01=Food 0x02=Water
|
||||||
/*020*/ uint32 c_unknown1; // Seen 2
|
/*020*/ uint32 c_unknown1; // Seen 2
|
||||||
@ -1774,16 +1779,18 @@ struct ItemProperties_Struct {
|
|||||||
/*008*/
|
/*008*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DeleteItem_Struct {
|
struct DeleteItem_Struct
|
||||||
/*0000*/ ItemSlotStruct from_slot;
|
{
|
||||||
/*0012*/ ItemSlotStruct to_slot;
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
/*0024*/ uint32 number_in_stack;
|
/*0024*/ uint32 number_in_stack;
|
||||||
/*0028*/
|
/*0028*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MoveItem_Struct {
|
struct MoveItem_Struct
|
||||||
/*0000*/ ItemSlotStruct from_slot;
|
{
|
||||||
/*0012*/ ItemSlotStruct to_slot;
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
/*0024*/ uint32 number_in_stack;
|
/*0024*/ uint32 number_in_stack;
|
||||||
/*0028*/
|
/*0028*/
|
||||||
};
|
};
|
||||||
@ -1854,6 +1861,114 @@ struct GuildUpdate_Struct {
|
|||||||
GuildsListEntry_Struct entry;
|
GuildsListEntry_Struct entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GuildBankAck_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 10
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankDepositAck_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 10
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint32 Fail; //1 = Fail, 0 = Success
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankPromote_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 3
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*12*/ uint32 Slot;
|
||||||
|
/*16*/ uint32 Slot2; // Always appears to be the same as Slot for Action code 3
|
||||||
|
/*20*/ uint32 unknown20;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankPermissions_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 6
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID;
|
||||||
|
/*10*/ uint16 Unknown10; // Saw 1, probably indicating it is the main area rather than deposits
|
||||||
|
/*12*/ uint32 ItemID;
|
||||||
|
/*16*/ uint32 Permissions;
|
||||||
|
/*20*/ char MemberName[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankViewItem_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID; // 0 = Deposit area, 1 = Main area
|
||||||
|
/*10*/ uint16 Area;
|
||||||
|
/*12*/ uint32 Unknown12;
|
||||||
|
/*16*/ uint32 Unknown16;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankWithdrawItem_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID;
|
||||||
|
/*10*/ uint16 Area;
|
||||||
|
/*12*/ uint32 Unknown12;
|
||||||
|
/*16*/ uint32 Quantity;
|
||||||
|
/*20*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankItemUpdate_Struct
|
||||||
|
{
|
||||||
|
void Init(uint32 inAction, uint32 inUnknown004, uint16 inSlotID, uint16 inArea, uint16 inUnknown012, uint32 inItemID, uint32 inIcon, uint32 inQuantity,
|
||||||
|
uint32 inPermissions, uint32 inAllowMerge, bool inUseable)
|
||||||
|
{
|
||||||
|
Action = inAction;
|
||||||
|
Unknown004 = inUnknown004;
|
||||||
|
SlotID = inSlotID;
|
||||||
|
Area = inArea;
|
||||||
|
Unknown012 = inUnknown012;
|
||||||
|
ItemID = inItemID;
|
||||||
|
Icon = inIcon;
|
||||||
|
Quantity = inQuantity;
|
||||||
|
Permissions = inPermissions;
|
||||||
|
AllowMerge = inAllowMerge;
|
||||||
|
Useable = inUseable;
|
||||||
|
ItemName[0] = '\0';
|
||||||
|
Donator[0] = '\0';
|
||||||
|
WhoFor[0] = '\0';
|
||||||
|
};
|
||||||
|
|
||||||
|
/*000*/ uint32 Action;
|
||||||
|
/*004*/ uint32 Unknown004;
|
||||||
|
/*008*/ uint32 Unknown08;
|
||||||
|
/*012*/ uint16 SlotID;
|
||||||
|
/*014*/ uint16 Area;
|
||||||
|
/*016*/ uint32 Unknown012;
|
||||||
|
/*020*/ uint32 ItemID;
|
||||||
|
/*024*/ uint32 Icon;
|
||||||
|
/*028*/ uint32 Quantity;
|
||||||
|
/*032*/ uint32 Permissions;
|
||||||
|
/*036*/ uint8 AllowMerge;
|
||||||
|
/*037*/ uint8 Useable; // Used in conjunction with the Public-if-useable permission.
|
||||||
|
/*038*/ char ItemName[64];
|
||||||
|
/*102*/ char Donator[64];
|
||||||
|
/*166*/ char WhoFor[64];
|
||||||
|
/*230*/ uint16 Unknown226;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankClear_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*12*/ uint32 DepositAreaCount;
|
||||||
|
/*16*/ uint32 MainAreaCount;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Money Loot
|
** Money Loot
|
||||||
** Length: 22 Bytes
|
** Length: 22 Bytes
|
||||||
@ -2109,7 +2224,7 @@ struct Merchant_Sell_Struct {
|
|||||||
|
|
||||||
struct Merchant_Purchase_Struct {
|
struct Merchant_Purchase_Struct {
|
||||||
/*000*/ uint32 npcid; // Merchant NPC's entity id
|
/*000*/ uint32 npcid; // Merchant NPC's entity id
|
||||||
/*004*/ MainInvItemSlotStruct itemslot;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 quantity;
|
/*012*/ uint32 quantity;
|
||||||
/*016*/ uint32 price;
|
/*016*/ uint32 price;
|
||||||
/*020*/
|
/*020*/
|
||||||
@ -2167,9 +2282,10 @@ struct AltCurrencyUpdate_Struct {
|
|||||||
|
|
||||||
//Client -> Server
|
//Client -> Server
|
||||||
//When an item is selected while the alt currency merchant window is open
|
//When an item is selected while the alt currency merchant window is open
|
||||||
struct AltCurrencySelectItem_Struct {
|
struct AltCurrencySelectItem_Struct
|
||||||
|
{
|
||||||
/*000*/ uint32 merchant_entity_id;
|
/*000*/ uint32 merchant_entity_id;
|
||||||
/*004*/ MainInvItemSlotStruct slot_id;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*004*/ //uint32 slot_id;
|
/*004*/ //uint32 slot_id;
|
||||||
/*008*/ uint32 unknown008;
|
/*008*/ uint32 unknown008;
|
||||||
/*012*/ uint32 unknown012;
|
/*012*/ uint32 unknown012;
|
||||||
@ -2225,9 +2341,10 @@ struct AltCurrencyReclaim_Struct {
|
|||||||
/*012*/ uint32 reclaim_flag; //1 = this is reclaim
|
/*012*/ uint32 reclaim_flag; //1 = this is reclaim
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AltCurrencySellItem_Struct {
|
struct AltCurrencySellItem_Struct
|
||||||
|
{
|
||||||
/*000*/ uint32 merchant_entity_id;
|
/*000*/ uint32 merchant_entity_id;
|
||||||
/*004*/ MainInvItemSlotStruct slot_id;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*004*/ //uint32 slot_id;
|
/*004*/ //uint32 slot_id;
|
||||||
/*016*/ uint32 charges;
|
/*016*/ uint32 charges;
|
||||||
/*020*/ uint32 cost;
|
/*020*/ uint32 cost;
|
||||||
@ -2243,7 +2360,7 @@ struct Adventure_Purchase_Struct {
|
|||||||
struct Adventure_Sell_Struct {
|
struct Adventure_Sell_Struct {
|
||||||
/*000*/ uint32 unknown000; //0x01 - Stack Size/Charges?
|
/*000*/ uint32 unknown000; //0x01 - Stack Size/Charges?
|
||||||
/*004*/ uint32 npcid;
|
/*004*/ uint32 npcid;
|
||||||
/*008*/ MainInvItemSlotStruct slot;
|
/*008*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*016*/ uint32 charges;
|
/*016*/ uint32 charges;
|
||||||
/*020*/ uint32 sell_price;
|
/*020*/ uint32 sell_price;
|
||||||
/*024*/
|
/*024*/
|
||||||
@ -2306,7 +2423,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemBase item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@ -2469,7 +2586,7 @@ struct GroupFollow_Struct { // Live Follow Struct
|
|||||||
|
|
||||||
struct InspectBuffs_Struct {
|
struct InspectBuffs_Struct {
|
||||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||||
/*168*/ uint32 tics_remaining[BUFF_COUNT];
|
/*168*/ int32 tics_remaining[BUFF_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LFG_Struct {
|
struct LFG_Struct {
|
||||||
@ -2589,9 +2706,9 @@ struct Stun_Struct { // 8 bytes total
|
|||||||
struct AugmentItem_Struct {
|
struct AugmentItem_Struct {
|
||||||
/*00*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
|
/*00*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
|
||||||
/*04*/ uint32 container_index; // Seen 0
|
/*04*/ uint32 container_index; // Seen 0
|
||||||
/*08*/ ItemSlotStruct container_slot; // Slot of the item being augmented
|
/*08*/ InventorySlot_Struct container_slot; // Slot of the item being augmented
|
||||||
/*20*/ uint32 augment_index; // Seen 0
|
/*20*/ uint32 augment_index; // Seen 0
|
||||||
/*24*/ ItemSlotStruct augment_slot; // Slot of the distiller to use (if one applies)
|
/*24*/ InventorySlot_Struct augment_slot; // Slot of the distiller to use (if one applies)
|
||||||
/*36*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
|
/*36*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
|
||||||
/*36*/ //int32 augment_slot;
|
/*36*/ //int32 augment_slot;
|
||||||
/*40*/
|
/*40*/
|
||||||
@ -2732,7 +2849,8 @@ struct Object_Struct {
|
|||||||
/*00*/ uint32 drop_id; // Unique object id for zone
|
/*00*/ uint32 drop_id; // Unique object id for zone
|
||||||
/*00*/ uint32 unknown024; // 53 9e f9 7e - same for all objects in the zone?
|
/*00*/ uint32 unknown024; // 53 9e f9 7e - same for all objects in the zone?
|
||||||
/*00*/ float heading; // heading
|
/*00*/ float heading; // heading
|
||||||
/*00*/ float unknown032[2]; // 00 00 00 00 00 00 00 00
|
/*00*/ float x_tilt; //Tilt entire object on X axis
|
||||||
|
/*00*/ float y_tilt; //Tilt entire object on Y axis
|
||||||
/*00*/ float size; // Size - default 1
|
/*00*/ float size; // Size - default 1
|
||||||
/*00*/ float z; // z coord
|
/*00*/ float z; // z coord
|
||||||
/*00*/ float x; // x coord
|
/*00*/ float x; // x coord
|
||||||
@ -3493,27 +3611,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@ -3577,7 +3674,7 @@ struct TributeInfo_Struct {
|
|||||||
|
|
||||||
struct TributeItem_Struct
|
struct TributeItem_Struct
|
||||||
{
|
{
|
||||||
/*00*/ ItemSlotStruct slot;
|
/*00*/ InventorySlot_Struct inventory_slot;
|
||||||
/*12*/ uint32 quantity;
|
/*12*/ uint32 quantity;
|
||||||
/*16*/ uint32 tribute_master_id;
|
/*16*/ uint32 tribute_master_id;
|
||||||
/*20*/ int32 tribute_points;
|
/*20*/ int32 tribute_points;
|
||||||
@ -3614,9 +3711,10 @@ struct Split_Struct
|
|||||||
** Used In: OP_TradeSkillCombine
|
** Used In: OP_TradeSkillCombine
|
||||||
** Last Updated: 01-05-2013
|
** Last Updated: 01-05-2013
|
||||||
*/
|
*/
|
||||||
struct NewCombine_Struct {
|
struct NewCombine_Struct
|
||||||
/*00*/ ItemSlotStruct container_slot;
|
{
|
||||||
/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8)
|
/*00*/ InventorySlot_Struct container_slot;
|
||||||
|
/*12*/ InventorySlot_Struct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8)
|
||||||
/*24*/
|
/*24*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3655,8 +3753,8 @@ struct RecipeReply_Struct {
|
|||||||
struct RecipeAutoCombine_Struct {
|
struct RecipeAutoCombine_Struct {
|
||||||
/*00*/ uint32 object_type;
|
/*00*/ uint32 object_type;
|
||||||
/*04*/ uint32 some_id;
|
/*04*/ uint32 some_id;
|
||||||
/*08*/ ItemSlotStruct container_slot; //echoed in reply - Was uint32 unknown1
|
/*08*/ InventorySlot_Struct container_slot; //echoed in reply - Was uint32 unknown1
|
||||||
/*20*/ ItemSlotStruct unknown_slot; //echoed in reply
|
/*20*/ InventorySlot_Struct unknown_slot; //echoed in reply
|
||||||
/*32*/ uint32 recipe_id;
|
/*32*/ uint32 recipe_id;
|
||||||
/*36*/ uint32 reply_code;
|
/*36*/ uint32 reply_code;
|
||||||
/*40*/
|
/*40*/
|
||||||
@ -4186,9 +4284,11 @@ struct Arrow_Struct {
|
|||||||
/*068*/ uint8 unknown068;
|
/*068*/ uint8 unknown068;
|
||||||
/*069*/ uint8 unknown069;
|
/*069*/ uint8 unknown069;
|
||||||
/*070*/ uint8 unknown070;
|
/*070*/ uint8 unknown070;
|
||||||
/*071*/ uint8 item_type;
|
/*071*/ uint8 unknown071;
|
||||||
/*072*/ uint8 skill;
|
/*072*/ uint8 unknown072;
|
||||||
/*073*/ uint8 unknown073[16];
|
/*073*/ uint8 skill;
|
||||||
|
/*074*/ uint8 item_type;
|
||||||
|
/*075*/ uint8 unknown075[14];
|
||||||
/*089*/ char model_name[27];
|
/*089*/ char model_name[27];
|
||||||
/*116*/
|
/*116*/
|
||||||
};
|
};
|
||||||
@ -4247,9 +4347,9 @@ struct SendAA_Struct {
|
|||||||
/*0025*/ uint32 cost;
|
/*0025*/ uint32 cost;
|
||||||
/*0029*/ uint32 seq;
|
/*0029*/ uint32 seq;
|
||||||
/*0033*/ uint32 current_level; //1s, MQ2 calls this AARankRequired
|
/*0033*/ uint32 current_level; //1s, MQ2 calls this AARankRequired
|
||||||
/*0037*/ uint32 unknown037; // Introduced during HoT
|
/*0037*/ uint32 prereq_skill_count; // mutliple prereqs at least 1, even no prereqs
|
||||||
/*0041*/ uint32 prereq_skill; //is < 0, abs() is category #
|
/*0041*/ uint32 prereq_skill; //is < 0, abs() is category #
|
||||||
/*0045*/ uint32 unknown045; // New Mar 21 2012 - Seen 1
|
/*0045*/ uint32 prereq_minpoints_count; // mutliple prereqs at least 1, even no prereqs
|
||||||
/*0049*/ uint32 prereq_minpoints; //min points in the prereq
|
/*0049*/ uint32 prereq_minpoints; //min points in the prereq
|
||||||
/*0053*/ uint32 type;
|
/*0053*/ uint32 type;
|
||||||
/*0057*/ uint32 spellid;
|
/*0057*/ uint32 spellid;
|
||||||
@ -4262,10 +4362,16 @@ struct SendAA_Struct {
|
|||||||
/*0081*/ uint32 last_id;
|
/*0081*/ uint32 last_id;
|
||||||
/*0085*/ uint32 next_id;
|
/*0085*/ uint32 next_id;
|
||||||
/*0089*/ uint32 cost2;
|
/*0089*/ uint32 cost2;
|
||||||
/*0093*/ uint8 unknown80[7];
|
/*0093*/ uint8 unknown93;
|
||||||
|
/*0094*/ uint8 grant_only; // VetAAs, progression, etc
|
||||||
|
/*0095*/ uint8 unknown95; // 1 for skill cap increase AAs, Mystical Attuning, and RNG attack inc, doesn't seem to matter though
|
||||||
|
/*0096*/ uint32 expendable_charges; // max charges of the AA
|
||||||
/*0100*/ uint32 aa_expansion;
|
/*0100*/ uint32 aa_expansion;
|
||||||
/*0104*/ uint32 special_category;
|
/*0104*/ uint32 special_category;
|
||||||
/*0108*/ uint32 unknown0096;
|
/*0108*/ uint8 shroud;
|
||||||
|
/*0109*/ uint8 unknown109;
|
||||||
|
/*0110*/ uint8 layonhands; // 1 for lay on hands -- doesn't seem to matter?
|
||||||
|
/*0111*/ uint8 unknown111;
|
||||||
/*0112*/ uint32 total_abilities;
|
/*0112*/ uint32 total_abilities;
|
||||||
/*0116*/ AA_Ability abilities[0];
|
/*0116*/ AA_Ability abilities[0];
|
||||||
};
|
};
|
||||||
@ -4277,17 +4383,11 @@ struct AA_List {
|
|||||||
struct AA_Action {
|
struct AA_Action {
|
||||||
/*00*/ uint32 action;
|
/*00*/ uint32 action;
|
||||||
/*04*/ uint32 ability;
|
/*04*/ uint32 ability;
|
||||||
/*08*/ uint32 unknown08;
|
/*08*/ uint32 target_id;
|
||||||
/*12*/ uint32 exp_value;
|
/*12*/ uint32 exp_value;
|
||||||
/*16*/
|
/*16*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AA_Skills { //this should be removed and changed to AA_Array
|
|
||||||
/*00*/ uint32 aa_skill; // Total AAs Spent
|
|
||||||
/*04*/ uint32 aa_value;
|
|
||||||
/*08*/ uint32 unknown08;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AAExpUpdate_Struct {
|
struct AAExpUpdate_Struct {
|
||||||
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
||||||
@ -4307,14 +4407,7 @@ struct AltAdvStats_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerAA_Struct { // Is this still used?
|
struct PlayerAA_Struct { // Is this still used?
|
||||||
AA_Skills aa_list[MAX_PP_AA_ARRAY];
|
AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
|
||||||
|
|
||||||
struct AA_Values {
|
|
||||||
/*00*/ uint32 aa_skill;
|
|
||||||
/*04*/ uint32 aa_value;
|
|
||||||
/*08*/ uint32 unknown08;
|
|
||||||
/*12*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AATable_Struct {
|
struct AATable_Struct {
|
||||||
@ -4324,7 +4417,7 @@ struct AATable_Struct {
|
|||||||
/*12*/ uint32 aa_spent_archetype; // Seen 40
|
/*12*/ uint32 aa_spent_archetype; // Seen 40
|
||||||
/*16*/ uint32 aa_spent_class; // Seen 103
|
/*16*/ uint32 aa_spent_class; // Seen 103
|
||||||
/*20*/ uint32 aa_spent_special; // Seen 0
|
/*20*/ uint32 aa_spent_special; // Seen 0
|
||||||
/*24*/ AA_Values aa_list[MAX_PP_AA_ARRAY];
|
/*24*/ AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Weather_Struct {
|
struct Weather_Struct {
|
||||||
@ -4379,19 +4472,22 @@ struct ExpansionInfo_Struct {
|
|||||||
/*064*/ uint32 Expansions;
|
/*064*/ uint32 Expansions;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ApplyPoison_Struct {
|
struct ApplyPoison_Struct
|
||||||
MainInvItemSlotStruct inventorySlot;
|
{
|
||||||
|
TypelessInventorySlot_Struct inventorySlot;
|
||||||
uint32 success;
|
uint32 success;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemVerifyRequest_Struct {
|
struct ItemVerifyRequest_Struct
|
||||||
/*000*/ ItemSlotStruct slot;
|
{
|
||||||
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 target; // Target Entity ID
|
/*012*/ uint32 target; // Target Entity ID
|
||||||
/*016*/
|
/*016*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemVerifyReply_Struct {
|
struct ItemVerifyReply_Struct
|
||||||
/*000*/ ItemSlotStruct slot;
|
{
|
||||||
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 spell; // Spell ID to cast if different than item effect
|
/*012*/ uint32 spell; // Spell ID to cast if different than item effect
|
||||||
/*016*/ uint32 target; // Target Entity ID
|
/*016*/ uint32 target; // Target Entity ID
|
||||||
/*020*/
|
/*020*/
|
||||||
@ -4624,7 +4720,7 @@ struct ClickEffectStruct
|
|||||||
|
|
||||||
struct ProcEffectStruct
|
struct ProcEffectStruct
|
||||||
{
|
{
|
||||||
uint32 effect;
|
int32 effect;
|
||||||
uint8 level2;
|
uint8 level2;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
@ -4639,7 +4735,7 @@ struct ProcEffectStruct
|
|||||||
|
|
||||||
struct WornEffectStruct //worn, focus and scroll effect
|
struct WornEffectStruct //worn, focus and scroll effect
|
||||||
{
|
{
|
||||||
uint32 effect;
|
int32 effect;
|
||||||
uint8 level2;
|
uint8 level2;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
@ -4676,7 +4772,7 @@ struct ItemQuaternaryBodyStruct
|
|||||||
int32 HeroicSVCorrup;
|
int32 HeroicSVCorrup;
|
||||||
int32 HealAmt;
|
int32 HealAmt;
|
||||||
int32 SpellDmg;
|
int32 SpellDmg;
|
||||||
int32 clairvoyance;
|
int32 Clairvoyance;
|
||||||
uint8 unknown18; //Power Source Capacity or evolve filename?
|
uint8 unknown18; //Power Source Capacity or evolve filename?
|
||||||
uint32 evolve_string; // Some String, but being evolution related is just a guess
|
uint32 evolve_string; // Some String, but being evolution related is just a guess
|
||||||
uint8 unknown19;
|
uint8 unknown19;
|
||||||
@ -4714,7 +4810,6 @@ struct ItemQuaternaryBodyStruct
|
|||||||
uint8 unknown37a; // New to RoF2 - Probably variable length string
|
uint8 unknown37a; // New to RoF2 - Probably variable length string
|
||||||
uint8 unknown38; // 0
|
uint8 unknown38; // 0
|
||||||
uint8 unknown39; // 1
|
uint8 unknown39; // 1
|
||||||
uint32 subitem_count;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AugmentInfo_Struct
|
struct AugmentInfo_Struct
|
||||||
@ -4949,7 +5044,17 @@ struct MercenaryMerchantResponse_Struct {
|
|||||||
/*0004*/
|
/*0004*/
|
||||||
};
|
};
|
||||||
|
|
||||||
}; //end namespace structs
|
// Sent by Server to update character crystals.
|
||||||
}; //end namespace RoF2
|
struct CrystalCountUpdate_Struct
|
||||||
|
{
|
||||||
|
/*000*/ uint32 CurrentRadiantCrystals;
|
||||||
|
/*004*/ uint32 CareerRadiantCrystals;
|
||||||
|
/*008*/ uint32 CurrentEbonCrystals;
|
||||||
|
/*012*/ uint32 CareerEbonCrystals;
|
||||||
|
};
|
||||||
|
|
||||||
#endif /*ROF2_STRUCTS_H_*/
|
}; /*structs*/
|
||||||
|
|
||||||
|
}; /*RoF2*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF2_STRUCTS_H*/
|
||||||
|
|||||||
@ -1,221 +0,0 @@
|
|||||||
/*
|
|
||||||
EQEMu: Everquest Server Emulator
|
|
||||||
|
|
||||||
Copyright (C) 2001-2014 EQEMu Development Team (http://eqemulator.net)
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; version 2 of the License.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
|
||||||
are required to give you total support for your newly bought product;
|
|
||||||
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
||||||
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef ROF_CONSTANTS_H_
|
|
||||||
#define ROF_CONSTANTS_H_
|
|
||||||
|
|
||||||
#include "../types.h"
|
|
||||||
|
|
||||||
namespace RoF {
|
|
||||||
namespace maps {
|
|
||||||
typedef enum : int16 {
|
|
||||||
MapPossessions = 0,
|
|
||||||
MapBank,
|
|
||||||
MapSharedBank,
|
|
||||||
MapTrade,
|
|
||||||
MapWorld,
|
|
||||||
MapLimbo,
|
|
||||||
MapTribute,
|
|
||||||
MapTrophyTribute,
|
|
||||||
MapGuildTribute,
|
|
||||||
MapMerchant,
|
|
||||||
MapDeleted,
|
|
||||||
MapCorpse,
|
|
||||||
MapBazaar,
|
|
||||||
MapInspect,
|
|
||||||
MapRealEstate,
|
|
||||||
MapViewMODPC,
|
|
||||||
MapViewMODBank,
|
|
||||||
MapViewMODSharedBank,
|
|
||||||
MapViewMODLimbo,
|
|
||||||
MapAltStorage,
|
|
||||||
MapArchived,
|
|
||||||
MapMail,
|
|
||||||
MapGuildTrophyTribute,
|
|
||||||
MapOther,
|
|
||||||
_MapCount
|
|
||||||
} InventoryMaps;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace slots {
|
|
||||||
typedef enum : int16 {
|
|
||||||
MainCharm = 0,
|
|
||||||
MainEar1,
|
|
||||||
MainHead,
|
|
||||||
MainFace,
|
|
||||||
MainEar2,
|
|
||||||
MainNeck,
|
|
||||||
MainShoulders,
|
|
||||||
MainArms,
|
|
||||||
MainBack,
|
|
||||||
MainWrist1,
|
|
||||||
MainWrist2,
|
|
||||||
MainRange,
|
|
||||||
MainHands,
|
|
||||||
MainPrimary,
|
|
||||||
MainSecondary,
|
|
||||||
MainFinger1,
|
|
||||||
MainFinger2,
|
|
||||||
MainChest,
|
|
||||||
MainLegs,
|
|
||||||
MainFeet,
|
|
||||||
MainWaist,
|
|
||||||
MainPowerSource,
|
|
||||||
MainAmmo,
|
|
||||||
MainGeneral1,
|
|
||||||
MainGeneral2,
|
|
||||||
MainGeneral3,
|
|
||||||
MainGeneral4,
|
|
||||||
MainGeneral5,
|
|
||||||
MainGeneral6,
|
|
||||||
MainGeneral7,
|
|
||||||
MainGeneral8,
|
|
||||||
MainGeneral9,
|
|
||||||
MainGeneral10,
|
|
||||||
MainCursor,
|
|
||||||
_MainCount,
|
|
||||||
_MainEquipmentBegin = MainCharm,
|
|
||||||
_MainEquipmentEnd = MainAmmo,
|
|
||||||
_MainEquipmentCount = (_MainEquipmentEnd - _MainEquipmentBegin + 1),
|
|
||||||
_MainGeneralBegin = MainGeneral1,
|
|
||||||
_MainGeneralEnd = MainGeneral10,
|
|
||||||
_MainGeneralCount = (_MainGeneralEnd - _MainGeneralBegin + 1)
|
|
||||||
} EquipmentSlots;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace consts {
|
|
||||||
static const size_t CHARACTER_CREATION_LIMIT = 12;
|
|
||||||
|
|
||||||
static const uint16 MAP_POSSESSIONS_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BANK_SIZE = 24;
|
|
||||||
static const uint16 MAP_SHARED_BANK_SIZE = 2;
|
|
||||||
static const uint16 MAP_TRADE_SIZE = 8;
|
|
||||||
static const uint16 MAP_WORLD_SIZE = 10;
|
|
||||||
static const uint16 MAP_LIMBO_SIZE = 36;
|
|
||||||
static const uint16 MAP_TRIBUTE_SIZE = 0; //?
|
|
||||||
static const uint16 MAP_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_MERCHANT_SIZE = 0;
|
|
||||||
static const uint16 MAP_DELETED_SIZE = 0;
|
|
||||||
static const uint16 MAP_CORPSE_SIZE = slots::_MainCount;
|
|
||||||
static const uint16 MAP_BAZAAR_SIZE = 200;
|
|
||||||
static const uint16 MAP_INSPECT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
static const uint16 MAP_REAL_ESTATE_SIZE = 0;
|
|
||||||
static const uint16 MAP_VIEW_MOD_PC_SIZE = MAP_POSSESSIONS_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_BANK_SIZE = MAP_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_SHARED_BANK_SIZE = MAP_SHARED_BANK_SIZE;
|
|
||||||
static const uint16 MAP_VIEW_MOD_LIMBO_SIZE = MAP_LIMBO_SIZE;
|
|
||||||
static const uint16 MAP_ALT_STORAGE_SIZE = 0;
|
|
||||||
static const uint16 MAP_ARCHIVED_SIZE = 0;
|
|
||||||
static const uint16 MAP_MAIL_SIZE = 0;
|
|
||||||
static const uint16 MAP_GUILD_TROPHY_TRIBUTE_SIZE = 0;
|
|
||||||
static const uint16 MAP_KRONO_SIZE = NOT_USED;
|
|
||||||
static const uint16 MAP_OTHER_SIZE = 0;
|
|
||||||
|
|
||||||
// most of these definitions will go away with the structure-based system..this maintains compatibility for now
|
|
||||||
// (bag slots and main slots beyond Possessions are assigned for compatibility with current server coding)
|
|
||||||
static const int16 EQUIPMENT_BEGIN = slots::MainCharm;
|
|
||||||
static const int16 EQUIPMENT_END = slots::MainAmmo;
|
|
||||||
static const uint16 EQUIPMENT_SIZE = slots::_MainEquipmentCount;
|
|
||||||
|
|
||||||
static const int16 GENERAL_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 GENERAL_END = slots::MainGeneral10;
|
|
||||||
static const uint16 GENERAL_SIZE = slots::_MainGeneralCount;
|
|
||||||
static const int16 GENERAL_BAGS_BEGIN = 251;
|
|
||||||
static const int16 GENERAL_BAGS_END_OFFSET = 99;
|
|
||||||
static const int16 GENERAL_BAGS_END = GENERAL_BAGS_BEGIN + GENERAL_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 CURSOR = slots::MainCursor;
|
|
||||||
static const int16 CURSOR_BAG_BEGIN = 351;
|
|
||||||
static const int16 CURSOR_BAG_END_OFFSET = 9;
|
|
||||||
static const int16 CURSOR_BAG_END = CURSOR_BAG_BEGIN + CURSOR_BAG_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 BANK_BEGIN = 2000;
|
|
||||||
static const int16 BANK_END = 2023;
|
|
||||||
static const int16 BANK_BAGS_BEGIN = 2031;
|
|
||||||
static const int16 BANK_BAGS_END_OFFSET = 239;
|
|
||||||
static const int16 BANK_BAGS_END = BANK_BAGS_BEGIN + BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 SHARED_BANK_BEGIN = 2500;
|
|
||||||
static const int16 SHARED_BANK_END = 2501;
|
|
||||||
static const int16 SHARED_BANK_BAGS_BEGIN = 2531;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END_OFFSET = 19;
|
|
||||||
static const int16 SHARED_BANK_BAGS_END = SHARED_BANK_BAGS_BEGIN + SHARED_BANK_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 TRADE_BEGIN = 3000;
|
|
||||||
static const int16 TRADE_END = 3007;
|
|
||||||
static const int16 TRADE_NPC_END = 3003;
|
|
||||||
static const int16 TRADE_BAGS_BEGIN = 3031;
|
|
||||||
static const int16 TRADE_BAGS_END_OFFSET = 79;
|
|
||||||
static const int16 TRADE_BAGS_END = TRADE_BAGS_BEGIN + TRADE_BAGS_END_OFFSET;
|
|
||||||
|
|
||||||
static const int16 WORLD_BEGIN = 4000;
|
|
||||||
static const int16 WORLD_END = 4009;
|
|
||||||
|
|
||||||
static const int16 TRIBUTE_BEGIN = 400;
|
|
||||||
static const int16 TRIBUTE_END = 404;
|
|
||||||
|
|
||||||
static const int16 CORPSE_BEGIN = slots::MainGeneral1;
|
|
||||||
static const int16 CORPSE_END = slots::MainGeneral1 + slots::MainCursor;
|
|
||||||
|
|
||||||
static const uint16 ITEM_COMMON_SIZE = 6;
|
|
||||||
static const uint16 ITEM_CONTAINER_SIZE = 255; // 255; (server max will be 255..unsure what actual client is - test)
|
|
||||||
|
|
||||||
static const size_t BANDOLIERS_SIZE = 20; // number of bandolier instances
|
|
||||||
static const size_t BANDOLIER_ITEM_COUNT = 4; // number of equipment slots in bandolier instance
|
|
||||||
|
|
||||||
static const size_t POTION_BELT_ITEM_COUNT = 5;
|
|
||||||
|
|
||||||
static const size_t TEXT_LINK_BODY_LENGTH = 55;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace limits {
|
|
||||||
static const bool ALLOWS_EMPTY_BAG_IN_BAG = true;
|
|
||||||
static const bool ALLOWS_CLICK_CAST_FROM_BAG = true;
|
|
||||||
static const bool COIN_HAS_WEIGHT = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
}; //end namespace RoF
|
|
||||||
|
|
||||||
#endif /*ROF_CONSTANTS_H_*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
RoF Notes:
|
|
||||||
** Structure-based inventory **
|
|
||||||
ok Possessions: ( 0, { 0 .. 33 }, -1, -1 ) (Corpse: { 23 .. 56 } [Offset 23])
|
|
||||||
ok [Equipment: ( 0, { 0 .. 22 }, -1, -1 )]
|
|
||||||
ok [General: ( 0, { 23 .. 32 }, -1, -1 )]
|
|
||||||
ok [Cursor: ( 0, 33, -1, -1 )]
|
|
||||||
General Bags: ( 0, { 23 .. 32 }, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
Cursor Bags: ( 0, 33, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
|
|
||||||
Bank: ( 1, { 0 .. 23 }, -1, -1 )
|
|
||||||
Bank Bags: ( 1, { 0 .. 23 }, { 0 .. (maxsize - 1)}, -1 )
|
|
||||||
|
|
||||||
Shared Bank: ( 2, { 0 .. 1 }, -1, -1 )
|
|
||||||
Shared Bank Bags: ( 2, { 0 .. 1 }, { 0 .. (maxsize - 1) }, -1 )
|
|
||||||
|
|
||||||
Trade: ( 3, { 0 .. 8 }, -1, -1 )
|
|
||||||
(Trade Bags: 3031 - 3110 -- server values)
|
|
||||||
|
|
||||||
World: ( 4, { 0 .. 10 }, -1, -1 )
|
|
||||||
|
|
||||||
*/
|
|
||||||
280
common/patches/rof_limits.cpp
Normal file
280
common/patches/rof_limits.cpp
Normal file
@ -0,0 +1,280 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "rof_limits.h"
|
||||||
|
|
||||||
|
#include "../string_util.h"
|
||||||
|
|
||||||
|
|
||||||
|
size_t RoF::invtype::GetInvTypeSize(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
return invtype::InvTypePossessionsSize;
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
return invtype::InvTypeBankSize;
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
return invtype::InvTypeSharedBankSize;
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
return invtype::InvTypeTradeSize;
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
return invtype::InvTypeWorldSize;
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
return invtype::InvTypeLimboSize;
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
return invtype::InvTypeTributeSize;
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
return invtype::InvTypeTrophyTributeSize;
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return invtype::InvTypeGuildTributeSize;
|
||||||
|
case invtype::InvTypeMerchant:
|
||||||
|
return invtype::InvTypeMerchantSize;
|
||||||
|
case invtype::InvTypeDeleted:
|
||||||
|
return invtype::InvTypeDeletedSize;
|
||||||
|
case invtype::InvTypeCorpse:
|
||||||
|
return invtype::InvTypeCorpseSize;
|
||||||
|
case invtype::InvTypeBazaar:
|
||||||
|
return invtype::InvTypeBazaarSize;
|
||||||
|
case invtype::InvTypeInspect:
|
||||||
|
return invtype::InvTypeInspectSize;
|
||||||
|
case invtype::InvTypeRealEstate:
|
||||||
|
return invtype::InvTypeRealEstateSize;
|
||||||
|
case invtype::InvTypeViewMODPC:
|
||||||
|
return invtype::InvTypeViewMODPCSize;
|
||||||
|
case invtype::InvTypeViewMODBank:
|
||||||
|
return invtype::InvTypeViewMODBankSize;
|
||||||
|
case invtype::InvTypeViewMODSharedBank:
|
||||||
|
return invtype::InvTypeViewMODSharedBankSize;
|
||||||
|
case invtype::InvTypeViewMODLimbo:
|
||||||
|
return invtype::InvTypeViewMODLimboSize;
|
||||||
|
case invtype::InvTypeAltStorage:
|
||||||
|
return invtype::InvTypeAltStorageSize;
|
||||||
|
case invtype::InvTypeArchived:
|
||||||
|
return invtype::InvTypeArchivedSize;
|
||||||
|
case invtype::InvTypeMail:
|
||||||
|
return invtype::InvTypeMailSize;
|
||||||
|
case invtype::InvTypeGuildTrophyTribute:
|
||||||
|
return invtype::InvTypeGuildTrophyTributeSize;
|
||||||
|
case invtype::InvTypeOther:
|
||||||
|
return invtype::InvTypeOtherSize;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invtype::GetInvTypeName(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypeInvalid:
|
||||||
|
return "Invalid Type";
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
return "Possessions";
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
return "Bank";
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
return "Shared Bank";
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
return "Trade";
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
return "World";
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
return "Limbo";
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
return "Tribute";
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
return "Trophy Tribute";
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return "Guild Tribute";
|
||||||
|
case invtype::InvTypeMerchant:
|
||||||
|
return "Merchant";
|
||||||
|
case invtype::InvTypeDeleted:
|
||||||
|
return "Deleted";
|
||||||
|
case invtype::InvTypeCorpse:
|
||||||
|
return "Corpse";
|
||||||
|
case invtype::InvTypeBazaar:
|
||||||
|
return "Bazaar";
|
||||||
|
case invtype::InvTypeInspect:
|
||||||
|
return "Inspect";
|
||||||
|
case invtype::InvTypeRealEstate:
|
||||||
|
return "Real Estate";
|
||||||
|
case invtype::InvTypeViewMODPC:
|
||||||
|
return "View MOD PC";
|
||||||
|
case invtype::InvTypeViewMODBank:
|
||||||
|
return "View MOD Bank";
|
||||||
|
case invtype::InvTypeViewMODSharedBank:
|
||||||
|
return "View MOD Shared Bank";
|
||||||
|
case invtype::InvTypeViewMODLimbo:
|
||||||
|
return "View MOD Limbo";
|
||||||
|
case invtype::InvTypeAltStorage:
|
||||||
|
return "Alt Storage";
|
||||||
|
case invtype::InvTypeArchived:
|
||||||
|
return "Archived";
|
||||||
|
case invtype::InvTypeMail:
|
||||||
|
return "Mail";
|
||||||
|
case invtype::InvTypeGuildTrophyTribute:
|
||||||
|
return "Guild Trophy Tribute";
|
||||||
|
case invtype::InvTypeOther:
|
||||||
|
return "Other";
|
||||||
|
default:
|
||||||
|
return "Unknown Type";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool RoF::invtype::IsInvTypePersistent(int inv_type)
|
||||||
|
{
|
||||||
|
switch (inv_type) {
|
||||||
|
case invtype::InvTypePossessions:
|
||||||
|
case invtype::InvTypeBank:
|
||||||
|
case invtype::InvTypeSharedBank:
|
||||||
|
case invtype::InvTypeTrade:
|
||||||
|
case invtype::InvTypeWorld:
|
||||||
|
case invtype::InvTypeLimbo:
|
||||||
|
case invtype::InvTypeTribute:
|
||||||
|
case invtype::InvTypeTrophyTribute:
|
||||||
|
case invtype::InvTypeGuildTribute:
|
||||||
|
return true;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invslot::GetInvPossessionsSlotName(int inv_slot)
|
||||||
|
{
|
||||||
|
switch (inv_slot) {
|
||||||
|
case invslot::InvSlotInvalid:
|
||||||
|
return "Invalid Slot";
|
||||||
|
case invslot::PossessionsCharm:
|
||||||
|
return "Charm";
|
||||||
|
case invslot::PossessionsEar1:
|
||||||
|
return "Ear 1";
|
||||||
|
case invslot::PossessionsHead:
|
||||||
|
return "Head";
|
||||||
|
case invslot::PossessionsFace:
|
||||||
|
return "Face";
|
||||||
|
case invslot::PossessionsEar2:
|
||||||
|
return "Ear 2";
|
||||||
|
case invslot::PossessionsNeck:
|
||||||
|
return "Neck";
|
||||||
|
case invslot::PossessionsShoulders:
|
||||||
|
return "Shoulders";
|
||||||
|
case invslot::PossessionsArms:
|
||||||
|
return "Arms";
|
||||||
|
case invslot::PossessionsBack:
|
||||||
|
return "Back";
|
||||||
|
case invslot::PossessionsWrist1:
|
||||||
|
return "Wrist 1";
|
||||||
|
case invslot::PossessionsWrist2:
|
||||||
|
return "Wrist 2";
|
||||||
|
case invslot::PossessionsRange:
|
||||||
|
return "Range";
|
||||||
|
case invslot::PossessionsHands:
|
||||||
|
return "Hands";
|
||||||
|
case invslot::PossessionsPrimary:
|
||||||
|
return "Primary";
|
||||||
|
case invslot::PossessionsSecondary:
|
||||||
|
return "Secondary";
|
||||||
|
case invslot::PossessionsFinger1:
|
||||||
|
return "Finger 1";
|
||||||
|
case invslot::PossessionsFinger2:
|
||||||
|
return "Finger 2";
|
||||||
|
case invslot::PossessionsChest:
|
||||||
|
return "Chest";
|
||||||
|
case invslot::PossessionsLegs:
|
||||||
|
return "Legs";
|
||||||
|
case invslot::PossessionsFeet:
|
||||||
|
return "Feet";
|
||||||
|
case invslot::PossessionsWaist:
|
||||||
|
return "Waist";
|
||||||
|
case invslot::PossessionsPowerSource:
|
||||||
|
return "Power Source";
|
||||||
|
case invslot::PossessionsAmmo:
|
||||||
|
return "Ammo";
|
||||||
|
case invslot::PossessionsGeneral1:
|
||||||
|
return "General 1";
|
||||||
|
case invslot::PossessionsGeneral2:
|
||||||
|
return "General 2";
|
||||||
|
case invslot::PossessionsGeneral3:
|
||||||
|
return "General 3";
|
||||||
|
case invslot::PossessionsGeneral4:
|
||||||
|
return "General 4";
|
||||||
|
case invslot::PossessionsGeneral5:
|
||||||
|
return "General 5";
|
||||||
|
case invslot::PossessionsGeneral6:
|
||||||
|
return "General 6";
|
||||||
|
case invslot::PossessionsGeneral7:
|
||||||
|
return "General 7";
|
||||||
|
case invslot::PossessionsGeneral8:
|
||||||
|
return "General 8";
|
||||||
|
case invslot::PossessionsGeneral9:
|
||||||
|
return "General 9";
|
||||||
|
case invslot::PossessionsGeneral10:
|
||||||
|
return "General 10";
|
||||||
|
case invslot::PossessionsCursor:
|
||||||
|
return "Cursor";
|
||||||
|
default:
|
||||||
|
return "Unknown Slot";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invslot::GetInvSlotName(int inv_type, int inv_slot)
|
||||||
|
{
|
||||||
|
if (inv_type == invtype::InvTypePossessions)
|
||||||
|
return invslot::GetInvPossessionsSlotName(inv_slot);
|
||||||
|
|
||||||
|
size_t type_size = invtype::GetInvTypeSize(inv_type);
|
||||||
|
|
||||||
|
if (!type_size || inv_slot == invslot::InvSlotInvalid)
|
||||||
|
return "Invalid Slot";
|
||||||
|
|
||||||
|
if ((size_t)(inv_slot + 1) >= type_size)
|
||||||
|
return "Unknown Slot";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Slot %i", (inv_slot + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invbag::GetInvBagIndexName(int bag_index)
|
||||||
|
{
|
||||||
|
if (bag_index == invbag::InvBagInvalid)
|
||||||
|
return "Invalid Bag";
|
||||||
|
|
||||||
|
if ((size_t)bag_index >= invbag::ItemBagSize)
|
||||||
|
return "Unknown Bag";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Bag %i", (bag_index + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
|
const char* RoF::invaug::GetInvAugIndexName(int aug_index)
|
||||||
|
{
|
||||||
|
if (aug_index == invaug::InvAugInvalid)
|
||||||
|
return "Invalid Augment";
|
||||||
|
|
||||||
|
if ((size_t)aug_index >= invaug::ItemAugSize)
|
||||||
|
return "Unknown Augment";
|
||||||
|
|
||||||
|
static std::string ret_str;
|
||||||
|
ret_str = StringFormat("Augment %i", (aug_index + 1));
|
||||||
|
|
||||||
|
return ret_str.c_str();
|
||||||
|
}
|
||||||
285
common/patches/rof_limits.h
Normal file
285
common/patches/rof_limits.h
Normal file
@ -0,0 +1,285 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF_LIMITS_H
|
||||||
|
#define COMMON_ROF_LIMITS_H
|
||||||
|
|
||||||
|
#include "../types.h"
|
||||||
|
#include "../emu_versions.h"
|
||||||
|
#include "../skills.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace RoF
|
||||||
|
{
|
||||||
|
enum : int { Invalid = -1, Null, Safety };
|
||||||
|
|
||||||
|
enum : bool { False = false, True = true };
|
||||||
|
|
||||||
|
// pre-declarations
|
||||||
|
namespace inventory {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInventoryRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace invtype {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvTypeRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
enum : int { InvTypeInvalid = -1, InvTypeBegin };
|
||||||
|
|
||||||
|
enum InventoryType : int {
|
||||||
|
InvTypePossessions = InvTypeBegin,
|
||||||
|
InvTypeBank,
|
||||||
|
InvTypeSharedBank,
|
||||||
|
InvTypeTrade,
|
||||||
|
InvTypeWorld,
|
||||||
|
InvTypeLimbo,
|
||||||
|
InvTypeTribute,
|
||||||
|
InvTypeTrophyTribute,
|
||||||
|
InvTypeGuildTribute,
|
||||||
|
InvTypeMerchant,
|
||||||
|
InvTypeDeleted,
|
||||||
|
InvTypeCorpse,
|
||||||
|
InvTypeBazaar,
|
||||||
|
InvTypeInspect,
|
||||||
|
InvTypeRealEstate,
|
||||||
|
InvTypeViewMODPC,
|
||||||
|
InvTypeViewMODBank,
|
||||||
|
InvTypeViewMODSharedBank,
|
||||||
|
InvTypeViewMODLimbo,
|
||||||
|
InvTypeAltStorage,
|
||||||
|
InvTypeArchived,
|
||||||
|
InvTypeMail,
|
||||||
|
InvTypeGuildTrophyTribute,
|
||||||
|
InvTypeOther,
|
||||||
|
InvTypeCount
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*invtype*/
|
||||||
|
|
||||||
|
namespace invslot {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvSlotRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
enum : int { InvSlotInvalid = -1, InvSlotBegin };
|
||||||
|
|
||||||
|
enum PossessionsSlot : int {
|
||||||
|
PossessionsCharm = InvSlotBegin,
|
||||||
|
PossessionsEar1,
|
||||||
|
PossessionsHead,
|
||||||
|
PossessionsFace,
|
||||||
|
PossessionsEar2,
|
||||||
|
PossessionsNeck,
|
||||||
|
PossessionsShoulders,
|
||||||
|
PossessionsArms,
|
||||||
|
PossessionsBack,
|
||||||
|
PossessionsWrist1,
|
||||||
|
PossessionsWrist2,
|
||||||
|
PossessionsRange,
|
||||||
|
PossessionsHands,
|
||||||
|
PossessionsPrimary,
|
||||||
|
PossessionsSecondary,
|
||||||
|
PossessionsFinger1,
|
||||||
|
PossessionsFinger2,
|
||||||
|
PossessionsChest,
|
||||||
|
PossessionsLegs,
|
||||||
|
PossessionsFeet,
|
||||||
|
PossessionsWaist,
|
||||||
|
PossessionsPowerSource,
|
||||||
|
PossessionsAmmo,
|
||||||
|
PossessionsGeneral1,
|
||||||
|
PossessionsGeneral2,
|
||||||
|
PossessionsGeneral3,
|
||||||
|
PossessionsGeneral4,
|
||||||
|
PossessionsGeneral5,
|
||||||
|
PossessionsGeneral6,
|
||||||
|
PossessionsGeneral7,
|
||||||
|
PossessionsGeneral8,
|
||||||
|
PossessionsGeneral9,
|
||||||
|
PossessionsGeneral10,
|
||||||
|
PossessionsCursor,
|
||||||
|
PossessionsCount
|
||||||
|
};
|
||||||
|
|
||||||
|
const int EquipmentBegin = PossessionsCharm;
|
||||||
|
const int EquipmentEnd = PossessionsAmmo;
|
||||||
|
const int EquipmentCount = (EquipmentEnd - EquipmentBegin + 1);
|
||||||
|
|
||||||
|
const int GeneralBegin = PossessionsGeneral1;
|
||||||
|
const int GeneralEnd = PossessionsGeneral10;
|
||||||
|
const int GeneralCount = (GeneralEnd - GeneralBegin + 1);
|
||||||
|
|
||||||
|
} /*invslot*/
|
||||||
|
|
||||||
|
namespace invbag {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvBagRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
enum : int { InvBagInvalid = -1, InvBagBegin };
|
||||||
|
|
||||||
|
} /*invbag*/
|
||||||
|
|
||||||
|
namespace invaug {
|
||||||
|
inline EQEmu::versions::ClientVersion GetInvAugRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
enum : int { InvAugInvalid = -1, InvAugBegin };
|
||||||
|
|
||||||
|
} /*invaug*/
|
||||||
|
|
||||||
|
namespace item {
|
||||||
|
inline EQEmu::versions::ClientVersion GetItemRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
enum ItemPacketType : int {
|
||||||
|
ItemPacketMerchant = 100,
|
||||||
|
ItemPacketTradeView = 101,
|
||||||
|
ItemPacketLoot = 102,
|
||||||
|
ItemPacketTrade = 103,
|
||||||
|
ItemPacketCharInventory = 105,
|
||||||
|
ItemPacketLimbo = 106,
|
||||||
|
ItemPacketWorldContainer = 107,
|
||||||
|
ItemPacketTributeItem = 108,
|
||||||
|
ItemPacketGuildTribute = 109,
|
||||||
|
ItemPacket10 = 110,
|
||||||
|
ItemPacket11 = 111,
|
||||||
|
ItemPacket12 = 112,
|
||||||
|
ItemPacketRecovery = 113,
|
||||||
|
ItemPacket14 = 115
|
||||||
|
};
|
||||||
|
|
||||||
|
} /*item*/
|
||||||
|
|
||||||
|
namespace profile {
|
||||||
|
inline EQEmu::versions::ClientVersion GetProfileRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*profile*/
|
||||||
|
|
||||||
|
namespace constants {
|
||||||
|
inline EQEmu::versions::ClientVersion GetConstantsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
|
||||||
|
namespace behavior {
|
||||||
|
inline EQEmu::versions::ClientVersion GetBehaviorRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
|
namespace skills {
|
||||||
|
inline EQEmu::versions::ClientVersion GetSkillsRef() { return EQEmu::versions::ClientVersion::RoF; }
|
||||||
|
|
||||||
|
} /*skills*/
|
||||||
|
|
||||||
|
|
||||||
|
// declarations
|
||||||
|
namespace inventory {
|
||||||
|
const bool ConcatenateInvTypeLimbo = false;
|
||||||
|
|
||||||
|
const bool AllowOverLevelEquipment = true;
|
||||||
|
|
||||||
|
const bool AllowEmptyBagInBag = true;
|
||||||
|
const bool AllowClickCastFromBag = true;
|
||||||
|
|
||||||
|
} /*inventory*/
|
||||||
|
|
||||||
|
namespace invtype {
|
||||||
|
const size_t InvTypePossessionsSize = invslot::PossessionsCount;
|
||||||
|
const size_t InvTypeBankSize = 24;
|
||||||
|
const size_t InvTypeSharedBankSize = 2;
|
||||||
|
const size_t InvTypeTradeSize = 8;
|
||||||
|
const size_t InvTypeWorldSize = 10;
|
||||||
|
const size_t InvTypeLimboSize = 36;
|
||||||
|
const size_t InvTypeTributeSize = 5;
|
||||||
|
const size_t InvTypeTrophyTributeSize = 0;//unknown
|
||||||
|
const size_t InvTypeGuildTributeSize = 2;//unverified
|
||||||
|
const size_t InvTypeMerchantSize = 200;
|
||||||
|
const size_t InvTypeDeletedSize = 0;//unknown - "Recovery Tab"
|
||||||
|
const size_t InvTypeCorpseSize = InvTypePossessionsSize;
|
||||||
|
const size_t InvTypeBazaarSize = 200;
|
||||||
|
const size_t InvTypeInspectSize = invslot::EquipmentCount;
|
||||||
|
const size_t InvTypeRealEstateSize = 0;//unknown
|
||||||
|
const size_t InvTypeViewMODPCSize = InvTypePossessionsSize;
|
||||||
|
const size_t InvTypeViewMODBankSize = InvTypeBankSize;
|
||||||
|
const size_t InvTypeViewMODSharedBankSize = InvTypeSharedBankSize;
|
||||||
|
const size_t InvTypeViewMODLimboSize = InvTypeLimboSize;
|
||||||
|
const size_t InvTypeAltStorageSize = 0;//unknown - "Shroud Bank"
|
||||||
|
const size_t InvTypeArchivedSize = 0;//unknown
|
||||||
|
const size_t InvTypeMailSize = 0;//unknown
|
||||||
|
const size_t InvTypeGuildTrophyTributeSize = 0;//unknown
|
||||||
|
const size_t InvTypeOtherSize = 0;//unknown
|
||||||
|
|
||||||
|
extern size_t GetInvTypeSize(int inv_type);
|
||||||
|
extern const char* GetInvTypeName(int inv_type);
|
||||||
|
|
||||||
|
extern bool IsInvTypePersistent(int inv_type);
|
||||||
|
|
||||||
|
} /*invtype*/
|
||||||
|
|
||||||
|
namespace invslot {
|
||||||
|
extern const char* GetInvPossessionsSlotName(int inv_slot);
|
||||||
|
extern const char* GetInvSlotName(int inv_type, int inv_slot);
|
||||||
|
|
||||||
|
} /*invslot*/
|
||||||
|
|
||||||
|
namespace invbag {
|
||||||
|
const size_t ItemBagSize = 255; // server Size will be 255..unsure what actual client is (test)
|
||||||
|
|
||||||
|
extern const char* GetInvBagIndexName(int bag_index);
|
||||||
|
|
||||||
|
} /*invbag*/
|
||||||
|
|
||||||
|
namespace invaug {
|
||||||
|
const size_t ItemAugSize = 6;
|
||||||
|
|
||||||
|
extern const char* GetInvAugIndexName(int aug_index);
|
||||||
|
|
||||||
|
} /*invaug*/
|
||||||
|
|
||||||
|
namespace item {
|
||||||
|
|
||||||
|
} /*item*/
|
||||||
|
|
||||||
|
namespace profile {
|
||||||
|
const size_t TributeSize = invtype::InvTypeTributeSize;
|
||||||
|
const size_t GuildTributeSize = invtype::InvTypeGuildTributeSize;
|
||||||
|
|
||||||
|
const size_t BandoliersSize = 20; // number of bandolier instances
|
||||||
|
const size_t BandolierItemCount = 4; // number of equipment slots in bandolier instance
|
||||||
|
|
||||||
|
const size_t PotionBeltSize = 5;
|
||||||
|
|
||||||
|
const size_t SkillArraySize = 100;
|
||||||
|
|
||||||
|
} /*profile*/
|
||||||
|
|
||||||
|
namespace constants {
|
||||||
|
const size_t CharacterCreationLimit = 12;
|
||||||
|
|
||||||
|
const size_t SayLinkBodySize = 55;
|
||||||
|
|
||||||
|
} /*constants*/
|
||||||
|
|
||||||
|
namespace behavior {
|
||||||
|
const bool CoinHasWeight = false;
|
||||||
|
|
||||||
|
} /*behavior*/
|
||||||
|
|
||||||
|
namespace skills {
|
||||||
|
const size_t LastUsableSkill = EQEmu::skills::SkillTripleAttack;
|
||||||
|
|
||||||
|
} /*skills*/
|
||||||
|
|
||||||
|
}; /*RoF*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF_LIMITS_H*/
|
||||||
@ -1,3 +1,23 @@
|
|||||||
|
/* EQEMu: Everquest Server Emulator
|
||||||
|
|
||||||
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// out-going packets that require an ENCODE translation:
|
// out-going packets that require an ENCODE translation:
|
||||||
E(OP_Action)
|
E(OP_Action)
|
||||||
E(OP_AdventureMerchantSell)
|
E(OP_AdventureMerchantSell)
|
||||||
@ -42,6 +62,7 @@ E(OP_GroupFollow)
|
|||||||
E(OP_GroupFollow2)
|
E(OP_GroupFollow2)
|
||||||
E(OP_GroupInvite)
|
E(OP_GroupInvite)
|
||||||
E(OP_GroupUpdate)
|
E(OP_GroupUpdate)
|
||||||
|
E(OP_GuildBank)
|
||||||
E(OP_GuildMemberList)
|
E(OP_GuildMemberList)
|
||||||
E(OP_GuildMemberUpdate)
|
E(OP_GuildMemberUpdate)
|
||||||
E(OP_GuildsList)
|
E(OP_GuildsList)
|
||||||
@ -109,6 +130,7 @@ E(OP_ZoneSpawns)
|
|||||||
D(OP_AdventureMerchantSell)
|
D(OP_AdventureMerchantSell)
|
||||||
D(OP_AltCurrencySell)
|
D(OP_AltCurrencySell)
|
||||||
D(OP_AltCurrencySellSelection)
|
D(OP_AltCurrencySellSelection)
|
||||||
|
D(OP_Animation)
|
||||||
D(OP_ApplyPoison)
|
D(OP_ApplyPoison)
|
||||||
D(OP_AugmentInfo)
|
D(OP_AugmentInfo)
|
||||||
D(OP_AugmentItem)
|
D(OP_AugmentItem)
|
||||||
@ -136,6 +158,7 @@ D(OP_GroupFollow)
|
|||||||
D(OP_GroupFollow2)
|
D(OP_GroupFollow2)
|
||||||
D(OP_GroupInvite)
|
D(OP_GroupInvite)
|
||||||
D(OP_GroupInvite2)
|
D(OP_GroupInvite2)
|
||||||
|
D(OP_GuildBank)
|
||||||
D(OP_GuildDemote)
|
D(OP_GuildDemote)
|
||||||
D(OP_GuildRemove)
|
D(OP_GuildRemove)
|
||||||
D(OP_GuildStatus)
|
D(OP_GuildStatus)
|
||||||
|
|||||||
@ -1,7 +1,28 @@
|
|||||||
#ifndef ROF_STRUCTS_H_
|
/* EQEMu: Everquest Server Emulator
|
||||||
#define ROF_STRUCTS_H_
|
|
||||||
|
|
||||||
namespace RoF {
|
Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; version 2 of the License.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY except by those people which sell it, which
|
||||||
|
are required to give you total support for your newly bought product;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
||||||
|
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef COMMON_ROF_STRUCTS_H
|
||||||
|
#define COMMON_ROF_STRUCTS_H
|
||||||
|
|
||||||
|
|
||||||
|
namespace RoF
|
||||||
|
{
|
||||||
namespace structs {
|
namespace structs {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -29,22 +50,24 @@ struct WorldObjectsSent_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// New for RoF - Size: 12
|
// New for RoF - Size: 12
|
||||||
struct ItemSlotStruct {
|
struct InventorySlot_Struct
|
||||||
/*000*/ int16 SlotType; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Delete Item = -1
|
{
|
||||||
|
/*000*/ int16 Type; // Worn and Normal inventory = 0, Bank = 1, Shared Bank = 2, Delete Item = -1
|
||||||
/*002*/ int16 Unknown02;
|
/*002*/ int16 Unknown02;
|
||||||
/*004*/ int16 MainSlot;
|
/*004*/ int16 Slot;
|
||||||
/*006*/ int16 SubSlot;
|
/*006*/ int16 SubIndex;
|
||||||
/*008*/ int16 AugSlot; // Guessing - Seen 0xffff
|
/*008*/ int16 AugIndex; // Guessing - Seen 0xffff
|
||||||
/*010*/ int16 Unknown01; // Normally 0 - Seen 13262 when deleting an item, but didn't match item ID
|
/*010*/ int16 Unknown01; // Normally 0 - Seen 13262 when deleting an item, but didn't match item ID
|
||||||
/*012*/
|
/*012*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// New for RoF - Used for Merchant_Purchase_Struct
|
// New for RoF - Used for Merchant_Purchase_Struct
|
||||||
// Can't sellfrom other than main inventory so Slot Type is not needed.
|
// Can't sellfrom other than main inventory so Slot Type is not needed.
|
||||||
struct MainInvItemSlotStruct {
|
struct TypelessInventorySlot_Struct
|
||||||
/*000*/ int16 MainSlot;
|
{
|
||||||
/*002*/ int16 SubSlot;
|
/*000*/ int16 Slot;
|
||||||
/*004*/ int16 AugSlot;
|
/*002*/ int16 SubIndex;
|
||||||
|
/*004*/ int16 AugIndex;
|
||||||
/*006*/ int16 Unknown01;
|
/*006*/ int16 Unknown01;
|
||||||
/*008*/
|
/*008*/
|
||||||
};
|
};
|
||||||
@ -140,7 +163,7 @@ struct AdventureInfo {
|
|||||||
** Merth: Gave struct a name so gcc 2.96 would compile
|
** Merth: Gave struct a name so gcc 2.96 would compile
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
struct Color_Struct
|
struct Tint_Struct
|
||||||
{
|
{
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
@ -148,21 +171,65 @@ struct Color_Struct
|
|||||||
uint8 Green;
|
uint8 Green;
|
||||||
uint8 Red;
|
uint8 Red;
|
||||||
uint8 UseTint; // if there's a tint this is FF
|
uint8 UseTint; // if there's a tint this is FF
|
||||||
} RGB;
|
};
|
||||||
uint32 Color;
|
uint32 Color;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CharSelectEquip
|
struct TintProfile
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
Tint_Struct Head;
|
||||||
|
Tint_Struct Chest;
|
||||||
|
Tint_Struct Arms;
|
||||||
|
Tint_Struct Wrist;
|
||||||
|
Tint_Struct Hands;
|
||||||
|
Tint_Struct Legs;
|
||||||
|
Tint_Struct Feet;
|
||||||
|
Tint_Struct Primary;
|
||||||
|
Tint_Struct Secondary;
|
||||||
|
};
|
||||||
|
Tint_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Visible equiptment.
|
||||||
|
* Size: 20 Octets
|
||||||
|
*/
|
||||||
|
struct Texture_Struct
|
||||||
{
|
{
|
||||||
uint32 Material;
|
uint32 Material;
|
||||||
uint32 Unknown1;
|
uint32 Unknown1;
|
||||||
uint32 EliteMaterial;
|
uint32 EliteMaterial;
|
||||||
uint32 HeroForgeModel;
|
uint32 HeroForgeModel;
|
||||||
uint32 Material2;
|
uint32 Material2; // Same as material?
|
||||||
Color_Struct Color;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Needs more research regarding new slots
|
||||||
|
//struct TextureProfile
|
||||||
|
//{
|
||||||
|
// union {
|
||||||
|
// struct {
|
||||||
|
// Texture_Struct Head;
|
||||||
|
// Texture_Struct Chest;
|
||||||
|
// Texture_Struct Arms;
|
||||||
|
// Texture_Struct Wrist;
|
||||||
|
// Texture_Struct Hands;
|
||||||
|
// Texture_Struct Legs;
|
||||||
|
// Texture_Struct Feet;
|
||||||
|
// Texture_Struct Primary;
|
||||||
|
// Texture_Struct Secondary;
|
||||||
|
// };
|
||||||
|
// Texture_Struct Slot[EQEmu::textures::TextureCount];
|
||||||
|
// };
|
||||||
|
//
|
||||||
|
// TextureProfile();
|
||||||
|
//};
|
||||||
|
|
||||||
|
struct CharSelectEquip : Texture_Struct, Tint_Struct {};
|
||||||
|
|
||||||
struct CharacterSelectEntry_Struct
|
struct CharacterSelectEntry_Struct
|
||||||
{
|
{
|
||||||
/*0000*/ char Name[1]; // Name null terminated
|
/*0000*/ char Name[1]; // Name null terminated
|
||||||
@ -208,21 +275,6 @@ struct CharacterSelect_Struct
|
|||||||
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
/*004*/ CharacterSelectEntry_Struct Entries[0];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
|
||||||
* Visible equiptment.
|
|
||||||
* Size: 20 Octets
|
|
||||||
*/
|
|
||||||
struct EquipStruct
|
|
||||||
{
|
|
||||||
/*00*/ uint32 Material;
|
|
||||||
/*04*/ uint32 Unknown1;
|
|
||||||
/*08*/ uint32 EliteMaterial;
|
|
||||||
/*12*/ uint32 HeroForgeModel;
|
|
||||||
/*16*/ uint32 Material2; // Same as material?
|
|
||||||
/*20*/
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
struct Membership_Entry_Struct
|
struct Membership_Entry_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
/*000*/ uint32 purchase_id; // Seen 1, then increments 90287 to 90300
|
||||||
@ -410,7 +462,7 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint8 unknown12;
|
/*0000*/ uint8 unknown12;
|
||||||
/*0000*/ uint32 petOwnerId;
|
/*0000*/ uint32 petOwnerId;
|
||||||
/*0000*/ uint8 unknown13;
|
/*0000*/ uint8 unknown13;
|
||||||
/*0000*/ uint32 unknown14; // Stance 64 = normal 4 = aggressive 40 = stun/mezzed
|
/*0000*/ uint32 PlayerState; // Stance 64 = normal 4 = aggressive 40 = stun/mezzed
|
||||||
/*0000*/ uint32 unknown15;
|
/*0000*/ uint32 unknown15;
|
||||||
/*0000*/ uint32 unknown16;
|
/*0000*/ uint32 unknown16;
|
||||||
/*0000*/ uint32 unknown17;
|
/*0000*/ uint32 unknown17;
|
||||||
@ -418,39 +470,24 @@ struct Spawn_Struct
|
|||||||
/*0000*/ uint32 unknown18;
|
/*0000*/ uint32 unknown18;
|
||||||
/*0000*/ uint32 unknown19;
|
/*0000*/ uint32 unknown19;
|
||||||
Spawn_Struct_Position Position;
|
Spawn_Struct_Position Position;
|
||||||
/*0000*/ union
|
/*0000*/ TintProfile equipment_tint;
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
/*0000*/ Color_Struct color_helmet; // Color of helmet item
|
|
||||||
/*0000*/ Color_Struct color_chest; // Color of chest item
|
|
||||||
/*0000*/ Color_Struct color_arms; // Color of arms item
|
|
||||||
/*0000*/ Color_Struct color_bracers; // Color of bracers item
|
|
||||||
/*0000*/ Color_Struct color_hands; // Color of hands item
|
|
||||||
/*0000*/ Color_Struct color_legs; // Color of legs item
|
|
||||||
/*0000*/ Color_Struct color_feet; // Color of feet item
|
|
||||||
/*0000*/ Color_Struct color_primary; // Color of primary item
|
|
||||||
/*0000*/ Color_Struct color_secondary; // Color of secondary item
|
|
||||||
} equipment_colors;
|
|
||||||
/*0000*/ Color_Struct colors[9]; // Array elements correspond to struct equipment_colors above
|
|
||||||
};
|
|
||||||
|
|
||||||
// skip these bytes if not a valid player race
|
// skip these bytes if not a valid player race
|
||||||
/*0000*/ union
|
/*0000*/ union
|
||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*0000*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*0000*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*0000*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*0000*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*0000*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*0000*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*0000*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*0000*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*0000*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*0000*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*0000*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*0000*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*0000*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*0000*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*0000*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*0000*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*0000*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*0000*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
} equip;
|
} equip;
|
||||||
/*0000*/ EquipStruct equipment[9];
|
/*0000*/ Texture_Struct equipment[9];
|
||||||
};
|
};
|
||||||
|
|
||||||
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
/*0000*/ //char title[0]; // only read if(hasTitleOrSuffix & 4)
|
||||||
@ -587,7 +624,7 @@ struct MemorizeSpell_Struct {
|
|||||||
uint32 slot; // Spot in the spell book/memorized slot
|
uint32 slot; // Spot in the spell book/memorized slot
|
||||||
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
uint32 spell_id; // Spell id (200 or c8 is minor healing, etc)
|
||||||
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
uint32 scribing; // 1 if memorizing a spell, set to 0 if scribing to book, 2 if un-memming
|
||||||
uint32 unknown12;
|
uint32 reduction; // lowers reuse
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -620,11 +657,12 @@ struct DeleteSpell_Struct
|
|||||||
|
|
||||||
struct ManaChange_Struct
|
struct ManaChange_Struct
|
||||||
{
|
{
|
||||||
uint32 new_mana; // New Mana AMount
|
/*00*/ uint32 new_mana; // New Mana AMount
|
||||||
uint32 stamina;
|
/*04*/ uint32 stamina;
|
||||||
uint32 spell_id;
|
/*08*/ uint32 spell_id;
|
||||||
uint32 unknown12;
|
/*12*/ uint8 keepcasting; // won't stop the cast. Change mana while casting?
|
||||||
uint32 unknown16;
|
/*13*/ uint8 padding[3]; // client doesn't read it, garbage data seems like
|
||||||
|
/*16*/ int32 slot; // -1 for normal usage slot for when we want silent interrupt? I think it does timer stuff or something. Linked Spell Reuse interrupt uses it
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SwapSpell_Struct
|
struct SwapSpell_Struct
|
||||||
@ -645,9 +683,12 @@ struct CastSpell_Struct
|
|||||||
{
|
{
|
||||||
/*00*/ uint32 slot;
|
/*00*/ uint32 slot;
|
||||||
/*04*/ uint32 spell_id;
|
/*04*/ uint32 spell_id;
|
||||||
/*08*/ ItemSlotStruct inventoryslot; // slot for clicky item, Seen unknown of 131 = normal cast
|
/*08*/ InventorySlot_Struct inventory_slot; // slot for clicky item, Seen unknown of 131 = normal cast
|
||||||
/*20*/ uint32 target_id;
|
/*20*/ uint32 target_id;
|
||||||
/*24*/ uint32 cs_unknown[5];
|
/*24*/ uint32 cs_unknown[2];
|
||||||
|
/*32*/ float y_pos;
|
||||||
|
/*36*/ float x_pos;
|
||||||
|
/*40*/ float z_pos;
|
||||||
/*44*/
|
/*44*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -668,69 +709,31 @@ struct SpawnAppearance_Struct
|
|||||||
|
|
||||||
struct SpellBuff_Struct
|
struct SpellBuff_Struct
|
||||||
{
|
{
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
/*000*/ uint8 effect_type; // 0 = no buff, 2 = buff, 4 = inverse affects of buff
|
||||||
/*001*/ float unknown004; // Seen 1 for no buff
|
/*001*/ uint8 level; // Seen 1 for no buff
|
||||||
/*005*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*002*/ uint8 unknown002; //pretty sure padding now
|
||||||
/*009*/ uint32 unknown016;
|
/*003*/ uint8 unknown003; // MQ2 used to call this "damage shield" -- don't see client referencing it, so maybe server side DS type tracking?
|
||||||
/*013*/ uint8 bard_modifier;
|
/*004*/ float bard_modifier;
|
||||||
/*014*/ uint32 duration;
|
/*008*/ uint32 spellid;
|
||||||
/*018*/ uint8 level;
|
|
||||||
/*019*/ uint32 spellid;
|
|
||||||
/*023*/ uint32 counters;
|
|
||||||
/*027*/ uint8 unknown0028[53];
|
|
||||||
/*080*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct SpellBuff_Struct_Old
|
|
||||||
{
|
|
||||||
/*000*/ uint8 slotid; // badly named... seems to be 2 for a real buff, 0 otherwise
|
|
||||||
/*001*/ uint8 level;
|
|
||||||
/*002*/ uint8 bard_modifier;
|
|
||||||
/*003*/ uint8 effect; // not real
|
|
||||||
/*004*/ float unknown004; // Seen 1 for no buff
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ uint32 duration;
|
/*012*/ uint32 duration;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 player_id; // caster ID, pretty sure just zone ID
|
||||||
/*020*/ uint32 player_id; // 'global' ID of the caster, for wearoff messages
|
/*020*/ uint32 num_hits;
|
||||||
/*024*/ uint32 counters;
|
/*024*/ float y; // referenced by SPA 441
|
||||||
/*028*/ uint8 unknown0028[60];
|
/*028*/ float x; // unsure if all buffs get them
|
||||||
|
/*032*/ float z; // as valid data
|
||||||
|
/*036*/ uint32 unknown036;
|
||||||
|
/*040*/ int32 slot_data[12]; // book keeping stuff per slot (counters, rune/vie)
|
||||||
/*088*/
|
/*088*/
|
||||||
};
|
};
|
||||||
|
|
||||||
// Not functional yet, but this is what the packet looks like on Live
|
struct SpellBuffPacket_Struct {
|
||||||
struct SpellBuffFade_Struct_Live {
|
/*000*/ uint32 entityid; // Player id who cast the buff
|
||||||
/*000*/ uint32 entityid; // Player id who cast the buff
|
/*004*/ SpellBuff_Struct buff;
|
||||||
/*004*/ uint8 unknown004;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown007;
|
|
||||||
/*008*/ float unknown008;
|
|
||||||
/*012*/ uint32 spellid;
|
|
||||||
/*016*/ uint32 duration;
|
|
||||||
/*020*/ uint32 playerId; // Global player ID?
|
|
||||||
/*024*/ uint32 num_hits;
|
|
||||||
/*028*/ uint8 unknown0028[64];
|
|
||||||
/*092*/ uint32 slotid;
|
/*092*/ uint32 slotid;
|
||||||
/*096*/ uint32 bufffade;
|
/*096*/ uint32 bufffade;
|
||||||
/*100*/
|
/*100*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SpellBuffFade_Struct {
|
|
||||||
/*000*/ uint32 entityid;
|
|
||||||
/*004*/ uint8 slot;
|
|
||||||
/*005*/ uint8 level;
|
|
||||||
/*006*/ uint8 effect;
|
|
||||||
/*007*/ uint8 unknown7;
|
|
||||||
/*008*/ uint32 spellid;
|
|
||||||
/*012*/ uint32 duration;
|
|
||||||
/*016*/ uint32 num_hits;
|
|
||||||
/*020*/ uint32 unknown020; // Global player ID?
|
|
||||||
/*024*/ uint32 playerId; // Player id who cast the buff
|
|
||||||
/*028*/ uint32 slotid;
|
|
||||||
/*032*/ uint32 bufffade;
|
|
||||||
/*036*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct BuffRemoveRequest_Struct
|
struct BuffRemoveRequest_Struct
|
||||||
{
|
{
|
||||||
/*00*/ uint32 SlotID;
|
/*00*/ uint32 SlotID;
|
||||||
@ -863,7 +866,7 @@ struct AA_Array
|
|||||||
{
|
{
|
||||||
uint32 AA;
|
uint32 AA;
|
||||||
uint32 value;
|
uint32 value;
|
||||||
uint32 unknown08; // Looks like AA_Array is now 12 bytes in Live
|
uint32 charges; // expendable charges
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Disciplines_Struct {
|
struct Disciplines_Struct {
|
||||||
@ -905,13 +908,13 @@ struct BandolierItem_Struct_Old
|
|||||||
struct Bandolier_Struct
|
struct Bandolier_Struct
|
||||||
{
|
{
|
||||||
char Name[1]; // Variable Length
|
char Name[1]; // Variable Length
|
||||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Bandolier_Struct_Old
|
struct Bandolier_Struct_Old
|
||||||
{
|
{
|
||||||
char Name[32];
|
char Name[32];
|
||||||
BandolierItem_Struct Items[consts::BANDOLIER_ITEM_COUNT];
|
BandolierItem_Struct Items[profile::BandolierItemCount];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBeltItem_Struct
|
struct PotionBeltItem_Struct
|
||||||
@ -931,12 +934,12 @@ struct PotionBeltItem_Struct_Old
|
|||||||
|
|
||||||
struct PotionBelt_Struct
|
struct PotionBelt_Struct
|
||||||
{
|
{
|
||||||
PotionBeltItem_Struct Items[consts::POTION_BELT_ITEM_COUNT];
|
PotionBeltItem_Struct Items[profile::PotionBeltSize];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PotionBelt_Struct_Old
|
struct PotionBelt_Struct_Old
|
||||||
{
|
{
|
||||||
PotionBeltItem_Struct_Old Items[consts::POTION_BELT_ITEM_COUNT];
|
PotionBeltItem_Struct_Old Items[profile::PotionBeltSize];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GroupLeadershipAA_Struct {
|
struct GroupLeadershipAA_Struct {
|
||||||
@ -1035,38 +1038,38 @@ union
|
|||||||
{
|
{
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
/*00184*/ EquipStruct equip_helmet; // Equiptment: Helmet visual
|
/*00184*/ Texture_Struct equip_helmet; // Equiptment: Helmet visual
|
||||||
/*00204*/ EquipStruct equip_chest; // Equiptment: Chest visual
|
/*00204*/ Texture_Struct equip_chest; // Equiptment: Chest visual
|
||||||
/*00224*/ EquipStruct equip_arms; // Equiptment: Arms visual
|
/*00224*/ Texture_Struct equip_arms; // Equiptment: Arms visual
|
||||||
/*00244*/ EquipStruct equip_bracers; // Equiptment: Wrist visual
|
/*00244*/ Texture_Struct equip_bracers; // Equiptment: Wrist visual
|
||||||
/*00264*/ EquipStruct equip_hands; // Equiptment: Hands visual
|
/*00264*/ Texture_Struct equip_hands; // Equiptment: Hands visual
|
||||||
/*00284*/ EquipStruct equip_legs; // Equiptment: Legs visual
|
/*00284*/ Texture_Struct equip_legs; // Equiptment: Legs visual
|
||||||
/*00304*/ EquipStruct equip_feet; // Equiptment: Boots visual
|
/*00304*/ Texture_Struct equip_feet; // Equiptment: Boots visual
|
||||||
/*00324*/ EquipStruct equip_primary; // Equiptment: Main visual
|
/*00324*/ Texture_Struct equip_primary; // Equiptment: Main visual
|
||||||
/*00344*/ EquipStruct equip_secondary; // Equiptment: Off visual
|
/*00344*/ Texture_Struct equip_secondary; // Equiptment: Off visual
|
||||||
// Below slots are just guesses, but all 0s anyway...
|
// Below slots are just guesses, but all 0s anyway...
|
||||||
/*00364*/ EquipStruct equip_charm; // Equiptment: Non-visual
|
/*00364*/ Texture_Struct equip_charm; // Equiptment: Non-visual
|
||||||
/*00384*/ EquipStruct equip_ear1; // Equiptment: Non-visual
|
/*00384*/ Texture_Struct equip_ear1; // Equiptment: Non-visual
|
||||||
/*00404*/ EquipStruct equip_ear2; // Equiptment: Non-visual
|
/*00404*/ Texture_Struct equip_ear2; // Equiptment: Non-visual
|
||||||
/*00424*/ EquipStruct equip_face; // Equiptment: Non-visual
|
/*00424*/ Texture_Struct equip_face; // Equiptment: Non-visual
|
||||||
/*00444*/ EquipStruct equip_neck; // Equiptment: Non-visual
|
/*00444*/ Texture_Struct equip_neck; // Equiptment: Non-visual
|
||||||
/*00464*/ EquipStruct equip_shoulder; // Equiptment: Non-visual
|
/*00464*/ Texture_Struct equip_shoulder; // Equiptment: Non-visual
|
||||||
/*00484*/ EquipStruct equip_bracer2; // Equiptment: Non-visual
|
/*00484*/ Texture_Struct equip_bracer2; // Equiptment: Non-visual
|
||||||
/*00504*/ EquipStruct equip_range; // Equiptment: Non-visual
|
/*00504*/ Texture_Struct equip_range; // Equiptment: Non-visual
|
||||||
/*00524*/ EquipStruct equip_ring1; // Equiptment: Non-visual
|
/*00524*/ Texture_Struct equip_ring1; // Equiptment: Non-visual
|
||||||
/*00544*/ EquipStruct equip_ring2; // Equiptment: Non-visual
|
/*00544*/ Texture_Struct equip_ring2; // Equiptment: Non-visual
|
||||||
/*00564*/ EquipStruct equip_waist; // Equiptment: Non-visual
|
/*00564*/ Texture_Struct equip_waist; // Equiptment: Non-visual
|
||||||
/*00584*/ EquipStruct equip_powersource; // Equiptment: Non-visual
|
/*00584*/ Texture_Struct equip_powersource; // Equiptment: Non-visual
|
||||||
/*00604*/ EquipStruct equip_ammo; // Equiptment: Non-visual
|
/*00604*/ Texture_Struct equip_ammo; // Equiptment: Non-visual
|
||||||
} equip;
|
} equip;
|
||||||
/*00184*/ EquipStruct equipment[22];
|
/*00184*/ Texture_Struct equipment[22];
|
||||||
};
|
};
|
||||||
/*00624*/ uint32 equip2_count; // Seen 9
|
/*00624*/ uint32 equip2_count; // Seen 9
|
||||||
/*00628*/ EquipStruct equipment2[9]; // Appears to be Visible slots, but all 0s
|
/*00628*/ Texture_Struct equipment2[9]; // Appears to be Visible slots, but all 0s
|
||||||
/*00808*/ uint32 tint_count; // Seen 9
|
/*00808*/ uint32 tint_count; // Seen 9
|
||||||
/*00812*/ Color_Struct item_tint[9]; // RR GG BB 00
|
/*00812*/ TintProfile item_tint; // RR GG BB 00
|
||||||
/*00848*/ uint32 tint_count2; // Seen 9
|
/*00848*/ uint32 tint_count2; // Seen 9
|
||||||
/*00852*/ Color_Struct item_tint2[9]; // RR GG BB 00
|
/*00852*/ TintProfile item_tint2; // RR GG BB 00
|
||||||
/*00888*/ uint8 haircolor; // Player hair color
|
/*00888*/ uint8 haircolor; // Player hair color
|
||||||
/*00889*/ uint8 beardcolor; // Player beard color
|
/*00889*/ uint8 beardcolor; // Player beard color
|
||||||
/*00890*/ uint32 unknown_rof5; //
|
/*00890*/ uint32 unknown_rof5; //
|
||||||
@ -1146,7 +1149,7 @@ union
|
|||||||
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
/*12949*/ uint32 aapoints; // Unspent AA points - Seen 1
|
||||||
/*12953*/ uint16 unknown_rof20; //
|
/*12953*/ uint16 unknown_rof20; //
|
||||||
/*12955*/ uint32 bandolier_count; // Seen 20
|
/*12955*/ uint32 bandolier_count; // Seen 20
|
||||||
/*12959*/ Bandolier_Struct bandoliers[consts::BANDOLIERS_SIZE]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
/*12959*/ Bandolier_Struct bandoliers[profile::BandoliersSize]; // [20] 740 bytes (Variable Name Sizes) - bandolier contents
|
||||||
/*13699*/ uint32 potionbelt_count; // Seen 5
|
/*13699*/ uint32 potionbelt_count; // Seen 5
|
||||||
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
/*13703*/ PotionBelt_Struct potionbelt; // [5] 45 bytes potion belt - (Variable Name Sizes)
|
||||||
/*13748*/ int32 unknown_rof21; // Seen -1
|
/*13748*/ int32 unknown_rof21; // Seen -1
|
||||||
@ -1320,7 +1323,7 @@ struct TargetReject_Struct {
|
|||||||
|
|
||||||
struct PetCommand_Struct {
|
struct PetCommand_Struct {
|
||||||
/*00*/ uint32 command;
|
/*00*/ uint32 command;
|
||||||
/*04*/ uint32 unknown04;
|
/*04*/ uint32 target;
|
||||||
/*08*/ uint32 unknown08;
|
/*08*/ uint32 unknown08;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1389,7 +1392,7 @@ struct WearChange_Struct{
|
|||||||
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
/*010*/ uint32 elite_material; // 1 for Drakkin Elite Material
|
||||||
/*014*/ uint32 hero_forge_model; // New to VoA
|
/*014*/ uint32 hero_forge_model; // New to VoA
|
||||||
/*018*/ uint32 unknown18; // New to RoF
|
/*018*/ uint32 unknown18; // New to RoF
|
||||||
/*022*/ Color_Struct color;
|
/*022*/ Tint_Struct color;
|
||||||
/*026*/ uint8 wear_slot_id;
|
/*026*/ uint8 wear_slot_id;
|
||||||
/*027*/
|
/*027*/
|
||||||
};
|
};
|
||||||
@ -1445,8 +1448,8 @@ struct RequestClientZoneChange_Struct {
|
|||||||
|
|
||||||
struct Animation_Struct {
|
struct Animation_Struct {
|
||||||
/*00*/ uint16 spawnid;
|
/*00*/ uint16 spawnid;
|
||||||
/*02*/ uint8 value;
|
/*02*/ uint8 action;
|
||||||
/*03*/ uint8 action;
|
/*03*/ uint8 speed;
|
||||||
/*04*/
|
/*04*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1511,9 +1514,11 @@ struct CombatDamage_Struct
|
|||||||
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
/* 04 */ uint8 type; //slashing, etc. 231 (0xE7) for spells
|
||||||
/* 05 */ uint32 spellid;
|
/* 05 */ uint32 spellid;
|
||||||
/* 09 */ int32 damage;
|
/* 09 */ int32 damage;
|
||||||
/* 13 */ float unknown11; // cd cc cc 3d
|
/* 13 */ float force; // cd cc cc 3d
|
||||||
/* 17 */ float sequence; // see above notes in Action_Struct
|
/* 17 */ float meleepush_xy; // see above notes in Action_Struct
|
||||||
/* 21 */ uint8 unknown19[9]; // was [9]
|
/* 21 */ float meleepush_z;
|
||||||
|
/* 25 */ uint8 unknown25; // was [9]
|
||||||
|
/* 26 */ uint32 special; // 2 = Rampage, 1 = Wild Rampage
|
||||||
/* 30 */
|
/* 30 */
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1772,7 +1777,7 @@ struct BulkItemPacket_Struct
|
|||||||
|
|
||||||
struct Consume_Struct
|
struct Consume_Struct
|
||||||
{
|
{
|
||||||
/*000*/ ItemSlotStruct slot;
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
/*012*/ uint32 auto_consumed; // 0xffffffff when auto eating e7030000 when right click
|
||||||
/*016*/ uint32 type; // 0x01=Food 0x02=Water
|
/*016*/ uint32 type; // 0x01=Food 0x02=Water
|
||||||
/*020*/ uint32 c_unknown1; // Seen 2
|
/*020*/ uint32 c_unknown1; // Seen 2
|
||||||
@ -1804,17 +1809,19 @@ struct ItemProperties_Struct {
|
|||||||
/*008*/
|
/*008*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DeleteItem_Struct {
|
struct DeleteItem_Struct
|
||||||
/*0000*/ ItemSlotStruct from_slot;
|
{
|
||||||
/*0012*/ ItemSlotStruct to_slot;
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
/*0024*/ uint32 number_in_stack;
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
|
/*0024*/ uint32 number_in_stack;
|
||||||
/*0028*/
|
/*0028*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct MoveItem_Struct {
|
struct MoveItem_Struct
|
||||||
/*0000*/ ItemSlotStruct from_slot;
|
{
|
||||||
/*0012*/ ItemSlotStruct to_slot;
|
/*0000*/ InventorySlot_Struct from_slot;
|
||||||
/*0024*/ uint32 number_in_stack;
|
/*0012*/ InventorySlot_Struct to_slot;
|
||||||
|
/*0024*/ uint32 number_in_stack;
|
||||||
/*0028*/
|
/*0028*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1884,6 +1891,114 @@ struct GuildUpdate_Struct {
|
|||||||
GuildsListEntry_Struct entry;
|
GuildsListEntry_Struct entry;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct GuildBankAck_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 10
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankDepositAck_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 10
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint32 Fail; //1 = Fail, 0 = Success
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankPromote_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 3
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*12*/ uint32 Slot;
|
||||||
|
/*16*/ uint32 Slot2; // Always appears to be the same as Slot for Action code 3
|
||||||
|
/*20*/ uint32 unknown20;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankPermissions_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action; // 6
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID;
|
||||||
|
/*10*/ uint16 Unknown10; // Saw 1, probably indicating it is the main area rather than deposits
|
||||||
|
/*12*/ uint32 ItemID;
|
||||||
|
/*16*/ uint32 Permissions;
|
||||||
|
/*20*/ char MemberName[64];
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankViewItem_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID; // 0 = Deposit area, 1 = Main area
|
||||||
|
/*10*/ uint16 Area;
|
||||||
|
/*12*/ uint32 Unknown12;
|
||||||
|
/*16*/ uint32 Unknown16;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankWithdrawItem_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*08*/ uint16 SlotID;
|
||||||
|
/*10*/ uint16 Area;
|
||||||
|
/*12*/ uint32 Unknown12;
|
||||||
|
/*16*/ uint32 Quantity;
|
||||||
|
/*20*/
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankItemUpdate_Struct
|
||||||
|
{
|
||||||
|
void Init(uint32 inAction, uint32 inUnknown004, uint16 inSlotID, uint16 inArea, uint16 inUnknown012, uint32 inItemID, uint32 inIcon, uint32 inQuantity,
|
||||||
|
uint32 inPermissions, uint32 inAllowMerge, bool inUseable)
|
||||||
|
{
|
||||||
|
Action = inAction;
|
||||||
|
Unknown004 = inUnknown004;
|
||||||
|
SlotID = inSlotID;
|
||||||
|
Area = inArea;
|
||||||
|
Unknown012 = inUnknown012;
|
||||||
|
ItemID = inItemID;
|
||||||
|
Icon = inIcon;
|
||||||
|
Quantity = inQuantity;
|
||||||
|
Permissions = inPermissions;
|
||||||
|
AllowMerge = inAllowMerge;
|
||||||
|
Useable = inUseable;
|
||||||
|
ItemName[0] = '\0';
|
||||||
|
Donator[0] = '\0';
|
||||||
|
WhoFor[0] = '\0';
|
||||||
|
};
|
||||||
|
|
||||||
|
/*000*/ uint32 Action;
|
||||||
|
/*004*/ uint32 Unknown004;
|
||||||
|
/*008*/ uint32 Unknown08;
|
||||||
|
/*012*/ uint16 SlotID;
|
||||||
|
/*014*/ uint16 Area;
|
||||||
|
/*016*/ uint32 Unknown012;
|
||||||
|
/*020*/ uint32 ItemID;
|
||||||
|
/*024*/ uint32 Icon;
|
||||||
|
/*028*/ uint32 Quantity;
|
||||||
|
/*032*/ uint32 Permissions;
|
||||||
|
/*036*/ uint8 AllowMerge;
|
||||||
|
/*037*/ uint8 Useable; // Used in conjunction with the Public-if-useable permission.
|
||||||
|
/*038*/ char ItemName[64];
|
||||||
|
/*102*/ char Donator[64];
|
||||||
|
/*166*/ char WhoFor[64];
|
||||||
|
/*230*/ uint16 Unknown226;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct GuildBankClear_Struct
|
||||||
|
{
|
||||||
|
/*00*/ uint32 Action;
|
||||||
|
/*04*/ uint32 Unknown04;
|
||||||
|
/*08*/ uint32 Unknown08;
|
||||||
|
/*12*/ uint32 DepositAreaCount;
|
||||||
|
/*16*/ uint32 MainAreaCount;
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Money Loot
|
** Money Loot
|
||||||
** Length: 22 Bytes
|
** Length: 22 Bytes
|
||||||
@ -2139,7 +2254,7 @@ struct Merchant_Sell_Struct {
|
|||||||
|
|
||||||
struct Merchant_Purchase_Struct {
|
struct Merchant_Purchase_Struct {
|
||||||
/*000*/ uint32 npcid; // Merchant NPC's entity id
|
/*000*/ uint32 npcid; // Merchant NPC's entity id
|
||||||
/*004*/ MainInvItemSlotStruct itemslot;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 quantity;
|
/*012*/ uint32 quantity;
|
||||||
/*016*/ uint32 price;
|
/*016*/ uint32 price;
|
||||||
/*020*/
|
/*020*/
|
||||||
@ -2197,9 +2312,10 @@ struct AltCurrencyUpdate_Struct {
|
|||||||
|
|
||||||
//Client -> Server
|
//Client -> Server
|
||||||
//When an item is selected while the alt currency merchant window is open
|
//When an item is selected while the alt currency merchant window is open
|
||||||
struct AltCurrencySelectItem_Struct {
|
struct AltCurrencySelectItem_Struct
|
||||||
|
{
|
||||||
/*000*/ uint32 merchant_entity_id;
|
/*000*/ uint32 merchant_entity_id;
|
||||||
/*004*/ MainInvItemSlotStruct slot_id;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*008*/ uint32 unknown008;
|
/*008*/ uint32 unknown008;
|
||||||
/*012*/ uint32 unknown012;
|
/*012*/ uint32 unknown012;
|
||||||
/*016*/ uint32 unknown016;
|
/*016*/ uint32 unknown016;
|
||||||
@ -2256,7 +2372,7 @@ struct AltCurrencyReclaim_Struct {
|
|||||||
|
|
||||||
struct AltCurrencySellItem_Struct {
|
struct AltCurrencySellItem_Struct {
|
||||||
/*000*/ uint32 merchant_entity_id;
|
/*000*/ uint32 merchant_entity_id;
|
||||||
/*004*/ MainInvItemSlotStruct slot_id;
|
/*004*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*008*/ uint32 charges;
|
/*008*/ uint32 charges;
|
||||||
/*012*/ uint32 cost;
|
/*012*/ uint32 cost;
|
||||||
};
|
};
|
||||||
@ -2271,7 +2387,7 @@ struct Adventure_Purchase_Struct {
|
|||||||
struct Adventure_Sell_Struct {
|
struct Adventure_Sell_Struct {
|
||||||
/*000*/ uint32 unknown000; //0x01 - Stack Size/Charges?
|
/*000*/ uint32 unknown000; //0x01 - Stack Size/Charges?
|
||||||
/*004*/ uint32 npcid;
|
/*004*/ uint32 npcid;
|
||||||
/*008*/ MainInvItemSlotStruct slot;
|
/*008*/ TypelessInventorySlot_Struct inventory_slot;
|
||||||
/*016*/ uint32 charges;
|
/*016*/ uint32 charges;
|
||||||
/*020*/ uint32 sell_price;
|
/*020*/ uint32 sell_price;
|
||||||
/*024*/
|
/*024*/
|
||||||
@ -2334,7 +2450,7 @@ struct AdventureLeaderboard_Struct
|
|||||||
/*struct Item_Shop_Struct {
|
/*struct Item_Shop_Struct {
|
||||||
uint16 merchantid;
|
uint16 merchantid;
|
||||||
uint8 itemtype;
|
uint8 itemtype;
|
||||||
Item_Struct item;
|
ItemBase item;
|
||||||
uint8 iss_unknown001[6];
|
uint8 iss_unknown001[6];
|
||||||
};*/
|
};*/
|
||||||
|
|
||||||
@ -2497,7 +2613,7 @@ struct GroupFollow_Struct { // Live Follow Struct
|
|||||||
|
|
||||||
struct InspectBuffs_Struct {
|
struct InspectBuffs_Struct {
|
||||||
/*000*/ uint32 spell_id[BUFF_COUNT];
|
/*000*/ uint32 spell_id[BUFF_COUNT];
|
||||||
/*168*/ uint32 tics_remaining[BUFF_COUNT];
|
/*168*/ int32 tics_remaining[BUFF_COUNT];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LFG_Struct {
|
struct LFG_Struct {
|
||||||
@ -2617,9 +2733,9 @@ struct Stun_Struct { // 8 bytes total
|
|||||||
struct AugmentItem_Struct {
|
struct AugmentItem_Struct {
|
||||||
/*00*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
|
/*00*/ uint32 dest_inst_id; // The unique serial number for the item instance that is being augmented
|
||||||
/*04*/ uint32 container_index; // Seen 0
|
/*04*/ uint32 container_index; // Seen 0
|
||||||
/*08*/ ItemSlotStruct container_slot; // Slot of the item being augmented
|
/*08*/ InventorySlot_Struct container_slot; // Slot of the item being augmented
|
||||||
/*20*/ uint32 augment_index; // Seen 0
|
/*20*/ uint32 augment_index; // Seen 0
|
||||||
/*24*/ ItemSlotStruct augment_slot; // Slot of the distiller to use (if one applies)
|
/*24*/ InventorySlot_Struct augment_slot; // Slot of the distiller to use (if one applies)
|
||||||
/*36*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
|
/*36*/ int32 augment_action; // Guessed - 0 = augment, 1 = remove with distiller, 3 = delete aug
|
||||||
/*36*/ //int32 augment_slot;
|
/*36*/ //int32 augment_slot;
|
||||||
/*40*/
|
/*40*/
|
||||||
@ -2760,7 +2876,8 @@ struct Object_Struct {
|
|||||||
/*00*/ uint32 drop_id; // Unique object id for zone
|
/*00*/ uint32 drop_id; // Unique object id for zone
|
||||||
/*00*/ uint32 unknown024; // 53 9e f9 7e - same for all objects in the zone?
|
/*00*/ uint32 unknown024; // 53 9e f9 7e - same for all objects in the zone?
|
||||||
/*00*/ float heading; // heading
|
/*00*/ float heading; // heading
|
||||||
/*00*/ float unknown032[2]; // 00 00 00 00 00 00 00 00
|
/*00*/ float x_tilt; //Tilt entire object on X axis
|
||||||
|
/*00*/ float y_tilt; //Tilt entire object on Y axis
|
||||||
/*00*/ float size; // Size - default 1
|
/*00*/ float size; // Size - default 1
|
||||||
/*00*/ float z; // z coord
|
/*00*/ float z; // z coord
|
||||||
/*00*/ float x; // x coord
|
/*00*/ float x; // x coord
|
||||||
@ -3494,27 +3611,6 @@ struct PetitionBug_Struct{
|
|||||||
char text[1028];
|
char text[1028];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DyeStruct
|
|
||||||
{
|
|
||||||
union
|
|
||||||
{
|
|
||||||
struct
|
|
||||||
{
|
|
||||||
struct Color_Struct head;
|
|
||||||
struct Color_Struct chest;
|
|
||||||
struct Color_Struct arms;
|
|
||||||
struct Color_Struct wrists;
|
|
||||||
struct Color_Struct hands;
|
|
||||||
struct Color_Struct legs;
|
|
||||||
struct Color_Struct feet;
|
|
||||||
struct Color_Struct primary; // you can't actually dye this
|
|
||||||
struct Color_Struct secondary; // or this
|
|
||||||
}
|
|
||||||
dyes;
|
|
||||||
struct Color_Struct dye[9];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ApproveZone_Struct {
|
struct ApproveZone_Struct {
|
||||||
char name[64];
|
char name[64];
|
||||||
uint32 zoneid;
|
uint32 zoneid;
|
||||||
@ -3578,7 +3674,7 @@ struct TributeInfo_Struct {
|
|||||||
|
|
||||||
struct TributeItem_Struct
|
struct TributeItem_Struct
|
||||||
{
|
{
|
||||||
/*00*/ ItemSlotStruct slot;
|
/*00*/ InventorySlot_Struct inventory_slot;
|
||||||
/*12*/ uint32 quantity;
|
/*12*/ uint32 quantity;
|
||||||
/*16*/ uint32 tribute_master_id;
|
/*16*/ uint32 tribute_master_id;
|
||||||
/*20*/ int32 tribute_points;
|
/*20*/ int32 tribute_points;
|
||||||
@ -3615,9 +3711,10 @@ struct Split_Struct
|
|||||||
** Used In: OP_TradeSkillCombine
|
** Used In: OP_TradeSkillCombine
|
||||||
** Last Updated: 01-05-2013
|
** Last Updated: 01-05-2013
|
||||||
*/
|
*/
|
||||||
struct NewCombine_Struct {
|
struct NewCombine_Struct
|
||||||
/*00*/ ItemSlotStruct container_slot;
|
{
|
||||||
/*12*/ ItemSlotStruct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8)
|
/*00*/ InventorySlot_Struct container_slot;
|
||||||
|
/*12*/ InventorySlot_Struct guildtribute_slot; // Slot type is 8? (MapGuildTribute = 8)
|
||||||
/*24*/
|
/*24*/
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3653,11 +3750,12 @@ struct RecipeReply_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
//received and sent back as an ACK with different reply_code
|
//received and sent back as an ACK with different reply_code
|
||||||
struct RecipeAutoCombine_Struct {
|
struct RecipeAutoCombine_Struct
|
||||||
|
{
|
||||||
/*00*/ uint32 object_type;
|
/*00*/ uint32 object_type;
|
||||||
/*04*/ uint32 some_id;
|
/*04*/ uint32 some_id;
|
||||||
/*08*/ ItemSlotStruct container_slot; //echoed in reply - Was uint32 unknown1
|
/*08*/ InventorySlot_Struct container_slot; //echoed in reply - Was uint32 unknown1
|
||||||
/*20*/ ItemSlotStruct unknown_slot; //echoed in reply
|
/*20*/ InventorySlot_Struct unknown_slot; //echoed in reply
|
||||||
/*32*/ uint32 recipe_id;
|
/*32*/ uint32 recipe_id;
|
||||||
/*36*/ uint32 reply_code;
|
/*36*/ uint32 reply_code;
|
||||||
/*40*/
|
/*40*/
|
||||||
@ -4248,9 +4346,9 @@ struct SendAA_Struct {
|
|||||||
/*0025*/ uint32 cost;
|
/*0025*/ uint32 cost;
|
||||||
/*0029*/ uint32 seq;
|
/*0029*/ uint32 seq;
|
||||||
/*0033*/ uint32 current_level; //1s, MQ2 calls this AARankRequired
|
/*0033*/ uint32 current_level; //1s, MQ2 calls this AARankRequired
|
||||||
/*0037*/ uint32 unknown037; // Introduced during HoT
|
/*0037*/ uint32 prereq_skill_count; // mutliple prereqs at least 1, even no prereqs
|
||||||
/*0041*/ uint32 prereq_skill; //is < 0, abs() is category #
|
/*0041*/ uint32 prereq_skill; //is < 0, abs() is category #
|
||||||
/*0045*/ uint32 unknown045; // New Mar 21 2012 - Seen 1
|
/*0045*/ uint32 prereq_minpoints_count; // mutliple prereqs at least 1, even no prereqs
|
||||||
/*0049*/ uint32 prereq_minpoints; //min points in the prereq
|
/*0049*/ uint32 prereq_minpoints; //min points in the prereq
|
||||||
/*0053*/ uint32 type;
|
/*0053*/ uint32 type;
|
||||||
/*0057*/ uint32 spellid;
|
/*0057*/ uint32 spellid;
|
||||||
@ -4263,10 +4361,16 @@ struct SendAA_Struct {
|
|||||||
/*0081*/ uint32 last_id;
|
/*0081*/ uint32 last_id;
|
||||||
/*0085*/ uint32 next_id;
|
/*0085*/ uint32 next_id;
|
||||||
/*0089*/ uint32 cost2;
|
/*0089*/ uint32 cost2;
|
||||||
/*0093*/ uint8 unknown80[7];
|
/*0093*/ uint8 unknown93;
|
||||||
|
/*0094*/ uint8 grant_only; // VetAAs, progression, etc
|
||||||
|
/*0095*/ uint8 unknown95; // 1 for skill cap increase AAs, Mystical Attuning, and RNG attack inc, doesn't seem to matter though
|
||||||
|
/*0096*/ uint32 expendable_charges; // max charges of the AA
|
||||||
/*0100*/ uint32 aa_expansion;
|
/*0100*/ uint32 aa_expansion;
|
||||||
/*0104*/ uint32 special_category;
|
/*0104*/ uint32 special_category;
|
||||||
/*0108*/ uint32 unknown0096;
|
/*0108*/ uint8 shroud;
|
||||||
|
/*0109*/ uint8 unknown109;
|
||||||
|
/*0110*/ uint8 layonhands; // 1 for lay on hands -- doesn't seem to matter?
|
||||||
|
/*0111*/ uint8 unknown111;
|
||||||
/*0112*/ uint32 total_abilities;
|
/*0112*/ uint32 total_abilities;
|
||||||
/*0116*/ AA_Ability abilities[0];
|
/*0116*/ AA_Ability abilities[0];
|
||||||
};
|
};
|
||||||
@ -4278,18 +4382,11 @@ struct AA_List {
|
|||||||
struct AA_Action {
|
struct AA_Action {
|
||||||
/*00*/ uint32 action;
|
/*00*/ uint32 action;
|
||||||
/*04*/ uint32 ability;
|
/*04*/ uint32 ability;
|
||||||
/*08*/ uint32 unknown08;
|
/*08*/ uint32 target_id;
|
||||||
/*12*/ uint32 exp_value;
|
/*12*/ uint32 exp_value;
|
||||||
/*16*/
|
/*16*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AA_Skills { //this should be removed and changed to AA_Array
|
|
||||||
/*00*/ uint32 aa_skill; // Total AAs Spent
|
|
||||||
/*04*/ uint32 aa_value;
|
|
||||||
/*08*/ uint32 unknown08;
|
|
||||||
/*12*/
|
|
||||||
};
|
|
||||||
|
|
||||||
struct AAExpUpdate_Struct {
|
struct AAExpUpdate_Struct {
|
||||||
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
/*00*/ uint32 unknown00; //seems to be a value from AA_Action.ability
|
||||||
/*04*/ uint32 aapoints_unspent;
|
/*04*/ uint32 aapoints_unspent;
|
||||||
@ -4308,14 +4405,7 @@ struct AltAdvStats_Struct {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerAA_Struct { // Is this still used?
|
struct PlayerAA_Struct { // Is this still used?
|
||||||
AA_Skills aa_list[MAX_PP_AA_ARRAY];
|
AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
|
||||||
|
|
||||||
struct AA_Values {
|
|
||||||
/*00*/ uint32 aa_skill;
|
|
||||||
/*04*/ uint32 aa_value;
|
|
||||||
/*08*/ uint32 unknown08;
|
|
||||||
/*12*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AATable_Struct {
|
struct AATable_Struct {
|
||||||
@ -4325,7 +4415,7 @@ struct AATable_Struct {
|
|||||||
/*12*/ uint32 aa_spent_archetype; // Seen 40
|
/*12*/ uint32 aa_spent_archetype; // Seen 40
|
||||||
/*16*/ uint32 aa_spent_class; // Seen 103
|
/*16*/ uint32 aa_spent_class; // Seen 103
|
||||||
/*20*/ uint32 aa_spent_special; // Seen 0
|
/*20*/ uint32 aa_spent_special; // Seen 0
|
||||||
/*24*/ AA_Values aa_list[MAX_PP_AA_ARRAY];
|
/*24*/ AA_Array aa_list[MAX_PP_AA_ARRAY];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Weather_Struct {
|
struct Weather_Struct {
|
||||||
@ -4380,19 +4470,22 @@ struct ExpansionInfo_Struct {
|
|||||||
/*064*/ uint32 Expansions;
|
/*064*/ uint32 Expansions;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ApplyPoison_Struct {
|
struct ApplyPoison_Struct
|
||||||
MainInvItemSlotStruct inventorySlot;
|
{
|
||||||
|
TypelessInventorySlot_Struct inventory_slot;
|
||||||
uint32 success;
|
uint32 success;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemVerifyRequest_Struct {
|
struct ItemVerifyRequest_Struct
|
||||||
/*000*/ ItemSlotStruct slot;
|
{
|
||||||
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 target; // Target Entity ID
|
/*012*/ uint32 target; // Target Entity ID
|
||||||
/*016*/
|
/*016*/
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemVerifyReply_Struct {
|
struct ItemVerifyReply_Struct
|
||||||
/*000*/ ItemSlotStruct slot;
|
{
|
||||||
|
/*000*/ InventorySlot_Struct inventory_slot;
|
||||||
/*012*/ uint32 spell; // Spell ID to cast if different than item effect
|
/*012*/ uint32 spell; // Spell ID to cast if different than item effect
|
||||||
/*016*/ uint32 target; // Target Entity ID
|
/*016*/ uint32 target; // Target Entity ID
|
||||||
/*020*/
|
/*020*/
|
||||||
@ -4414,7 +4507,7 @@ struct ItemSerializationHeader
|
|||||||
/*025*/ uint8 slot_type; // 0 = normal, 1 = bank, 2 = shared bank, 9 = merchant, 20 = ?
|
/*025*/ uint8 slot_type; // 0 = normal, 1 = bank, 2 = shared bank, 9 = merchant, 20 = ?
|
||||||
/*026*/ uint16 main_slot;
|
/*026*/ uint16 main_slot;
|
||||||
/*028*/ uint16 sub_slot;
|
/*028*/ uint16 sub_slot;
|
||||||
/*030*/ uint16 unknown013; // 0xffff
|
/*030*/ uint16 aug_slot; // 0xffff
|
||||||
/*032*/ uint32 price;
|
/*032*/ uint32 price;
|
||||||
/*036*/ uint32 merchant_slot; //1 if not a merchant item
|
/*036*/ uint32 merchant_slot; //1 if not a merchant item
|
||||||
/*040*/ uint32 scaled_value; //0
|
/*040*/ uint32 scaled_value; //0
|
||||||
@ -4626,7 +4719,7 @@ struct ClickEffectStruct
|
|||||||
|
|
||||||
struct ProcEffectStruct
|
struct ProcEffectStruct
|
||||||
{
|
{
|
||||||
uint32 effect;
|
int32 effect;
|
||||||
uint8 level2;
|
uint8 level2;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
@ -4641,7 +4734,7 @@ struct ProcEffectStruct
|
|||||||
|
|
||||||
struct WornEffectStruct //worn, focus and scroll effect
|
struct WornEffectStruct //worn, focus and scroll effect
|
||||||
{
|
{
|
||||||
uint32 effect;
|
int32 effect;
|
||||||
uint8 level2;
|
uint8 level2;
|
||||||
uint32 type;
|
uint32 type;
|
||||||
uint8 level;
|
uint8 level;
|
||||||
@ -4678,7 +4771,7 @@ struct ItemQuaternaryBodyStruct
|
|||||||
int32 HeroicSVCorrup;
|
int32 HeroicSVCorrup;
|
||||||
int32 HealAmt;
|
int32 HealAmt;
|
||||||
int32 SpellDmg;
|
int32 SpellDmg;
|
||||||
int32 clairvoyance;
|
int32 Clairvoyance;
|
||||||
uint8 unknown18; //Power Source Capacity or evolve filename?
|
uint8 unknown18; //Power Source Capacity or evolve filename?
|
||||||
uint32 evolve_string; // Some String, but being evolution related is just a guess
|
uint32 evolve_string; // Some String, but being evolution related is just a guess
|
||||||
uint8 unknown19;
|
uint8 unknown19;
|
||||||
@ -4705,7 +4798,6 @@ struct ItemQuaternaryBodyStruct
|
|||||||
uint32 unknown_RoF8;
|
uint32 unknown_RoF8;
|
||||||
uint8 unknown38; // 0
|
uint8 unknown38; // 0
|
||||||
uint8 unknown39; // 1
|
uint8 unknown39; // 1
|
||||||
uint32 subitem_count;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct AugmentInfo_Struct
|
struct AugmentInfo_Struct
|
||||||
@ -4940,7 +5032,8 @@ struct MercenaryMerchantResponse_Struct {
|
|||||||
/*0004*/
|
/*0004*/
|
||||||
};
|
};
|
||||||
|
|
||||||
}; //end namespace structs
|
}; /*structs*/
|
||||||
}; //end namespace RoF
|
|
||||||
|
|
||||||
#endif /*ROF_STRUCTS_H_*/
|
}; /*RoF*/
|
||||||
|
|
||||||
|
#endif /*COMMON_ROF_STRUCTS_H*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user