mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 13:16:39 +00:00
Compare commits
130 Commits
item-updates
...
v22.9.0
| Author | SHA1 | Date | |
|---|---|---|---|
| 090086f50c | |||
| 407b003f7d | |||
| b6d315d803 | |||
| 6927177291 | |||
| 31ede355a8 | |||
| 0df84e1ee6 | |||
| 0d509a7f3a | |||
| 4c2271ff69 | |||
| ca2072e7bf | |||
| e1eb1ff738 | |||
| 25f5898bae | |||
| 934ff3dadf | |||
| e4ff76dceb | |||
| 6960a1a682 | |||
| d4174ca236 | |||
| 7854130a93 | |||
| e9c63c7d94 | |||
| 27e0665aae | |||
| ea2f431fce | |||
| 8bdcf7cb94 | |||
| 87cb74b851 | |||
| 26c267db1b | |||
| 99f8e6cef5 | |||
| b6917ec782 | |||
| eb51550109 | |||
| 9d1ace627c | |||
| ec3ef411a1 | |||
| 1394b6a4d2 | |||
| 7f41547963 | |||
| 2e4071cdcf | |||
| dc475a1bd7 | |||
| 59ad91a140 | |||
| abc27ab423 | |||
| c975dc2412 | |||
| e085f271f5 | |||
| 5a6314e1a9 | |||
| dc45e0d280 | |||
| 2e2c4d64fe | |||
| c5add503ab | |||
| fe2dcb6544 | |||
| 4fe44f4cb6 | |||
| 63a8d2d641 | |||
| abcb5d069f | |||
| d6b954a4b9 | |||
| 2415645b86 | |||
| e77a83f8c3 | |||
| a5d564a6fb | |||
| 2f4c91824e | |||
| 53e6f931c9 | |||
| a6efb1e8b5 | |||
| b2757143a8 | |||
| 6e5da0e558 | |||
| 6b8e74a29f | |||
| 203e63101a | |||
| 91257d599b | |||
| 491b358e28 | |||
| 180c3088ca | |||
| 97e4547192 | |||
| 0caee9026a | |||
| 0be7ead1d1 | |||
| 950489bc34 | |||
| 45da8cab61 | |||
| e778041198 | |||
| 97e50ced93 | |||
| 4491bb9a70 | |||
| 04fba27467 | |||
| fa47dd7f93 | |||
| b3fb5f00ab | |||
| e17fad9ae0 | |||
| bbdaacd3b0 | |||
| 61bd485449 | |||
| 4b405fe9fe | |||
| d5aaf7cee5 | |||
| 12e9e0f71d | |||
| 0a64e26672 | |||
| 11fc5a9e93 | |||
| 7bbcdfb479 | |||
| 3a530eb43b | |||
| 48a60114b7 | |||
| 06f1f36c95 | |||
| ccd9bd7d4c | |||
| fea6cbf633 | |||
| 460739d35c | |||
| 11e1edc99f | |||
| 7374660045 | |||
| 9e8d365ca7 | |||
| 14d69a0a14 | |||
| fe063637e9 | |||
| 232b1028d7 | |||
| 3624307385 | |||
| c0055cf357 | |||
| f9c1683d36 | |||
| 64df993c10 | |||
| 890ef696fe | |||
| 3f1848b01a | |||
| f7c4f1ff75 | |||
| dcb127f4b6 | |||
| 669b068978 | |||
| db2aeca38f | |||
| 1b3ca95f8c | |||
| c05baac551 | |||
| 939fc79d19 | |||
| a0e6fce057 | |||
| 452389b7a5 | |||
| dd184fa8b6 | |||
| 4a3e6b5edc | |||
| 7961d7afa8 | |||
| cc6bcf3295 | |||
| b73c2016cf | |||
| db7e8241ac | |||
| b7747b07db | |||
| 02ada0e496 | |||
| 7c819539c8 | |||
| e670c89163 | |||
| 9ecdf057db | |||
| b6448c840f | |||
| 0ba90df1f1 | |||
| 12dcbd0871 | |||
| b0be4ca8bd | |||
| 412eb5deaa | |||
| f030461bc7 | |||
| 8f5e7978ab | |||
| 2e55da2b2d | |||
| 16a8f88ae5 | |||
| 22d7ef6763 | |||
| 457e800c73 | |||
| 8393e50aa8 | |||
| b6497cdd6a | |||
| 218ef80f96 | |||
| a90d41480a |
+231
@@ -1,3 +1,234 @@
|
|||||||
|
## [22.9.0] - 04/01/2023
|
||||||
|
|
||||||
|
### Bots
|
||||||
|
|
||||||
|
* Remove Bot Groups Functionality ([#3165](https://github.com/EQEmu/Server/pull/3165)) @Aeadoin 2023-04-01
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* Cleanup excessive type casting: string -> char * -> string ([#3169](https://github.com/EQEmu/Server/pull/3169)) @Aeadoin 2023-04-01
|
||||||
|
|
||||||
|
### Crash
|
||||||
|
|
||||||
|
* Add Checks for valid pointers or fix existing. ([#3164](https://github.com/EQEmu/Server/pull/3164)) @Aeadoin 2023-04-01
|
||||||
|
* Fix out of bound arrays, other potential crashes ([#3166](https://github.com/EQEmu/Server/pull/3166)) @Aeadoin 2023-04-01
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Correct SE_SlayUndead & SE_HeadShotLevel limit Value when applied. ([#3171](https://github.com/EQEmu/Server/pull/3171)) @Aeadoin 2023-04-01
|
||||||
|
* Prevent VerifyGroup from setting OOZ membername to Null character. ([#3168](https://github.com/EQEmu/Server/pull/3168)) @Aeadoin 2023-04-01
|
||||||
|
|
||||||
|
### Quest API
|
||||||
|
|
||||||
|
* Add missing Luabind definitions to lua_general.cpp ([#3167](https://github.com/EQEmu/Server/pull/3167)) @Kinglykrab 2023-04-01
|
||||||
|
|
||||||
|
## [22.8.2] - 03/30/2023
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* "equipped" not "equiped", "dual" not "duel". ([#3149](https://github.com/EQEmu/Server/pull/3149)) @Kinglykrab 2023-03-27
|
||||||
|
|
||||||
|
### Crash
|
||||||
|
|
||||||
|
* Add Checks for out of bounds & dereferencing nullptrs ([#3151](https://github.com/EQEmu/Server/pull/3151)) @Aeadoin 2023-03-28
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Check Rule "Bots Enabled" to prevent bot database calls on connect ([#3154](https://github.com/EQEmu/Server/pull/3154)) @Aeadoin 2023-03-29
|
||||||
|
* Correct logic checks for Bot rule AllowOwnerOptionAltCombat ([#3158](https://github.com/EQEmu/Server/pull/3158)) @Aeadoin 2023-03-30
|
||||||
|
* Fix an issue with EVENT_DISCONNECT not firing on regular /camp ([#3153](https://github.com/EQEmu/Server/pull/3153)) @Kinglykrab 2023-03-28
|
||||||
|
* Fix bot_raid_members.sql for MYSQL. ([#3155](https://github.com/EQEmu/Server/pull/3155)) @Aeadoin 2023-03-28
|
||||||
|
* Fix for OOZ Group updates when removing/inviting Bots ([#3159](https://github.com/EQEmu/Server/pull/3159)) @Aeadoin 2023-03-30
|
||||||
|
* Fix issues with Lua tables not starting at index 1 ([#3160](https://github.com/EQEmu/Server/pull/3160)) @Kinglykrab 2023-03-30
|
||||||
|
* Fix strcpy-param-overlap ([#3157](https://github.com/EQEmu/Server/pull/3157)) @Aeadoin 2023-03-29
|
||||||
|
|
||||||
|
### Rules
|
||||||
|
|
||||||
|
* Remove Guild Bank Zone ID Rule ([#3156](https://github.com/EQEmu/Server/pull/3156)) @Kinglykrab 2023-03-29
|
||||||
|
|
||||||
|
## [22.8.1] - 03/27/2023
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix for NPCs having spells interrupted. ([#3150](https://github.com/EQEmu/Server/pull/3150)) @Aeadoin 2023-03-27
|
||||||
|
|
||||||
|
## [22.8.0] - 03/25/2023
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* Cleanup Strings::ToInt uses. ([#3142](https://github.com/EQEmu/Server/pull/3142)) @Aeadoin 2023-03-26
|
||||||
|
* Remove extern bool Critical ([#3146](https://github.com/EQEmu/Server/pull/3146)) @Kinglykrab 2023-03-25
|
||||||
|
|
||||||
|
### Crash
|
||||||
|
|
||||||
|
* Fix for crash in Raid::QueuePacket ([#3145](https://github.com/EQEmu/Server/pull/3145)) @Aeadoin 2023-03-25
|
||||||
|
|
||||||
|
### Feature
|
||||||
|
|
||||||
|
* Add support for -1 extradmgskill to allow all skills to be scaled. ([#3136](https://github.com/EQEmu/Server/pull/3136)) @Kinglykrab 2023-03-26
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Fix for Items looted from corpses. ([#3147](https://github.com/EQEmu/Server/pull/3147)) @Aeadoin 2023-03-26
|
||||||
|
* Fix for SQL Query in npc_scale_global_base ([#3144](https://github.com/EQEmu/Server/pull/3144)) @Aeadoin 2023-03-26
|
||||||
|
|
||||||
|
## [22.7.0] - 03/24/2023
|
||||||
|
|
||||||
|
### Bots
|
||||||
|
|
||||||
|
* Place BOT_COMMAND_CHAR inside messages ([#3027](https://github.com/EQEmu/Server/pull/3027)) @trentdm 2023-03-05
|
||||||
|
* Prevent interrupt spam when OOM ([#3011](https://github.com/EQEmu/Server/pull/3011)) @nytmyr 2023-03-07
|
||||||
|
|
||||||
|
### Code
|
||||||
|
|
||||||
|
* Cleaning up Raid.cpp ([#3125](https://github.com/EQEmu/Server/pull/3125)) @Aeadoin 2023-03-20
|
||||||
|
* Cleanup unused methods and variables in world/main.cpp and world/main.h ([#3105](https://github.com/EQEmu/Server/pull/3105)) @Kinglykrab 2023-03-17
|
||||||
|
* Cleanup uses of Strings::ToInt to match correct type. ([#3054](https://github.com/EQEmu/Server/pull/3054)) @Aeadoin 2023-03-22
|
||||||
|
* Delete deprecated/perlxs folder ([#3110](https://github.com/EQEmu/Server/pull/3110)) @Kinglykrab 2023-03-17
|
||||||
|
* Delete queues.h ([#3089](https://github.com/EQEmu/Server/pull/3089)) @Kinglykrab 2023-03-17
|
||||||
|
* Delete world/console.old.cpp ([#3099](https://github.com/EQEmu/Server/pull/3099)) @Kinglykrab 2023-03-17
|
||||||
|
* Delete zone_numbers.h ([#3129](https://github.com/EQEmu/Server/pull/3129)) @Kinglykrab 2023-03-20
|
||||||
|
* Remove AllConnected(), CanUpdate(), and SendInfo() from login_server_list.cpp and login_server_list.h ([#3104](https://github.com/EQEmu/Server/pull/3104)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove CLIENT_TIMEOUT from world/client.h and zone/client.h ([#3071](https://github.com/EQEmu/Server/pull/3071)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove ChangeHP() from mob.h ([#3128](https://github.com/EQEmu/Server/pull/3128)) @Kinglykrab 2023-03-19
|
||||||
|
* Remove CheckAuth(), SetOnline(), and pMD5Pass from cliententry.h ([#3095](https://github.com/EQEmu/Server/pull/3095)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove CommandRequirement() from zonedb.h ([#3094](https://github.com/EQEmu/Server/pull/3094)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove CountZones() from launcher_link.h ([#3100](https://github.com/EQEmu/Server/pull/3100)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove DBInitVars() and HandleMysqlError() from queryserv/database.h ([#3114](https://github.com/EQEmu/Server/pull/3114)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove DBInitVars(), HandleMysqlError(), and IsChatChannelInDB() in ucs/database.h ([#3113](https://github.com/EQEmu/Server/pull/3113)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove DisableStats(), EnableStats(), DisableLoginserver(), and EnableLoginserver() from world_config.h ([#3107](https://github.com/EQEmu/Server/pull/3107)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove DoBuffWearOffEffect() from mob.h ([#3062](https://github.com/EQEmu/Server/pull/3062)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove FindByName(charname) from clientlist.h ([#3096](https://github.com/EQEmu/Server/pull/3096)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove FindCLEByLSID(), GetCLE(), GetCLEIPCount(), and RemoveCLEByLSID() from clientlist.h ([#3098](https://github.com/EQEmu/Server/pull/3098)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove FindPatch() from struct_category.cpp and struct_category.h ([#3130](https://github.com/EQEmu/Server/pull/3130)) @Kinglykrab 2023-03-20
|
||||||
|
* Remove FlushLootStats() from npc.h ([#3079](https://github.com/EQEmu/Server/pull/3079)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove GetAILevel() from npc.h ([#3080](https://github.com/EQEmu/Server/pull/3080)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove GetDestination() from doors.h ([#3078](https://github.com/EQEmu/Server/pull/3078)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove GetServerByAddress() from server_manager.h ([#3119](https://github.com/EQEmu/Server/pull/3119)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove GetStartCount() and InitStartTimer() from zone_launch.cpp and zone_launch.h ([#3121](https://github.com/EQEmu/Server/pull/3121)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove GetTransformation() and GetInvertedTransformation() from oriented_bounding_box.h ([#3084](https://github.com/EQEmu/Server/pull/3084)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove IsAffectedByBuff() ([#3068](https://github.com/EQEmu/Server/pull/3068)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove IsConnected() from loginserver/database.h ([#3117](https://github.com/EQEmu/Server/pull/3117)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove IsOrigin(glm::vec2) from position.h ([#3088](https://github.com/EQEmu/Server/pull/3088)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove MakeGuildMembers() from wguild_mgr.h ([#3106](https://github.com/EQEmu/Server/pull/3106)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove PlayerLogin_Struct from login_types.h ([#3118](https://github.com/EQEmu/Server/pull/3118)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove RemoveSpawnGroup() from spawngroup.h ([#3090](https://github.com/EQEmu/Server/pull/3090)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove SendGuildPacket() from clientlist.cpp, clientlist.h, and wguild_mgr.cpp ([#3097](https://github.com/EQEmu/Server/pull/3097)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove SetConnection() from loginserver/world_server.h ([#3120](https://github.com/EQEmu/Server/pull/3120)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove SetDBID() from object.h ([#3082](https://github.com/EQEmu/Server/pull/3082)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove SetSentTime2 in petitions.h ([#3086](https://github.com/EQEmu/Server/pull/3086)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove StoreCharacter() from worlddb.h ([#3108](https://github.com/EQEmu/Server/pull/3108)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove UpdateLoginserverWorldAdminAccountPasswordById() from account_management.cpp ([#3115](https://github.com/EQEmu/Server/pull/3115)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove _baseBotStance from bot.h ([#3076](https://github.com/EQEmu/Server/pull/3076)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove _botRole from bot.h ([#3075](https://github.com/EQEmu/Server/pull/3075)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove _previousTarget from bot.h ([#3074](https://github.com/EQEmu/Server/pull/3074)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove authenticated from launcher_link.cpp and launcher_link.h ([#3101](https://github.com/EQEmu/Server/pull/3101)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove can_corpse_be_rezzed from corpse.h ([#3077](https://github.com/EQEmu/Server/pull/3077)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove casting_spell_type from mob.h ([#3064](https://github.com/EQEmu/Server/pull/3064)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove class EQStream from client.h ([#3070](https://github.com/EQEmu/Server/pull/3070)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove current_buff_count ([#3067](https://github.com/EQEmu/Server/pull/3067)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove firstlogin and realfirstlogin from world/client.h ([#3072](https://github.com/EQEmu/Server/pull/3072)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove fixedZ from mob.h ([#3065](https://github.com/EQEmu/Server/pull/3065)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove inWater from mob.h ([#3069](https://github.com/EQEmu/Server/pull/3069)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove is_authenticatd, LSShutDownUpdate(), and SetInstanceID() from zoneserver.h ([#3109](https://github.com/EQEmu/Server/pull/3109)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove last_insert_id from petitions.h ([#3087](https://github.com/EQEmu/Server/pull/3087)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove last_max_hp from mob.h ([#3063](https://github.com/EQEmu/Server/pull/3063)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove m_inuse, m_z, and m_heading from object.h ([#3083](https://github.com/EQEmu/Server/pull/3083)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove npc_ai.cpp/npc_ai.cpp ([#3081](https://github.com/EQEmu/Server/pull/3081)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove ownHiddenTrigger from trap.cpp and trap.h ([#3092](https://github.com/EQEmu/Server/pull/3092)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove perlparser.h ([#3085](https://github.com/EQEmu/Server/pull/3085)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove unused AbilityTimer variable in client.h ([#3035](https://github.com/EQEmu/Server/pull/3035)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused BotAA struct in bot_structs.h ([#3038](https://github.com/EQEmu/Server/pull/3038)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused HandleUpdateTasksOnKill in client.h ([#3032](https://github.com/EQEmu/Server/pull/3032)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused SaveBackup in client.h ([#3030](https://github.com/EQEmu/Server/pull/3030)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused ^evacuate and ^succor subcommands from bot_command.h ([#3039](https://github.com/EQEmu/Server/pull/3039)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused bot structs in bot_structs.h ([#3037](https://github.com/EQEmu/Server/pull/3037)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused client queued work variable in client.cpp/client.h ([#3034](https://github.com/EQEmu/Server/pull/3034)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused command variables in client.cpp ([#3031](https://github.com/EQEmu/Server/pull/3031)) @Kinglykrab 2023-03-05
|
||||||
|
* Remove unused lua_hate_entry.cpp ([#3057](https://github.com/EQEmu/Server/pull/3057)) @Kinglykrab 2023-03-12
|
||||||
|
* Remove unused methods in eql_config.cpp, eql_config.h, launcher_list.cpp, and launcher_list.h ([#3103](https://github.com/EQEmu/Server/pull/3103)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove unused methods in loginserver/client.h ([#3116](https://github.com/EQEmu/Server/pull/3116)) @Kinglykrab 2023-03-17
|
||||||
|
* Remove unused player update variables in client.cpp/client.h ([#3033](https://github.com/EQEmu/Server/pull/3033)) @Kinglykrab 2023-03-05
|
||||||
|
* Utilize GetPlayerState() in mob methods ([#3066](https://github.com/EQEmu/Server/pull/3066)) @Kinglykrab 2023-03-17
|
||||||
|
* Utilize GetScheduler() in zone/worldserver.cpp ([#3093](https://github.com/EQEmu/Server/pull/3093)) @Kinglykrab 2023-03-17
|
||||||
|
* Utilize SetFilter in client.cpp ([#3036](https://github.com/EQEmu/Server/pull/3036)) @Kinglykrab 2023-03-05
|
||||||
|
* Utilize SetHiddenTrigger in trap.cpp ([#3091](https://github.com/EQEmu/Server/pull/3091)) @Kinglykrab 2023-03-17
|
||||||
|
* remove _botOrderAttack from bot.h ([#3073](https://github.com/EQEmu/Server/pull/3073)) @Kinglykrab 2023-03-17
|
||||||
|
|
||||||
|
### Commands
|
||||||
|
|
||||||
|
* Cleanup #haste Command ([#3042](https://github.com/EQEmu/Server/pull/3042)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #hideme Command ([#3043](https://github.com/EQEmu/Server/pull/3043)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #interrupt Command ([#3044](https://github.com/EQEmu/Server/pull/3044)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #level Command ([#3045](https://github.com/EQEmu/Server/pull/3045)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #picklock Command ([#3046](https://github.com/EQEmu/Server/pull/3046)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #resetaa and #resetaa_timer ([#3047](https://github.com/EQEmu/Server/pull/3047)) @Kinglykrab 2023-03-06
|
||||||
|
* Cleanup #wc Command ([#3049](https://github.com/EQEmu/Server/pull/3049)) @Kinglykrab 2023-03-06
|
||||||
|
* Remove #equipitem Command ([#3040](https://github.com/EQEmu/Server/pull/3040)) @Kinglykrab 2023-03-06
|
||||||
|
|
||||||
|
### Console
|
||||||
|
|
||||||
|
* Add IS_TTY to force terminal coloring output ([#3021](https://github.com/EQEmu/Server/pull/3021)) @Akkadius 2023-03-04
|
||||||
|
|
||||||
|
### Crash
|
||||||
|
|
||||||
|
* Fix dangling Group member pointers for Bots. ([#3134](https://github.com/EQEmu/Server/pull/3134)) @Aeadoin 2023-03-21
|
||||||
|
* Fixes Crash when Zoning with XTarget when Bots are in group. ([#3126](https://github.com/EQEmu/Server/pull/3126)) @Aeadoin 2023-03-19
|
||||||
|
|
||||||
|
### Feature
|
||||||
|
|
||||||
|
* Add Basic Bot Raiding Functionality ([#2782](https://github.com/EQEmu/Server/pull/2782)) @neckkola 2023-03-17
|
||||||
|
* Add Data Bucket support for scaling of Heroic Stats. ([#3058](https://github.com/EQEmu/Server/pull/3058)) @Aeadoin 2023-03-24
|
||||||
|
* Add Item Extra Skill Damage Percent Modifier ([#3127](https://github.com/EQEmu/Server/pull/3127)) @Kinglykrab 2023-03-19
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
* Add Avoidance and HP Regen Per Second too NPC Scaling. ([#3050](https://github.com/EQEmu/Server/pull/3050)) @Aeadoin 2023-03-09
|
||||||
|
* Add Heroic Strikethrough & HP Regen Per Second to GM Entity Info ([#3055](https://github.com/EQEmu/Server/pull/3055)) @Aeadoin 2023-03-12
|
||||||
|
* Add Heroic Strikethrough to NPC Scaling ([#3028](https://github.com/EQEmu/Server/pull/3028)) @Kinglykrab 2023-03-06
|
||||||
|
* Change SPA 193 Weapon Damage to allow values over 65,535 ([#3138](https://github.com/EQEmu/Server/pull/3138)) @Aeadoin 2023-03-23
|
||||||
|
* Checkmarks and X characters in popup messages ([#3041](https://github.com/EQEmu/Server/pull/3041)) @Kinglykrab 2023-03-06
|
||||||
|
* Cursor Coin Upon Death ([#3020](https://github.com/EQEmu/Server/pull/3020)) @cybernine186 2023-03-04
|
||||||
|
* Ensure synchronization of pet taunt state with UI ([#3025](https://github.com/EQEmu/Server/pull/3025)) @catapultam-habeo 2023-03-04
|
||||||
|
* Fix Bard Bot Casting ([#3122](https://github.com/EQEmu/Server/pull/3122)) @Aeadoin 2023-03-17
|
||||||
|
* Fix Discovered Items with Alternate Currency and LDoN Adventure Merchants ([#3026](https://github.com/EQEmu/Server/pull/3026)) @Kinglykrab 2023-03-04
|
||||||
|
* Fix Heal Scale and Spell Scale in NPC Scaling ([#3051](https://github.com/EQEmu/Server/pull/3051)) @Kinglykrab 2023-03-10
|
||||||
|
* Fix Raid Invites causing client desync issues ([#3053](https://github.com/EQEmu/Server/pull/3053)) @Aeadoin 2023-03-11
|
||||||
|
* Fix Raid methods that could cause crashes with Bots in raid ([#3111](https://github.com/EQEmu/Server/pull/3111)) @Aeadoin 2023-03-17
|
||||||
|
* Fix edge cases where camped bots would be left in a raid ([#3139](https://github.com/EQEmu/Server/pull/3139)) @Aeadoin 2023-03-23
|
||||||
|
* Fix for Raid Disband if leader not in same zone. ([#3135](https://github.com/EQEmu/Server/pull/3135)) @Aeadoin 2023-03-21
|
||||||
|
* Fix for incorrect bindpoint x,y,z,headings ([#3141](https://github.com/EQEmu/Server/pull/3141)) @Aeadoin 2023-03-23
|
||||||
|
* Fix for transferring Raid Leader ([#3140](https://github.com/EQEmu/Server/pull/3140)) @Aeadoin 2023-03-23
|
||||||
|
* Fix issue with overflow on min/max hit dmg in npc scaling calculations ([#3052](https://github.com/EQEmu/Server/pull/3052)) @Aeadoin 2023-03-10
|
||||||
|
* Fix typo for bot_id raid_members column in db_update_manifest.txt ([#3132](https://github.com/EQEmu/Server/pull/3132)) @Kinglykrab 2023-03-20
|
||||||
|
* Fixes for corpses not properly saving some item instance data correctly. ([#3123](https://github.com/EQEmu/Server/pull/3123)) @KimLS 2023-03-23
|
||||||
|
|
||||||
|
### Illusions
|
||||||
|
|
||||||
|
* Fix bug where spells like Ignite Bones left NPC size incorrect. ([#3061](https://github.com/EQEmu/Server/pull/3061)) @noudess 2023-03-16
|
||||||
|
|
||||||
|
### Quest API
|
||||||
|
|
||||||
|
* Add SendIllusion overloads/parameters to Perl/Lua ([#3059](https://github.com/EQEmu/Server/pull/3059)) @Kinglykrab 2023-03-16
|
||||||
|
* Add Spell GetActX methods to Perl/Lua ([#3056](https://github.com/EQEmu/Server/pull/3056)) @Kinglykrab 2023-03-12
|
||||||
|
* Add Timer related methods to Mobs in Perl/Lua ([#3133](https://github.com/EQEmu/Server/pull/3133)) @Kinglykrab 2023-03-20
|
||||||
|
|
||||||
|
### Rules
|
||||||
|
|
||||||
|
* Add Multiplier for Heroic Stats. ([#3014](https://github.com/EQEmu/Server/pull/3014)) @Aeadoin 2023-03-04
|
||||||
|
* Add ResurrectionEffectsBlock ([#2990](https://github.com/EQEmu/Server/pull/2990)) @nytmyr 2023-03-04
|
||||||
|
* Add Rule to allow ExtraDmgSkill/SPA 220 to effect Spell Skills ([#3124](https://github.com/EQEmu/Server/pull/3124)) @Aeadoin 2023-03-19
|
||||||
|
* Add Task System Rule ExpRewardsIgnoreLevelBasedEXPMods ([#3112](https://github.com/EQEmu/Server/pull/3112)) @Aeadoin 2023-03-17
|
||||||
|
|
||||||
|
### Scaling
|
||||||
|
|
||||||
|
* Add support for pipe-separated zone IDs and versions ([#3015](https://github.com/EQEmu/Server/pull/3015)) @Kinglykrab 2023-03-04
|
||||||
|
|
||||||
|
### Strings
|
||||||
|
|
||||||
|
* Add exception handling to converters themselves ([#3029](https://github.com/EQEmu/Server/pull/3029)) @Akkadius 2023-03-05
|
||||||
|
* Add more number formatters ([#2873](https://github.com/EQEmu/Server/pull/2873)) @Kinglykrab 2023-03-04
|
||||||
|
|
||||||
## [22.4.5] - 03/03/2023
|
## [22.4.5] - 03/03/2023
|
||||||
|
|
||||||
### Bots
|
### Bots
|
||||||
|
|||||||
@@ -608,7 +608,6 @@ SET(common_headers
|
|||||||
unix.h
|
unix.h
|
||||||
useperl.h
|
useperl.h
|
||||||
version.h
|
version.h
|
||||||
zone_numbers.h
|
|
||||||
zone_store.h
|
zone_store.h
|
||||||
event/event_loop.h
|
event/event_loop.h
|
||||||
event/task.h
|
event/task.h
|
||||||
|
|||||||
+41
-41
@@ -387,7 +387,7 @@ bool Database::DeleteCharacter(char *character_name)
|
|||||||
std::string query = StringFormat("SELECT `id` from `character_data` WHERE `name` = '%s'", character_name);
|
std::string query = StringFormat("SELECT `id` from `character_data` WHERE `name` = '%s'", character_name);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
character_id = Strings::ToInt(row[0]);
|
character_id = Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (character_id <= 0) {
|
if (character_id <= 0) {
|
||||||
@@ -787,7 +787,7 @@ uint32 Database::GetCharacterID(const char *name) {
|
|||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
if (results.RowCount() == 1)
|
if (results.RowCount() == 1)
|
||||||
{
|
{
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -812,10 +812,10 @@ uint32 Database::GetAccountIDByChar(const char* charname, uint32* oCharID) {
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
uint32 accountId = Strings::ToInt(row[0]);
|
uint32 accountId = Strings::ToUnsignedInt(row[0]);
|
||||||
|
|
||||||
if (oCharID)
|
if (oCharID)
|
||||||
*oCharID = Strings::ToInt(row[1]);
|
*oCharID = Strings::ToUnsignedInt(row[1]);
|
||||||
|
|
||||||
return accountId;
|
return accountId;
|
||||||
}
|
}
|
||||||
@@ -832,7 +832,7 @@ uint32 Database::GetAccountIDByChar(uint32 char_id) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Database::GetAccountIDByName(std::string account_name, std::string loginserver, int16* status, uint32* lsid) {
|
uint32 Database::GetAccountIDByName(std::string account_name, std::string loginserver, int16* status, uint32* lsid) {
|
||||||
@@ -880,7 +880,7 @@ void Database::GetAccountName(uint32 accountid, char* name, uint32* oLSAccountID
|
|||||||
|
|
||||||
strcpy(name, row[0]);
|
strcpy(name, row[0]);
|
||||||
if (row[1] && oLSAccountID) {
|
if (row[1] && oLSAccountID) {
|
||||||
*oLSAccountID = Strings::ToInt(row[1]);
|
*oLSAccountID = Strings::ToUnsignedInt(row[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -968,7 +968,7 @@ bool Database::LoadVariables() {
|
|||||||
|
|
||||||
std::string key, value;
|
std::string key, value;
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
varcache.last_update = Strings::ToInt(row[2]); // ahh should we be comparing if this is newer?
|
varcache.last_update = Strings::ToUnsignedInt(row[2]); // ahh should we be comparing if this is newer?
|
||||||
key = row[0];
|
key = row[0];
|
||||||
value = row[1];
|
value = row[1];
|
||||||
std::transform(std::begin(key), std::end(key), std::begin(key), ::tolower); // keys are lower case, DB doesn't have to be
|
std::transform(std::begin(key), std::end(key), std::begin(key), ::tolower); // keys are lower case, DB doesn't have to be
|
||||||
@@ -1052,7 +1052,7 @@ bool Database::GetZoneGraveyard(const uint32 graveyard_id, uint32* graveyard_zon
|
|||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
if(graveyard_zoneid != nullptr)
|
if(graveyard_zoneid != nullptr)
|
||||||
*graveyard_zoneid = Strings::ToInt(row[0]);
|
*graveyard_zoneid = Strings::ToUnsignedInt(row[0]);
|
||||||
if(graveyard_x != nullptr)
|
if(graveyard_x != nullptr)
|
||||||
*graveyard_x = Strings::ToFloat(row[1]);
|
*graveyard_x = Strings::ToFloat(row[1]);
|
||||||
if(graveyard_y != nullptr)
|
if(graveyard_y != nullptr)
|
||||||
@@ -1168,7 +1168,7 @@ uint32 Database::GetAccountIDFromLSID(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
account_id = Strings::ToInt(row[0]);
|
account_id = Strings::ToUnsignedInt(row[0]);
|
||||||
|
|
||||||
if (in_account_name) {
|
if (in_account_name) {
|
||||||
strcpy(in_account_name, row[1]);
|
strcpy(in_account_name, row[1]);
|
||||||
@@ -1244,7 +1244,7 @@ uint8 Database::GetServerType() {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Database::MoveCharacterToZone(uint32 character_id, uint32 zone_id)
|
bool Database::MoveCharacterToZone(uint32 character_id, uint32 zone_id)
|
||||||
@@ -1296,7 +1296,7 @@ uint8 Database::GetRaceSkill(uint8 skillid, uint8 in_race)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8 Database::GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level)
|
uint8 Database::GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16 in_level)
|
||||||
@@ -1312,12 +1312,12 @@ uint8 Database::GetSkillCap(uint8 skillid, uint8 in_race, uint8 in_class, uint16
|
|||||||
if (results.Success() && results.RowsAffected() != 0)
|
if (results.Success() && results.RowsAffected() != 0)
|
||||||
{
|
{
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
skill_level = Strings::ToInt(row[0]);
|
skill_level = Strings::ToUnsignedInt(row[0]);
|
||||||
skill_formula = Strings::ToInt(row[1]);
|
skill_formula = Strings::ToUnsignedInt(row[1]);
|
||||||
skill_cap = Strings::ToInt(row[2]);
|
skill_cap = Strings::ToUnsignedInt(row[2]);
|
||||||
if (Strings::ToInt(row[3]) > skill_cap)
|
if (Strings::ToUnsignedInt(row[3]) > skill_cap)
|
||||||
skill_cap2 = (Strings::ToInt(row[3])-skill_cap)/10; //Split the post-50 skill cap into difference between pre-50 cap and post-50 cap / 10 to determine amount of points per level.
|
skill_cap2 = (Strings::ToUnsignedInt(row[3])-skill_cap)/10; //Split the post-50 skill cap into difference between pre-50 cap and post-50 cap / 10 to determine amount of points per level.
|
||||||
skill_cap3 = Strings::ToInt(row[4]);
|
skill_cap3 = Strings::ToUnsignedInt(row[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
int race_skill = GetRaceSkill(skillid,in_race);
|
int race_skill = GetRaceSkill(skillid,in_race);
|
||||||
@@ -1488,7 +1488,7 @@ uint32 Database::GetGroupID(const char* name){
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Database::GetGroupLeaderForLogin(std::string character_name) {
|
std::string Database::GetGroupLeaderForLogin(std::string character_name) {
|
||||||
@@ -1638,7 +1638,7 @@ uint8 Database::GetAgreementFlag(uint32 acctid) {
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Database::SetAgreementFlag(uint32 acctid) {
|
void Database::SetAgreementFlag(uint32 acctid) {
|
||||||
@@ -1724,7 +1724,7 @@ uint32 Database::GetRaidID(const char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (row[0]) // would it ever be possible to have a null here?
|
if (row[0]) // would it ever be possible to have a null here?
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1980,16 +1980,16 @@ bool Database::GetAdventureStats(uint32 char_id, AdventureStats_Struct *as)
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
as->success.guk = Strings::ToInt(row[0]);
|
as->success.guk = Strings::ToUnsignedInt(row[0]);
|
||||||
as->success.mir = Strings::ToInt(row[1]);
|
as->success.mir = Strings::ToUnsignedInt(row[1]);
|
||||||
as->success.mmc = Strings::ToInt(row[2]);
|
as->success.mmc = Strings::ToUnsignedInt(row[2]);
|
||||||
as->success.ruj = Strings::ToInt(row[3]);
|
as->success.ruj = Strings::ToUnsignedInt(row[3]);
|
||||||
as->success.tak = Strings::ToInt(row[4]);
|
as->success.tak = Strings::ToUnsignedInt(row[4]);
|
||||||
as->failure.guk = Strings::ToInt(row[5]);
|
as->failure.guk = Strings::ToUnsignedInt(row[5]);
|
||||||
as->failure.mir = Strings::ToInt(row[6]);
|
as->failure.mir = Strings::ToUnsignedInt(row[6]);
|
||||||
as->failure.mmc = Strings::ToInt(row[7]);
|
as->failure.mmc = Strings::ToUnsignedInt(row[7]);
|
||||||
as->failure.ruj = Strings::ToInt(row[8]);
|
as->failure.ruj = Strings::ToUnsignedInt(row[8]);
|
||||||
as->failure.tak = Strings::ToInt(row[9]);
|
as->failure.tak = Strings::ToUnsignedInt(row[9]);
|
||||||
as->failure.total = as->failure.guk + as->failure.mir + as->failure.mmc + as->failure.ruj + as->failure.tak;
|
as->failure.total = as->failure.guk + as->failure.mir + as->failure.mmc + as->failure.ruj + as->failure.tak;
|
||||||
as->success.total = as->success.guk + as->success.mir + as->success.mmc + as->success.ruj + as->success.tak;
|
as->success.total = as->success.guk + as->success.mir + as->success.mmc + as->success.ruj + as->success.tak;
|
||||||
|
|
||||||
@@ -2008,7 +2008,7 @@ uint32 Database::GetGuildIDByCharID(uint32 character_id)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Database::GetGroupIDByCharID(uint32 character_id)
|
uint32 Database::GetGroupIDByCharID(uint32 character_id)
|
||||||
@@ -2030,7 +2030,7 @@ uint32 Database::GetGroupIDByCharID(uint32 character_id)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 Database::GetRaidIDByCharID(uint32 character_id) {
|
uint32 Database::GetRaidIDByCharID(uint32 character_id) {
|
||||||
@@ -2044,7 +2044,7 @@ uint32 Database::GetRaidIDByCharID(uint32 character_id) {
|
|||||||
);
|
);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2089,17 +2089,17 @@ struct TimeOfDay_Struct Database::LoadTime(time_t &realtime)
|
|||||||
eqTime.day = 1;
|
eqTime.day = 1;
|
||||||
eqTime.month = 1;
|
eqTime.month = 1;
|
||||||
eqTime.year = 3100;
|
eqTime.year = 3100;
|
||||||
realtime = time(0);
|
realtime = time(nullptr);
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
eqTime.minute = Strings::ToInt(row[0]);
|
eqTime.minute = Strings::ToUnsignedInt(row[0]);
|
||||||
eqTime.hour = Strings::ToInt(row[1]);
|
eqTime.hour = Strings::ToUnsignedInt(row[1]);
|
||||||
eqTime.day = Strings::ToInt(row[2]);
|
eqTime.day = Strings::ToUnsignedInt(row[2]);
|
||||||
eqTime.month = Strings::ToInt(row[3]);
|
eqTime.month = Strings::ToUnsignedInt(row[3]);
|
||||||
eqTime.year = Strings::ToInt(row[4]);
|
eqTime.year = Strings::ToUnsignedInt(row[4]);
|
||||||
realtime = Strings::ToInt(row[5]);
|
realtime = Strings::ToBigInt(row[5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return eqTime;
|
return eqTime;
|
||||||
@@ -2345,7 +2345,7 @@ void Database::SourceDatabaseTableFromUrl(std::string table_name, std::string ur
|
|||||||
|
|
||||||
int sourced_queries = 0;
|
int sourced_queries = 0;
|
||||||
|
|
||||||
if (auto res = cli.Get(request_uri.get_path().c_str())) {
|
if (auto res = cli.Get(request_uri.get_path())) {
|
||||||
if (res->status == 200) {
|
if (res->status == 200) {
|
||||||
for (auto &s: Strings::Split(res->body, ';')) {
|
for (auto &s: Strings::Split(res->body, ';')) {
|
||||||
if (!Strings::Trim(s).empty()) {
|
if (!Strings::Trim(s).empty()) {
|
||||||
|
|||||||
@@ -499,7 +499,7 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
ExtendedProfile_Struct* e_pp;
|
ExtendedProfile_Struct* e_pp;
|
||||||
uint32 pplen = 0;
|
uint32 pplen = 0;
|
||||||
uint32 i;
|
uint32 i;
|
||||||
int character_id = 0;
|
uint32 character_id = 0;
|
||||||
int account_id = 0;
|
int account_id = 0;
|
||||||
int number_of_characters = 0;
|
int number_of_characters = 0;
|
||||||
int printppdebug = 0; /* Prints Player Profile */
|
int printppdebug = 0; /* Prints Player Profile */
|
||||||
@@ -929,19 +929,19 @@ bool Database::CheckDatabaseConvertPPDeblob(){
|
|||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
char_iter_count++;
|
char_iter_count++;
|
||||||
squery = StringFormat("SELECT `id`, `profile`, `name`, `level`, `account_id`, `firstlogon`, `lfg`, `lfp`, `mailkey`, `xtargets`, `inspectmessage`, `extprofile` FROM `character_` WHERE `id` = %i", Strings::ToInt(row[0]));
|
squery = StringFormat("SELECT `id`, `profile`, `name`, `level`, `account_id`, `firstlogon`, `lfg`, `lfp`, `mailkey`, `xtargets`, `inspectmessage`, `extprofile` FROM `character_` WHERE `id` = %i", Strings::ToUnsignedInt(row[0]));
|
||||||
auto results2 = QueryDatabase(squery);
|
auto results2 = QueryDatabase(squery);
|
||||||
auto row2 = results2.begin();
|
auto row2 = results2.begin();
|
||||||
pp = (Convert::PlayerProfile_Struct*)row2[1];
|
pp = (Convert::PlayerProfile_Struct*)row2[1];
|
||||||
e_pp = (ExtendedProfile_Struct*)row2[11];
|
e_pp = (ExtendedProfile_Struct*)row2[11];
|
||||||
character_id = Strings::ToInt(row[0]);
|
character_id = Strings::ToUnsignedInt(row[0]);
|
||||||
account_id = Strings::ToInt(row2[4]);
|
account_id = Strings::ToInt(row2[4]);
|
||||||
/* Convert some data from the character_ table that is still relevant */
|
/* Convert some data from the character_ table that is still relevant */
|
||||||
firstlogon = Strings::ToInt(row2[5]);
|
firstlogon = Strings::ToUnsignedInt(row2[5]);
|
||||||
lfg = Strings::ToInt(row2[6]);
|
lfg = Strings::ToUnsignedInt(row2[6]);
|
||||||
lfp = Strings::ToInt(row2[7]);
|
lfp = Strings::ToUnsignedInt(row2[7]);
|
||||||
mailkey = row2[8];
|
mailkey = row2[8];
|
||||||
xtargets = Strings::ToInt(row2[9]);
|
xtargets = Strings::ToUnsignedInt(row2[9]);
|
||||||
inspectmessage = row2[10];
|
inspectmessage = row2[10];
|
||||||
|
|
||||||
/* Verify PP Integrity */
|
/* Verify PP Integrity */
|
||||||
@@ -1567,7 +1567,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
rquery = StringFormat("SELECT DISTINCT charid FROM character_corpses");
|
rquery = StringFormat("SELECT DISTINCT charid FROM character_corpses");
|
||||||
results = QueryDatabase(rquery);
|
results = QueryDatabase(rquery);
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
std::string squery = StringFormat("SELECT id, charname, data, time_of_death, is_rezzed FROM character_corpses WHERE `charid` = %i", Strings::ToInt(row[0]));
|
std::string squery = StringFormat("SELECT id, charname, data, time_of_death, is_rezzed FROM character_corpses WHERE `charid` = %i", Strings::ToUnsignedInt(row[0]));
|
||||||
auto results2 = QueryDatabase(squery);
|
auto results2 = QueryDatabase(squery);
|
||||||
for (auto row2 = results2.begin(); row2 != results2.end(); ++row2) {
|
for (auto row2 = results2.begin(); row2 != results2.end(); ++row2) {
|
||||||
in_datasize = results2.LengthOfColumn(2);
|
in_datasize = results2.LengthOfColumn(2);
|
||||||
@@ -1599,7 +1599,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
c_type = "NULL";
|
c_type = "NULL";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
std::cout << "Converting Corpse: [OK] [" << c_type << "]: " << "ID: " << Strings::ToInt(row2[0]) << std::endl;
|
std::cout << "Converting Corpse: [OK] [" << c_type << "]: " << "ID: " << Strings::ToUnsignedInt(row2[0]) << std::endl;
|
||||||
|
|
||||||
if (is_sof){
|
if (is_sof){
|
||||||
scquery = StringFormat("UPDATE `character_corpses` SET \n"
|
scquery = StringFormat("UPDATE `character_corpses` SET \n"
|
||||||
@@ -1670,7 +1670,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
dbpc->item_tint[6].color,
|
dbpc->item_tint[6].color,
|
||||||
dbpc->item_tint[7].color,
|
dbpc->item_tint[7].color,
|
||||||
dbpc->item_tint[8].color,
|
dbpc->item_tint[8].color,
|
||||||
Strings::ToInt(row2[0])
|
Strings::ToUnsignedInt(row2[0])
|
||||||
);
|
);
|
||||||
if (scquery != ""){ auto sc_results = QueryDatabase(scquery); }
|
if (scquery != ""){ auto sc_results = QueryDatabase(scquery); }
|
||||||
|
|
||||||
@@ -1682,7 +1682,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
scquery = StringFormat("REPLACE INTO `character_corpse_items` \n"
|
scquery = StringFormat("REPLACE INTO `character_corpse_items` \n"
|
||||||
" (corpse_id, equip_slot, item_id, charges, aug_1, aug_2, aug_3, aug_4, aug_5, aug_6, attuned) \n"
|
" (corpse_id, equip_slot, item_id, charges, aug_1, aug_2, aug_3, aug_4, aug_5, aug_6, attuned) \n"
|
||||||
" VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
" VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
||||||
Strings::ToInt(row2[0]),
|
Strings::ToUnsignedInt(row2[0]),
|
||||||
dbpc->items[i].equipSlot,
|
dbpc->items[i].equipSlot,
|
||||||
dbpc->items[i].item_id,
|
dbpc->items[i].item_id,
|
||||||
dbpc->items[i].charges,
|
dbpc->items[i].charges,
|
||||||
@@ -1698,7 +1698,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
scquery = scquery + StringFormat(", (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
scquery = scquery + StringFormat(", (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
||||||
Strings::ToInt(row2[0]),
|
Strings::ToUnsignedInt(row2[0]),
|
||||||
dbpc->items[i].equipSlot,
|
dbpc->items[i].equipSlot,
|
||||||
dbpc->items[i].item_id,
|
dbpc->items[i].item_id,
|
||||||
dbpc->items[i].charges,
|
dbpc->items[i].charges,
|
||||||
@@ -1778,7 +1778,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
dbpc_c->item_tint[6].color,
|
dbpc_c->item_tint[6].color,
|
||||||
dbpc_c->item_tint[7].color,
|
dbpc_c->item_tint[7].color,
|
||||||
dbpc_c->item_tint[8].color,
|
dbpc_c->item_tint[8].color,
|
||||||
Strings::ToInt(row2[0])
|
Strings::ToUnsignedInt(row2[0])
|
||||||
);
|
);
|
||||||
if (scquery != ""){ auto sc_results = QueryDatabase(scquery); }
|
if (scquery != ""){ auto sc_results = QueryDatabase(scquery); }
|
||||||
|
|
||||||
@@ -1791,7 +1791,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
scquery = StringFormat("REPLACE INTO `character_corpse_items` \n"
|
scquery = StringFormat("REPLACE INTO `character_corpse_items` \n"
|
||||||
" (corpse_id, equip_slot, item_id, charges, aug_1, aug_2, aug_3, aug_4, aug_5, aug_6, attuned) \n"
|
" (corpse_id, equip_slot, item_id, charges, aug_1, aug_2, aug_3, aug_4, aug_5, aug_6, attuned) \n"
|
||||||
" VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
" VALUES (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
||||||
Strings::ToInt(row2[0]),
|
Strings::ToUnsignedInt(row2[0]),
|
||||||
dbpc_c->items[i].equipSlot,
|
dbpc_c->items[i].equipSlot,
|
||||||
dbpc_c->items[i].item_id,
|
dbpc_c->items[i].item_id,
|
||||||
dbpc_c->items[i].charges,
|
dbpc_c->items[i].charges,
|
||||||
@@ -1807,7 +1807,7 @@ bool Database::CheckDatabaseConvertCorpseDeblob(){
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
scquery = scquery + StringFormat(", (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
scquery = scquery + StringFormat(", (%u, %u, %u, %u, %u, %u, %u, %u, %u, %u, %u) \n",
|
||||||
Strings::ToInt(row2[0]),
|
Strings::ToUnsignedInt(row2[0]),
|
||||||
dbpc_c->items[i].equipSlot,
|
dbpc_c->items[i].equipSlot,
|
||||||
dbpc_c->items[i].item_id,
|
dbpc_c->items[i].item_id,
|
||||||
dbpc_c->items[i].charges,
|
dbpc_c->items[i].charges,
|
||||||
|
|||||||
@@ -593,4 +593,29 @@ enum class ApplySpellType {
|
|||||||
Raid
|
Raid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
namespace HeroicBonusBucket
|
||||||
|
{
|
||||||
|
const std::string WisMaxMana = "HWIS-MaxMana";
|
||||||
|
const std::string WisManaRegen = "HWIS-ManaRegen";
|
||||||
|
const std::string WisHealAmt = "HWIS-HealAmt";
|
||||||
|
const std::string IntMaxMana = "HINT-MaxMana";
|
||||||
|
const std::string IntManaRegen = "HINT-ManaRegen";
|
||||||
|
const std::string IntSpellDmg = "HINT-SpellDmg";
|
||||||
|
const std::string StrMeleeDamage = "HSTR-MeleeDamage";
|
||||||
|
const std::string StrShieldAC = "HSTR-ShieldAC";
|
||||||
|
const std::string StrMaxEndurance = "HSTR-MaxEndurance";
|
||||||
|
const std::string StrEnduranceRegen = "HSTR-EnduranceRegen";
|
||||||
|
const std::string StaMaxHP = "HSTA-MaxHP";
|
||||||
|
const std::string StaHPRegen = "HSTA-HPRegen";
|
||||||
|
const std::string StaMaxEndurance = "HSTA-MaxEndurance";
|
||||||
|
const std::string StaEnduranceRegen = "HSTA-EnduranceRegen";
|
||||||
|
const std::string AgiAvoidance = "HAGI-Avoidance";
|
||||||
|
const std::string AgiMaxEndurance = "HAGI-MaxEndurance";
|
||||||
|
const std::string AgiEnduranceRegen = "HAGI-EnduranceRegen";
|
||||||
|
const std::string DexRangedDamage = "HDEX-RangedDamage";
|
||||||
|
const std::string DexMaxEndurance = "HDEX-MaxEndurance";
|
||||||
|
const std::string DexEnduranceRegen = "HDEX-EnduranceRegen";
|
||||||
|
}
|
||||||
|
|
||||||
#endif /*COMMON_EMU_CONSTANTS_H*/
|
#endif /*COMMON_EMU_CONSTANTS_H*/
|
||||||
|
|||||||
@@ -5522,7 +5522,11 @@ struct ServerLootItem_Struct {
|
|||||||
uint32 aug_4; // uint32 aug_4;
|
uint32 aug_4; // uint32 aug_4;
|
||||||
uint32 aug_5; // uint32 aug_5;
|
uint32 aug_5; // uint32 aug_5;
|
||||||
uint32 aug_6; // uint32 aug_5;
|
uint32 aug_6; // uint32 aug_5;
|
||||||
uint8 attuned;
|
bool attuned;
|
||||||
|
std::string custom_data;
|
||||||
|
uint32 ornamenticon {};
|
||||||
|
uint32 ornamentidfile {};
|
||||||
|
uint32 ornament_hero_model {};
|
||||||
uint16 trivial_min_level;
|
uint16 trivial_min_level;
|
||||||
uint16 trivial_max_level;
|
uint16 trivial_max_level;
|
||||||
uint16 npc_min_level;
|
uint16 npc_min_level;
|
||||||
|
|||||||
+13
-13
@@ -40,7 +40,7 @@ void EQEmuConfig::parse_config()
|
|||||||
|
|
||||||
if (_root["server"]["world"]["loginserver"].isObject()) {
|
if (_root["server"]["world"]["loginserver"].isObject()) {
|
||||||
LoginHost = _root["server"]["world"]["loginserver"].get("host", "login.eqemulator.net").asString();
|
LoginHost = _root["server"]["world"]["loginserver"].get("host", "login.eqemulator.net").asString();
|
||||||
LoginPort = Strings::ToInt(_root["server"]["world"]["loginserver"].get("port", "5998").asString().c_str());
|
LoginPort = Strings::ToUnsignedInt(_root["server"]["world"]["loginserver"].get("port", "5998").asString().c_str());
|
||||||
LoginLegacy = false;
|
LoginLegacy = false;
|
||||||
if (_root["server"]["world"]["loginserver"].get("legacy", "0").asString() == "1") { LoginLegacy = true; }
|
if (_root["server"]["world"]["loginserver"].get("legacy", "0").asString() == "1") { LoginLegacy = true; }
|
||||||
LoginAccount = _root["server"]["world"]["loginserver"].get("account", "").asString();
|
LoginAccount = _root["server"]["world"]["loginserver"].get("account", "").asString();
|
||||||
@@ -63,7 +63,7 @@ void EQEmuConfig::parse_config()
|
|||||||
|
|
||||||
auto loginconfig = new LoginConfig;
|
auto loginconfig = new LoginConfig;
|
||||||
loginconfig->LoginHost = _root["server"]["world"][str].get("host", "login.eqemulator.net").asString();
|
loginconfig->LoginHost = _root["server"]["world"][str].get("host", "login.eqemulator.net").asString();
|
||||||
loginconfig->LoginPort = Strings::ToInt(_root["server"]["world"][str].get("port", "5998").asString().c_str());
|
loginconfig->LoginPort = Strings::ToUnsignedInt(_root["server"]["world"][str].get("port", "5998").asString().c_str());
|
||||||
loginconfig->LoginAccount = _root["server"]["world"][str].get("account", "").asString();
|
loginconfig->LoginAccount = _root["server"]["world"][str].get("account", "").asString();
|
||||||
loginconfig->LoginPassword = _root["server"]["world"][str].get("password", "").asString();
|
loginconfig->LoginPassword = _root["server"]["world"][str].get("password", "").asString();
|
||||||
|
|
||||||
@@ -86,15 +86,15 @@ void EQEmuConfig::parse_config()
|
|||||||
Locked = false;
|
Locked = false;
|
||||||
if (_root["server"]["world"].get("locked", "false").asString() == "true") { Locked = true; }
|
if (_root["server"]["world"].get("locked", "false").asString() == "true") { Locked = true; }
|
||||||
WorldIP = _root["server"]["world"]["tcp"].get("host", "127.0.0.1").asString();
|
WorldIP = _root["server"]["world"]["tcp"].get("host", "127.0.0.1").asString();
|
||||||
WorldTCPPort = Strings::ToInt(_root["server"]["world"]["tcp"].get("port", "9000").asString().c_str());
|
WorldTCPPort = Strings::ToUnsignedInt(_root["server"]["world"]["tcp"].get("port", "9000").asString().c_str());
|
||||||
|
|
||||||
TelnetIP = _root["server"]["world"]["telnet"].get("ip", "127.0.0.1").asString();
|
TelnetIP = _root["server"]["world"]["telnet"].get("ip", "127.0.0.1").asString();
|
||||||
TelnetTCPPort = Strings::ToInt(_root["server"]["world"]["telnet"].get("port", "9001").asString().c_str());
|
TelnetTCPPort = Strings::ToUnsignedInt(_root["server"]["world"]["telnet"].get("port", "9001").asString().c_str());
|
||||||
TelnetEnabled = false;
|
TelnetEnabled = false;
|
||||||
if (_root["server"]["world"]["telnet"].get("enabled", "false").asString() == "true") { TelnetEnabled = true; }
|
if (_root["server"]["world"]["telnet"].get("enabled", "false").asString() == "true") { TelnetEnabled = true; }
|
||||||
|
|
||||||
WorldHTTPMimeFile = _root["server"]["world"]["http"].get("mimefile", "mime.types").asString();
|
WorldHTTPMimeFile = _root["server"]["world"]["http"].get("mimefile", "mime.types").asString();
|
||||||
WorldHTTPPort = Strings::ToInt(_root["server"]["world"]["http"].get("port", "9080").asString().c_str());
|
WorldHTTPPort = Strings::ToUnsignedInt(_root["server"]["world"]["http"].get("port", "9080").asString().c_str());
|
||||||
WorldHTTPEnabled = false;
|
WorldHTTPEnabled = false;
|
||||||
|
|
||||||
if (_root["server"]["world"]["http"].get("enabled", "false").asString() == "true") {
|
if (_root["server"]["world"]["http"].get("enabled", "false").asString() == "true") {
|
||||||
@@ -109,9 +109,9 @@ void EQEmuConfig::parse_config()
|
|||||||
* UCS
|
* UCS
|
||||||
*/
|
*/
|
||||||
ChatHost = _root["server"]["chatserver"].get("host", "eqchat.eqemulator.net").asString();
|
ChatHost = _root["server"]["chatserver"].get("host", "eqchat.eqemulator.net").asString();
|
||||||
ChatPort = Strings::ToInt(_root["server"]["chatserver"].get("port", "7778").asString().c_str());
|
ChatPort = Strings::ToUnsignedInt(_root["server"]["chatserver"].get("port", "7778").asString().c_str());
|
||||||
MailHost = _root["server"]["mailserver"].get("host", "eqmail.eqemulator.net").asString();
|
MailHost = _root["server"]["mailserver"].get("host", "eqmail.eqemulator.net").asString();
|
||||||
MailPort = Strings::ToInt(_root["server"]["mailserver"].get("port", "7778").asString().c_str());
|
MailPort = Strings::ToUnsignedInt(_root["server"]["mailserver"].get("port", "7778").asString().c_str());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Database
|
* Database
|
||||||
@@ -119,7 +119,7 @@ void EQEmuConfig::parse_config()
|
|||||||
DatabaseUsername = _root["server"]["database"].get("username", "eq").asString();
|
DatabaseUsername = _root["server"]["database"].get("username", "eq").asString();
|
||||||
DatabasePassword = _root["server"]["database"].get("password", "eq").asString();
|
DatabasePassword = _root["server"]["database"].get("password", "eq").asString();
|
||||||
DatabaseHost = _root["server"]["database"].get("host", "localhost").asString();
|
DatabaseHost = _root["server"]["database"].get("host", "localhost").asString();
|
||||||
DatabasePort = Strings::ToInt(_root["server"]["database"].get("port", "3306").asString().c_str());
|
DatabasePort = Strings::ToUnsignedInt(_root["server"]["database"].get("port", "3306").asString().c_str());
|
||||||
DatabaseDB = _root["server"]["database"].get("db", "eq").asString();
|
DatabaseDB = _root["server"]["database"].get("db", "eq").asString();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -128,14 +128,14 @@ void EQEmuConfig::parse_config()
|
|||||||
ContentDbUsername = _root["server"]["content_database"].get("username", "").asString();
|
ContentDbUsername = _root["server"]["content_database"].get("username", "").asString();
|
||||||
ContentDbPassword = _root["server"]["content_database"].get("password", "").asString();
|
ContentDbPassword = _root["server"]["content_database"].get("password", "").asString();
|
||||||
ContentDbHost = _root["server"]["content_database"].get("host", "").asString();
|
ContentDbHost = _root["server"]["content_database"].get("host", "").asString();
|
||||||
ContentDbPort = Strings::ToInt(_root["server"]["content_database"].get("port", 0).asString().c_str());
|
ContentDbPort = Strings::ToUnsignedInt(_root["server"]["content_database"].get("port", 0).asString().c_str());
|
||||||
ContentDbName = _root["server"]["content_database"].get("db", "").asString();
|
ContentDbName = _root["server"]["content_database"].get("db", "").asString();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* QS
|
* QS
|
||||||
*/
|
*/
|
||||||
QSDatabaseHost = _root["server"]["qsdatabase"].get("host", "localhost").asString();
|
QSDatabaseHost = _root["server"]["qsdatabase"].get("host", "localhost").asString();
|
||||||
QSDatabasePort = Strings::ToInt(_root["server"]["qsdatabase"].get("port", "3306").asString().c_str());
|
QSDatabasePort = Strings::ToUnsignedInt(_root["server"]["qsdatabase"].get("port", "3306").asString().c_str());
|
||||||
QSDatabaseUsername = _root["server"]["qsdatabase"].get("username", "eq").asString();
|
QSDatabaseUsername = _root["server"]["qsdatabase"].get("username", "eq").asString();
|
||||||
QSDatabasePassword = _root["server"]["qsdatabase"].get("password", "eq").asString();
|
QSDatabasePassword = _root["server"]["qsdatabase"].get("password", "eq").asString();
|
||||||
QSDatabaseDB = _root["server"]["qsdatabase"].get("db", "eq").asString();
|
QSDatabaseDB = _root["server"]["qsdatabase"].get("db", "eq").asString();
|
||||||
@@ -143,9 +143,9 @@ void EQEmuConfig::parse_config()
|
|||||||
/**
|
/**
|
||||||
* Zones
|
* Zones
|
||||||
*/
|
*/
|
||||||
DefaultStatus = Strings::ToInt(_root["server"]["zones"].get("defaultstatus", 0).asString().c_str());
|
DefaultStatus = Strings::ToUnsignedInt(_root["server"]["zones"].get("defaultstatus", 0).asString().c_str());
|
||||||
ZonePortLow = Strings::ToInt(_root["server"]["zones"]["ports"].get("low", "7000").asString().c_str());
|
ZonePortLow = Strings::ToUnsignedInt(_root["server"]["zones"]["ports"].get("low", "7000").asString().c_str());
|
||||||
ZonePortHigh = Strings::ToInt(_root["server"]["zones"]["ports"].get("high", "7999").asString().c_str());
|
ZonePortHigh = Strings::ToUnsignedInt(_root["server"]["zones"]["ports"].get("high", "7999").asString().c_str());
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Files
|
* Files
|
||||||
|
|||||||
@@ -384,7 +384,7 @@ namespace PlayerEvent {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct AAPurchasedEvent {
|
struct AAPurchasedEvent {
|
||||||
int32 aa_id;
|
uint32 aa_id;
|
||||||
int32 aa_cost;
|
int32 aa_cost;
|
||||||
int32 aa_previous_id;
|
int32 aa_previous_id;
|
||||||
int32 aa_next_id;
|
int32 aa_next_id;
|
||||||
|
|||||||
+14
-18
@@ -61,7 +61,7 @@ bool BaseGuildManager::LoadGuilds() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (auto row=results.begin();row!=results.end();++row)
|
for (auto row=results.begin();row!=results.end();++row)
|
||||||
_CreateGuild(Strings::ToInt(row[0]), row[1], Strings::ToInt(row[2]), Strings::ToInt(row[3]), row[4], row[5], row[6], row[7]);
|
_CreateGuild(Strings::ToUnsignedInt(row[0]), row[1], Strings::ToUnsignedInt(row[2]), Strings::ToUnsignedInt(row[3]), row[4], row[5], row[6], row[7]);
|
||||||
|
|
||||||
LogInfo("Loaded [{}] Guilds", Strings::Commify(std::to_string(results.RowCount())));
|
LogInfo("Loaded [{}] Guilds", Strings::Commify(std::to_string(results.RowCount())));
|
||||||
|
|
||||||
@@ -75,8 +75,8 @@ bool BaseGuildManager::LoadGuilds() {
|
|||||||
|
|
||||||
for (auto row=results.begin();row!=results.end();++row)
|
for (auto row=results.begin();row!=results.end();++row)
|
||||||
{
|
{
|
||||||
uint32 guild_id = Strings::ToInt(row[0]);
|
uint32 guild_id = Strings::ToUnsignedInt(row[0]);
|
||||||
uint8 rankn = Strings::ToInt(row[1]);
|
uint8 rankn = Strings::ToUnsignedInt(row[1]);
|
||||||
|
|
||||||
if(rankn > GUILD_MAX_RANK) {
|
if(rankn > GUILD_MAX_RANK) {
|
||||||
LogGuilds("Found invalid (too high) rank [{}] for guild [{}], skipping", rankn, guild_id);
|
LogGuilds("Found invalid (too high) rank [{}] for guild [{}], skipping", rankn, guild_id);
|
||||||
@@ -131,7 +131,7 @@ bool BaseGuildManager::RefreshGuild(uint32 guild_id) {
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
info = _CreateGuild(guild_id, row[0], Strings::ToInt(row[1]), Strings::ToInt(row[2]), row[3], row[4], row[5], row[6]);
|
info = _CreateGuild(guild_id, row[0], Strings::ToUnsignedInt(row[1]), Strings::ToUnsignedInt(row[2]), row[3], row[4], row[5], row[6]);
|
||||||
|
|
||||||
query = StringFormat("SELECT guild_id, `rank`, title, can_hear, can_speak, can_invite, can_remove, can_promote, can_demote, can_motd, can_warpeace "
|
query = StringFormat("SELECT guild_id, `rank`, title, can_hear, can_speak, can_invite, can_remove, can_promote, can_demote, can_motd, can_warpeace "
|
||||||
"FROM guild_ranks WHERE guild_id=%lu", (unsigned long)guild_id);
|
"FROM guild_ranks WHERE guild_id=%lu", (unsigned long)guild_id);
|
||||||
@@ -144,7 +144,7 @@ bool BaseGuildManager::RefreshGuild(uint32 guild_id) {
|
|||||||
|
|
||||||
for (auto row=results.begin();row!=results.end();++row)
|
for (auto row=results.begin();row!=results.end();++row)
|
||||||
{
|
{
|
||||||
uint8 rankn = Strings::ToInt(row[1]);
|
uint8 rankn = Strings::ToUnsignedInt(row[1]);
|
||||||
|
|
||||||
if(rankn > GUILD_MAX_RANK) {
|
if(rankn > GUILD_MAX_RANK) {
|
||||||
LogGuilds("Found invalid (too high) rank [{}] for guild [{}], skipping", rankn, guild_id);
|
LogGuilds("Found invalid (too high) rank [{}] for guild [{}], skipping", rankn, guild_id);
|
||||||
@@ -787,9 +787,7 @@ bool BaseGuildManager::GetBankerFlag(uint32 CharID)
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
bool IsBanker = Strings::ToInt(row[0]);
|
return Strings::ToBool(row[0]);
|
||||||
|
|
||||||
return IsBanker;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseGuildManager::DBSetAltFlag(uint32 charid, bool is_alt)
|
bool BaseGuildManager::DBSetAltFlag(uint32 charid, bool is_alt)
|
||||||
@@ -817,9 +815,7 @@ bool BaseGuildManager::GetAltFlag(uint32 CharID)
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
bool IsAlt = Strings::ToInt(row[0]);
|
return Strings::ToBool(row[0]);
|
||||||
|
|
||||||
return IsAlt;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BaseGuildManager::DBSetTributeFlag(uint32 charid, bool enabled) {
|
bool BaseGuildManager::DBSetTributeFlag(uint32 charid, bool enabled) {
|
||||||
@@ -873,18 +869,18 @@ bool BaseGuildManager::QueryWithLogging(std::string query, const char *errmsg) {
|
|||||||
" 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` "
|
||||||
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
|
static void ProcessGuildMember(MySQLRequestRow row, CharGuildInfo &into) {
|
||||||
//fields from `characer_`
|
//fields from `characer_`
|
||||||
into.char_id = Strings::ToInt(row[0]);
|
into.char_id = Strings::ToUnsignedInt(row[0]);
|
||||||
into.char_name = row[1];
|
into.char_name = row[1];
|
||||||
into.class_ = Strings::ToInt(row[2]);
|
into.class_ = Strings::ToUnsignedInt(row[2]);
|
||||||
into.level = Strings::ToInt(row[3]);
|
into.level = Strings::ToUnsignedInt(row[3]);
|
||||||
into.time_last_on = Strings::ToUnsignedInt(row[4]);
|
into.time_last_on = Strings::ToUnsignedInt(row[4]);
|
||||||
into.zone_id = Strings::ToInt(row[5]);
|
into.zone_id = Strings::ToUnsignedInt(row[5]);
|
||||||
|
|
||||||
//fields from `guild_members`, leave at defaults if missing
|
//fields from `guild_members`, leave at defaults if missing
|
||||||
into.guild_id = row[6] ? Strings::ToInt(row[6]) : GUILD_NONE;
|
into.guild_id = row[6] ? Strings::ToUnsignedInt(row[6]) : GUILD_NONE;
|
||||||
into.rank = row[7] ? Strings::ToInt(row[7]) : (GUILD_MAX_RANK+1);
|
into.rank = row[7] ? Strings::ToUnsignedInt(row[7]) : (GUILD_MAX_RANK+1);
|
||||||
into.tribute_enable = row[8] ? (row[8][0] == '0'?false:true) : false;
|
into.tribute_enable = row[8] ? (row[8][0] == '0'?false:true) : false;
|
||||||
into.total_tribute = row[9] ? Strings::ToInt(row[9]) : 0;
|
into.total_tribute = row[9] ? Strings::ToUnsignedInt(row[9]) : 0;
|
||||||
into.last_tribute = row[10]? Strings::ToUnsignedInt(row[10]) : 0; //timestamp
|
into.last_tribute = row[10]? Strings::ToUnsignedInt(row[10]) : 0; //timestamp
|
||||||
into.banker = row[11]? (row[11][0] == '0'?false:true) : false;
|
into.banker = row[11]? (row[11][0] == '0'?false:true) : false;
|
||||||
into.public_note = row[12]? row[12] : "";
|
into.public_note = row[12]? row[12] : "";
|
||||||
|
|||||||
@@ -6690,7 +6690,7 @@ static WSInit wsinit_;
|
|||||||
if (params.empty()) { return Get(path, headers); }
|
if (params.empty()) { return Get(path, headers); }
|
||||||
|
|
||||||
std::string path_with_query = append_query_params(path, params);
|
std::string path_with_query = append_query_params(path, params);
|
||||||
return Get(path_with_query.c_str(), headers, progress);
|
return Get(path_with_query, headers, progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Result ClientImpl::Get(const std::string &path, const Params ¶ms,
|
inline Result ClientImpl::Get(const std::string &path, const Params ¶ms,
|
||||||
@@ -6710,7 +6710,7 @@ static WSInit wsinit_;
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string path_with_query = append_query_params(path, params);
|
std::string path_with_query = append_query_params(path, params);
|
||||||
return Get(path_with_query.c_str(), headers, response_handler,
|
return Get(path_with_query, headers, response_handler,
|
||||||
content_receiver, progress);
|
content_receiver, progress);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -6807,7 +6807,7 @@ static WSInit wsinit_;
|
|||||||
std::string content_type;
|
std::string content_type;
|
||||||
const auto &body = detail::serialize_multipart_formdata(
|
const auto &body = detail::serialize_multipart_formdata(
|
||||||
items, detail::make_multipart_data_boundary(), content_type);
|
items, detail::make_multipart_data_boundary(), content_type);
|
||||||
return Post(path, headers, body, content_type.c_str());
|
return Post(path, headers, body, content_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Result ClientImpl::Post(const std::string &path, const Headers &headers,
|
inline Result ClientImpl::Post(const std::string &path, const Headers &headers,
|
||||||
@@ -6820,7 +6820,7 @@ static WSInit wsinit_;
|
|||||||
std::string content_type;
|
std::string content_type;
|
||||||
const auto &body =
|
const auto &body =
|
||||||
detail::serialize_multipart_formdata(items, boundary, content_type);
|
detail::serialize_multipart_formdata(items, boundary, content_type);
|
||||||
return Post(path, headers, body, content_type.c_str());
|
return Post(path, headers, body, content_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Result ClientImpl::Put(const std::string &path) {
|
inline Result ClientImpl::Put(const std::string &path) {
|
||||||
|
|||||||
@@ -203,12 +203,12 @@ namespace EQ
|
|||||||
void dumpBankItems();
|
void dumpBankItems();
|
||||||
void dumpSharedBankItems();
|
void dumpSharedBankItems();
|
||||||
|
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, std::string value);
|
void SetCustomItemData(uint32 character_id, int16 slot_id, const std::string &identifier, const std::string& value);
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, int value);
|
void SetCustomItemData(uint32 character_id, int16 slot_id, const std::string &identifier, int value);
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, float value);
|
void SetCustomItemData(uint32 character_id, int16 slot_id, const std::string &identifier, float value);
|
||||||
void SetCustomItemData(uint32 character_id, int16 slot_id, std::string identifier, bool value);
|
void SetCustomItemData(uint32 character_id, int16 slot_id, const std::string &identifier, bool value);
|
||||||
std::string GetCustomItemData(int16 slot_id, std::string identifier);
|
std::string GetCustomItemData(int16 slot_id, const std::string& identifier);
|
||||||
static const int GetItemStatValue(uint32 item_id, std::string identifier);
|
static const int GetItemStatValue(uint32 item_id, const std::string& identifier);
|
||||||
protected:
|
protected:
|
||||||
///////////////////////////////
|
///////////////////////////////
|
||||||
// Protected Methods
|
// Protected Methods
|
||||||
|
|||||||
+2
-2
@@ -449,8 +449,8 @@ namespace EQ
|
|||||||
int8 Shielding; // PoP: Shielding %
|
int8 Shielding; // PoP: Shielding %
|
||||||
int8 StunResist; // PoP: Stun Resist %
|
int8 StunResist; // PoP: Stun Resist %
|
||||||
int8 StrikeThrough; // PoP: Strike Through %
|
int8 StrikeThrough; // PoP: Strike Through %
|
||||||
uint32 ExtraDmgSkill;
|
int32 ExtraDmgSkill;
|
||||||
uint32 ExtraDmgAmt;
|
int32 ExtraDmgAmt;
|
||||||
int8 SpellShield; // PoP: Spell Shield %
|
int8 SpellShield; // PoP: Spell Shield %
|
||||||
int8 Avoidance; // PoP: Avoidance +
|
int8 Avoidance; // PoP: Avoidance +
|
||||||
int8 Accuracy; // PoP: Accuracy +
|
int8 Accuracy; // PoP: Accuracy +
|
||||||
|
|||||||
@@ -610,7 +610,7 @@ bool EQ::ItemInstance::UpdateOrnamentationInfo() {
|
|||||||
SetOrnamentHeroModel(ornamentItem->HerosForgeModel);
|
SetOrnamentHeroModel(ornamentItem->HerosForgeModel);
|
||||||
if (strlen(ornamentItem->IDFile) > 2)
|
if (strlen(ornamentItem->IDFile) > 2)
|
||||||
{
|
{
|
||||||
SetOrnamentationIDFile(Strings::ToInt(&ornamentItem->IDFile[2]));
|
SetOrnamentationIDFile(Strings::ToUnsignedInt(&ornamentItem->IDFile[2]));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -840,7 +840,20 @@ std::string EQ::ItemInstance::GetCustomDataString() const {
|
|||||||
return ret_val;
|
return ret_val;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string EQ::ItemInstance::GetCustomData(std::string identifier) {
|
void EQ::ItemInstance::SetCustomDataString(const std::string& str)
|
||||||
|
{
|
||||||
|
auto components = Strings::Split(str, "^");
|
||||||
|
auto value_count = components.size() / 2;
|
||||||
|
|
||||||
|
for (auto i = 0; i < value_count; i++) {
|
||||||
|
auto identifier = components[i * 2];
|
||||||
|
auto value = components[(i * 2) + 1];
|
||||||
|
|
||||||
|
SetCustomData(identifier, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string EQ::ItemInstance::GetCustomData(const std::string& identifier) {
|
||||||
std::map<std::string, std::string>::const_iterator iter = m_custom_data.find(identifier);
|
std::map<std::string, std::string>::const_iterator iter = m_custom_data.find(identifier);
|
||||||
if (iter != m_custom_data.end()) {
|
if (iter != m_custom_data.end()) {
|
||||||
return iter->second;
|
return iter->second;
|
||||||
@@ -849,33 +862,33 @@ std::string EQ::ItemInstance::GetCustomData(std::string identifier) {
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQ::ItemInstance::SetCustomData(std::string identifier, std::string value) {
|
void EQ::ItemInstance::SetCustomData(const std::string& identifier, const std::string& value) {
|
||||||
DeleteCustomData(identifier);
|
DeleteCustomData(identifier);
|
||||||
m_custom_data[identifier] = value;
|
m_custom_data[identifier] = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQ::ItemInstance::SetCustomData(std::string identifier, int value) {
|
void EQ::ItemInstance::SetCustomData(const std::string& identifier, int value) {
|
||||||
DeleteCustomData(identifier);
|
DeleteCustomData(identifier);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << value;
|
ss << value;
|
||||||
m_custom_data[identifier] = ss.str();
|
m_custom_data[identifier] = ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQ::ItemInstance::SetCustomData(std::string identifier, float value) {
|
void EQ::ItemInstance::SetCustomData(const std::string& identifier, float value) {
|
||||||
DeleteCustomData(identifier);
|
DeleteCustomData(identifier);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << value;
|
ss << value;
|
||||||
m_custom_data[identifier] = ss.str();
|
m_custom_data[identifier] = ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQ::ItemInstance::SetCustomData(std::string identifier, bool value) {
|
void EQ::ItemInstance::SetCustomData(const std::string& identifier, bool value) {
|
||||||
DeleteCustomData(identifier);
|
DeleteCustomData(identifier);
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << value;
|
ss << value;
|
||||||
m_custom_data[identifier] = ss.str();
|
m_custom_data[identifier] = ss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EQ::ItemInstance::DeleteCustomData(std::string identifier) {
|
void EQ::ItemInstance::DeleteCustomData(const std::string& identifier) {
|
||||||
auto iter = m_custom_data.find(identifier);
|
auto iter = m_custom_data.find(identifier);
|
||||||
if (iter != m_custom_data.end()) {
|
if (iter != m_custom_data.end()) {
|
||||||
m_custom_data.erase(iter);
|
m_custom_data.erase(iter);
|
||||||
|
|||||||
@@ -175,12 +175,13 @@ namespace EQ
|
|||||||
void SetAttuned(bool flag) { m_attuned = flag; }
|
void SetAttuned(bool flag) { m_attuned = flag; }
|
||||||
|
|
||||||
std::string GetCustomDataString() const;
|
std::string GetCustomDataString() const;
|
||||||
std::string GetCustomData(std::string identifier);
|
std::string GetCustomData(const std::string &identifier);
|
||||||
void SetCustomData(std::string identifier, std::string value);
|
void SetCustomDataString(const std::string& str);
|
||||||
void SetCustomData(std::string identifier, int value);
|
void SetCustomData(const std::string &identifier, const std::string& value);
|
||||||
void SetCustomData(std::string identifier, float value);
|
void SetCustomData(const std::string &identifier, int value);
|
||||||
void SetCustomData(std::string identifier, bool value);
|
void SetCustomData(const std::string &identifier, float value);
|
||||||
void DeleteCustomData(std::string identifier);
|
void SetCustomData(const std::string &identifier, bool value);
|
||||||
|
void DeleteCustomData(const std::string& identifier);
|
||||||
|
|
||||||
// Allows treatment of this object as though it were a pointer to m_item
|
// Allows treatment of this object as though it were a pointer to m_item
|
||||||
operator bool() const { return (m_item != nullptr); }
|
operator bool() const { return (m_item != nullptr); }
|
||||||
|
|||||||
+1
-1
@@ -151,7 +151,7 @@ static char *temp=nullptr;
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ptr++;
|
ptr++;
|
||||||
uint32 id = Strings::ToInt(field[id_pos].c_str());
|
uint32 id = Strings::ToUnsignedInt(field[id_pos]);
|
||||||
items[id]=field;
|
items[id]=field;
|
||||||
|
|
||||||
for(i=0;i<10;i++) {
|
for(i=0;i<10;i++) {
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ bool ParseAddress(const char* iAddress, uint32* oIP, uint16* oPort, char* errbuf
|
|||||||
if (*oIP == 0)
|
if (*oIP == 0)
|
||||||
return false;
|
return false;
|
||||||
if (oPort)
|
if (oPort)
|
||||||
*oPort = Strings::ToInt(sep.arg[1]);
|
*oPort = Strings::ToUnsignedInt(sep.arg[1]);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ namespace RoF
|
|||||||
{
|
{
|
||||||
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -1069,7 +1069,7 @@ namespace RoF
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if(gjs->action == groupActLeave)
|
//if(gjs->action == groupActLeave)
|
||||||
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -1099,7 +1099,7 @@ namespace RoF
|
|||||||
|
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->membername[i]);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->member_name[i]);
|
||||||
if (gu2->membername[i][0] != '\0')
|
if (gu2->membername[i][0] != '\0')
|
||||||
{
|
{
|
||||||
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
||||||
@@ -1169,7 +1169,7 @@ namespace RoF
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
||||||
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
||||||
|
|
||||||
|
|||||||
@@ -1101,7 +1101,7 @@ namespace RoF2
|
|||||||
{
|
{
|
||||||
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -1120,7 +1120,7 @@ namespace RoF2
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if(gjs->action == groupActLeave)
|
//if(gjs->action == groupActLeave)
|
||||||
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -1150,7 +1150,7 @@ namespace RoF2
|
|||||||
|
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->membername[i]);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->member_name[i]);
|
||||||
if (gu2->membername[i][0] != '\0')
|
if (gu2->membername[i][0] != '\0')
|
||||||
{
|
{
|
||||||
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
||||||
@@ -1220,7 +1220,7 @@ namespace RoF2
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
||||||
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
||||||
|
|
||||||
|
|||||||
@@ -2590,7 +2590,7 @@ struct GroupUpdate_Struct_Live { // New for Live
|
|||||||
|
|
||||||
struct GroupMembers_Struct { // New for Live
|
struct GroupMembers_Struct { // New for Live
|
||||||
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
||||||
/*0000*/ //char membername[0]; // Member Name Null Terminated
|
/*0000*/ //char member_name[0]; // Member Name Null Terminated
|
||||||
/*0000*/ uint8 unknown001[3]; // Seen 0
|
/*0000*/ uint8 unknown001[3]; // Seen 0
|
||||||
/*0000*/ uint32 memberlevel; // Guess
|
/*0000*/ uint32 memberlevel; // Guess
|
||||||
/*0000*/ uint8 unknown002[11]; // Seen 0
|
/*0000*/ uint8 unknown002[11]; // Seen 0
|
||||||
@@ -2600,7 +2600,7 @@ struct GroupJoin_Struct_Live { // New for Live
|
|||||||
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
||||||
/*0004*/ uint32 action;
|
/*0004*/ uint32 action;
|
||||||
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
||||||
/*0013*/ //char membername[0]; // Null Terminated?
|
/*0013*/ //char member_name[0]; // Null Terminated?
|
||||||
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
||||||
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
||||||
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
||||||
|
|||||||
@@ -2566,7 +2566,7 @@ struct GroupUpdate_Struct_Live { // New for Live
|
|||||||
|
|
||||||
struct GroupMembers_Struct { // New for Live
|
struct GroupMembers_Struct { // New for Live
|
||||||
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
||||||
/*0000*/ //char membername[0]; // Member Name Null Terminated
|
/*0000*/ //char member_name[0]; // Member Name Null Terminated
|
||||||
/*0000*/ uint8 unknown001[3]; // Seen 0
|
/*0000*/ uint8 unknown001[3]; // Seen 0
|
||||||
/*0000*/ uint32 memberlevel; // Guess
|
/*0000*/ uint32 memberlevel; // Guess
|
||||||
/*0000*/ uint8 unknown002[11]; // Seen 0
|
/*0000*/ uint8 unknown002[11]; // Seen 0
|
||||||
@@ -2576,7 +2576,7 @@ struct GroupJoin_Struct_Live { // New for Live
|
|||||||
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
||||||
/*0004*/ uint32 action;
|
/*0004*/ uint32 action;
|
||||||
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
||||||
/*0013*/ //char membername[0]; // Null Terminated?
|
/*0013*/ //char member_name[0]; // Null Terminated?
|
||||||
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
||||||
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
||||||
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
||||||
|
|||||||
@@ -785,7 +785,7 @@ namespace SoD
|
|||||||
{
|
{
|
||||||
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -804,7 +804,7 @@ namespace SoD
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if(gjs->action == groupActLeave)
|
//if(gjs->action == groupActLeave)
|
||||||
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -834,7 +834,7 @@ namespace SoD
|
|||||||
|
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->membername[i]);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->member_name[i]);
|
||||||
if (gu2->membername[i][0] != '\0')
|
if (gu2->membername[i][0] != '\0')
|
||||||
{
|
{
|
||||||
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
||||||
@@ -902,7 +902,7 @@ namespace SoD
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
||||||
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
||||||
|
|
||||||
|
|||||||
@@ -2085,7 +2085,7 @@ struct GroupUpdate_Struct_SoD { // New for SoD
|
|||||||
|
|
||||||
struct GroupMembers_Struct { // New for SoD
|
struct GroupMembers_Struct { // New for SoD
|
||||||
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
||||||
/*0000*/ //char membername[0]; // Member Name Null Terminated
|
/*0000*/ //char member_name[0]; // Member Name Null Terminated
|
||||||
/*0000*/ uint8 unknown001[3]; // Seen 0
|
/*0000*/ uint8 unknown001[3]; // Seen 0
|
||||||
/*0000*/ uint32 memberlevel; // Guess
|
/*0000*/ uint32 memberlevel; // Guess
|
||||||
/*0000*/ uint8 unknown002[11]; // Seen 0
|
/*0000*/ uint8 unknown002[11]; // Seen 0
|
||||||
@@ -2095,7 +2095,7 @@ struct GroupJoin_Struct_SoD { // New for SoD
|
|||||||
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
||||||
/*0004*/ uint32 action;
|
/*0004*/ uint32 action;
|
||||||
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
||||||
/*0013*/ //char membername[0]; // Null Terminated?
|
/*0013*/ //char member_name[0]; // Null Terminated?
|
||||||
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
||||||
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
||||||
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
||||||
|
|||||||
@@ -927,7 +927,7 @@ namespace UF
|
|||||||
{
|
{
|
||||||
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
if ((gjs->action == groupActDisband) || !strcmp(gjs->yourname, gjs->membername))
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandYou, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -947,7 +947,7 @@ namespace UF
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if(gjs->action == groupActLeave)
|
//if(gjs->action == groupActLeave)
|
||||||
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
// Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Group Leave, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
|
|
||||||
auto outapp =
|
auto outapp =
|
||||||
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
new EQApplicationPacket(OP_GroupDisbandOther, sizeof(structs::GroupGeneric_Struct));
|
||||||
@@ -977,7 +977,7 @@ namespace UF
|
|||||||
|
|
||||||
for (int i = 0; i < 5; ++i)
|
for (int i = 0; i < 5; ++i)
|
||||||
{
|
{
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->membername[i]);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Membername[%i] is %s", i, gu2->member_name[i]);
|
||||||
if (gu2->membername[i][0] != '\0')
|
if (gu2->membername[i][0] != '\0')
|
||||||
{
|
{
|
||||||
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
PacketLength += (22 + strlen(gu2->membername[i]) + 1);
|
||||||
@@ -1045,7 +1045,7 @@ namespace UF
|
|||||||
delete in;
|
delete in;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, membername = %s", gjs->yourname, gjs->membername);
|
//Log.LogDebugType(Logs::General, Logs::Netcode, "[ERROR] Generic GroupUpdate, yourname = %s, member_name = %s", gjs->yourname, gjs->member_name);
|
||||||
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
ENCODE_LENGTH_EXACT(GroupJoin_Struct);
|
||||||
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
SETUP_DIRECT_ENCODE(GroupJoin_Struct, structs::GroupJoin_Struct);
|
||||||
|
|
||||||
|
|||||||
@@ -2128,7 +2128,7 @@ struct GroupUpdate_Struct_Underfoot { // New for Underfoot
|
|||||||
|
|
||||||
struct GroupMembers_Struct { // New for Underfoot
|
struct GroupMembers_Struct { // New for Underfoot
|
||||||
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
/*0000*/ uint32 membernumber; // Guess - number of member in the group (0 to 5?)
|
||||||
/*0000*/ //char membername[0]; // Member Name Null Terminated
|
/*0000*/ //char member_name[0]; // Member Name Null Terminated
|
||||||
/*0000*/ uint8 unknown001[3]; // Seen 0
|
/*0000*/ uint8 unknown001[3]; // Seen 0
|
||||||
/*0000*/ uint32 memberlevel; // Guess
|
/*0000*/ uint32 memberlevel; // Guess
|
||||||
/*0000*/ uint8 unknown002[11]; // Seen 0
|
/*0000*/ uint8 unknown002[11]; // Seen 0
|
||||||
@@ -2138,7 +2138,7 @@ struct GroupJoin_Struct_Underfoot { // New for Underfoot
|
|||||||
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0000; // Matches unknown0136 from GroupFollow_Struct
|
||||||
/*0004*/ uint32 action;
|
/*0004*/ uint32 action;
|
||||||
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
/*0008*/ uint8 unknown0008[5]; // Seen 0
|
||||||
/*0013*/ //char membername[0]; // Null Terminated?
|
/*0013*/ //char member_name[0]; // Null Terminated?
|
||||||
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
/*0000*/ uint8 unknown0013[3]; // Seen 0
|
||||||
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
/*0000*/ uint32 unknown0016; // Matches unknown0132 from GroupFollow_Struct
|
||||||
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
/*0000*/ uint8 unknown0020[11]; // Seen 0
|
||||||
|
|||||||
+3
-3
@@ -288,9 +288,9 @@ bool PTimerList::Load(Database *db) {
|
|||||||
PersistentTimer *cur;
|
PersistentTimer *cur;
|
||||||
|
|
||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
type = Strings::ToInt(row[0]);
|
type = Strings::ToUnsignedInt(row[0]);
|
||||||
start_time = strtoul(row[1], nullptr, 10);
|
start_time = Strings::ToUnsignedInt(row[1]);
|
||||||
timer_time = strtoul(row[2], nullptr, 10);
|
timer_time = Strings::ToUnsignedInt(row[2]);
|
||||||
enabled = (row[3][0] == '1');
|
enabled = (row[3][0] == '1');
|
||||||
|
|
||||||
//if it expired allready, dont bother.
|
//if it expired allready, dont bother.
|
||||||
|
|||||||
@@ -16,11 +16,12 @@
|
|||||||
#include "../../strings.h"
|
#include "../../strings.h"
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
|
||||||
class BaseDataBucketsRepository {
|
class BaseDataBucketsRepository {
|
||||||
public:
|
public:
|
||||||
struct DataBuckets {
|
struct DataBuckets {
|
||||||
uint64_t id;
|
uint64_t id;
|
||||||
std::string key;
|
std::string key_;
|
||||||
std::string value;
|
std::string value;
|
||||||
uint32_t expires;
|
uint32_t expires;
|
||||||
};
|
};
|
||||||
@@ -34,7 +35,7 @@ public:
|
|||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
"id",
|
"id",
|
||||||
"key",
|
"`key`",
|
||||||
"value",
|
"value",
|
||||||
"expires",
|
"expires",
|
||||||
};
|
};
|
||||||
@@ -44,7 +45,7 @@ public:
|
|||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
"id",
|
"id",
|
||||||
"key",
|
"`key`",
|
||||||
"value",
|
"value",
|
||||||
"expires",
|
"expires",
|
||||||
};
|
};
|
||||||
@@ -88,7 +89,7 @@ public:
|
|||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = 0;
|
e.id = 0;
|
||||||
e.key = "";
|
e.key_ = "";
|
||||||
e.value = "";
|
e.value = "";
|
||||||
e.expires = 0;
|
e.expires = 0;
|
||||||
|
|
||||||
@@ -116,8 +117,9 @@ public:
|
|||||||
{
|
{
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} WHERE id = {} LIMIT 1",
|
"{} WHERE {} = {} LIMIT 1",
|
||||||
BaseSelect(),
|
BaseSelect(),
|
||||||
|
PrimaryKey(),
|
||||||
data_buckets_id
|
data_buckets_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -127,7 +129,7 @@ public:
|
|||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoull(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key_ = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
@@ -163,7 +165,7 @@ public:
|
|||||||
|
|
||||||
auto columns = Columns();
|
auto columns = Columns();
|
||||||
|
|
||||||
v.push_back(columns[1] + " = '" + Strings::Escape(e.key) + "'");
|
v.push_back(columns[1] + " = '" + Strings::Escape(e.key_) + "'");
|
||||||
v.push_back(columns[2] + " = '" + Strings::Escape(e.value) + "'");
|
v.push_back(columns[2] + " = '" + Strings::Escape(e.value) + "'");
|
||||||
v.push_back(columns[3] + " = " + std::to_string(e.expires));
|
v.push_back(columns[3] + " = " + std::to_string(e.expires));
|
||||||
|
|
||||||
@@ -188,7 +190,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back("'" + Strings::Escape(e.key) + "'");
|
v.push_back("'" + Strings::Escape(e.key_) + "'");
|
||||||
v.push_back("'" + Strings::Escape(e.value) + "'");
|
v.push_back("'" + Strings::Escape(e.value) + "'");
|
||||||
v.push_back(std::to_string(e.expires));
|
v.push_back(std::to_string(e.expires));
|
||||||
|
|
||||||
@@ -221,7 +223,7 @@ public:
|
|||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
v.push_back(std::to_string(e.id));
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back("'" + Strings::Escape(e.key) + "'");
|
v.push_back("'" + Strings::Escape(e.key_) + "'");
|
||||||
v.push_back("'" + Strings::Escape(e.value) + "'");
|
v.push_back("'" + Strings::Escape(e.value) + "'");
|
||||||
v.push_back(std::to_string(e.expires));
|
v.push_back(std::to_string(e.expires));
|
||||||
|
|
||||||
@@ -258,7 +260,7 @@ public:
|
|||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoull(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key_ = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
@@ -286,7 +288,7 @@ public:
|
|||||||
DataBuckets e{};
|
DataBuckets e{};
|
||||||
|
|
||||||
e.id = strtoull(row[0], nullptr, 10);
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.key = row[1] ? row[1] : "";
|
e.key_ = row[1] ? row[1] : "";
|
||||||
e.value = row[2] ? row[2] : "";
|
e.value = row[2] ? row[2] : "";
|
||||||
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
e.expires = static_cast<uint32_t>(strtoul(row[3], nullptr, 10));
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public:
|
|||||||
std::string zone_id_list;
|
std::string zone_id_list;
|
||||||
std::string instance_version_list;
|
std::string instance_version_list;
|
||||||
int32_t ac;
|
int32_t ac;
|
||||||
int32_t hp;
|
int64_t hp;
|
||||||
int32_t accuracy;
|
int32_t accuracy;
|
||||||
int32_t slow_mitigation;
|
int32_t slow_mitigation;
|
||||||
int32_t attack;
|
int32_t attack;
|
||||||
@@ -45,10 +45,13 @@ public:
|
|||||||
int32_t physical_resist;
|
int32_t physical_resist;
|
||||||
int32_t min_dmg;
|
int32_t min_dmg;
|
||||||
int32_t max_dmg;
|
int32_t max_dmg;
|
||||||
int32_t hp_regen_rate;
|
int64_t hp_regen_rate;
|
||||||
|
int64_t hp_regen_per_second;
|
||||||
int32_t attack_delay;
|
int32_t attack_delay;
|
||||||
int32_t spell_scale;
|
int32_t spell_scale;
|
||||||
int32_t heal_scale;
|
int32_t heal_scale;
|
||||||
|
uint32_t avoidance;
|
||||||
|
int32_t heroic_strikethrough;
|
||||||
std::string special_abilities;
|
std::string special_abilities;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -86,9 +89,12 @@ public:
|
|||||||
"min_dmg",
|
"min_dmg",
|
||||||
"max_dmg",
|
"max_dmg",
|
||||||
"hp_regen_rate",
|
"hp_regen_rate",
|
||||||
|
"hp_regen_per_second",
|
||||||
"attack_delay",
|
"attack_delay",
|
||||||
"spell_scale",
|
"spell_scale",
|
||||||
"heal_scale",
|
"heal_scale",
|
||||||
|
"avoidance",
|
||||||
|
"heroic_strikethrough",
|
||||||
"special_abilities",
|
"special_abilities",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -122,9 +128,12 @@ public:
|
|||||||
"min_dmg",
|
"min_dmg",
|
||||||
"max_dmg",
|
"max_dmg",
|
||||||
"hp_regen_rate",
|
"hp_regen_rate",
|
||||||
|
"hp_regen_per_second",
|
||||||
"attack_delay",
|
"attack_delay",
|
||||||
"spell_scale",
|
"spell_scale",
|
||||||
"heal_scale",
|
"heal_scale",
|
||||||
|
"avoidance",
|
||||||
|
"heroic_strikethrough",
|
||||||
"special_abilities",
|
"special_abilities",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -192,9 +201,12 @@ public:
|
|||||||
e.min_dmg = 0;
|
e.min_dmg = 0;
|
||||||
e.max_dmg = 0;
|
e.max_dmg = 0;
|
||||||
e.hp_regen_rate = 0;
|
e.hp_regen_rate = 0;
|
||||||
|
e.hp_regen_per_second = 0;
|
||||||
e.attack_delay = 0;
|
e.attack_delay = 0;
|
||||||
e.spell_scale = 100;
|
e.spell_scale = 100;
|
||||||
e.heal_scale = 100;
|
e.heal_scale = 100;
|
||||||
|
e.avoidance = 0;
|
||||||
|
e.heroic_strikethrough = 0;
|
||||||
e.special_abilities = "";
|
e.special_abilities = "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
@@ -237,7 +249,7 @@ public:
|
|||||||
e.zone_id_list = row[2] ? row[2] : "";
|
e.zone_id_list = row[2] ? row[2] : "";
|
||||||
e.instance_version_list = row[3] ? row[3] : "";
|
e.instance_version_list = row[3] ? row[3] : "";
|
||||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
e.hp = strtoll(row[5], nullptr, 10);
|
||||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||||
@@ -257,11 +269,14 @@ public:
|
|||||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||||
e.hp_regen_rate = static_cast<int32_t>(atoi(row[25]));
|
e.hp_regen_rate = strtoll(row[25], nullptr, 10);
|
||||||
e.attack_delay = static_cast<int32_t>(atoi(row[26]));
|
e.hp_regen_per_second = strtoll(row[26], nullptr, 10);
|
||||||
e.spell_scale = static_cast<int32_t>(atoi(row[27]));
|
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||||
e.heal_scale = static_cast<int32_t>(atoi(row[28]));
|
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||||
e.special_abilities = row[29] ? row[29] : "";
|
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||||
|
e.avoidance = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
|
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||||
|
e.special_abilities = row[32] ? row[32] : "";
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@@ -321,10 +336,13 @@ public:
|
|||||||
v.push_back(columns[23] + " = " + std::to_string(e.min_dmg));
|
v.push_back(columns[23] + " = " + std::to_string(e.min_dmg));
|
||||||
v.push_back(columns[24] + " = " + std::to_string(e.max_dmg));
|
v.push_back(columns[24] + " = " + std::to_string(e.max_dmg));
|
||||||
v.push_back(columns[25] + " = " + std::to_string(e.hp_regen_rate));
|
v.push_back(columns[25] + " = " + std::to_string(e.hp_regen_rate));
|
||||||
v.push_back(columns[26] + " = " + std::to_string(e.attack_delay));
|
v.push_back(columns[26] + " = " + std::to_string(e.hp_regen_per_second));
|
||||||
v.push_back(columns[27] + " = " + std::to_string(e.spell_scale));
|
v.push_back(columns[27] + " = " + std::to_string(e.attack_delay));
|
||||||
v.push_back(columns[28] + " = " + std::to_string(e.heal_scale));
|
v.push_back(columns[28] + " = " + std::to_string(e.spell_scale));
|
||||||
v.push_back(columns[29] + " = '" + Strings::Escape(e.special_abilities) + "'");
|
v.push_back(columns[29] + " = " + std::to_string(e.heal_scale));
|
||||||
|
v.push_back(columns[30] + " = " + std::to_string(e.avoidance));
|
||||||
|
v.push_back(columns[31] + " = " + std::to_string(e.heroic_strikethrough));
|
||||||
|
v.push_back(columns[32] + " = '" + Strings::Escape(e.special_abilities) + "'");
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@@ -372,9 +390,12 @@ public:
|
|||||||
v.push_back(std::to_string(e.min_dmg));
|
v.push_back(std::to_string(e.min_dmg));
|
||||||
v.push_back(std::to_string(e.max_dmg));
|
v.push_back(std::to_string(e.max_dmg));
|
||||||
v.push_back(std::to_string(e.hp_regen_rate));
|
v.push_back(std::to_string(e.hp_regen_rate));
|
||||||
|
v.push_back(std::to_string(e.hp_regen_per_second));
|
||||||
v.push_back(std::to_string(e.attack_delay));
|
v.push_back(std::to_string(e.attack_delay));
|
||||||
v.push_back(std::to_string(e.spell_scale));
|
v.push_back(std::to_string(e.spell_scale));
|
||||||
v.push_back(std::to_string(e.heal_scale));
|
v.push_back(std::to_string(e.heal_scale));
|
||||||
|
v.push_back(std::to_string(e.avoidance));
|
||||||
|
v.push_back(std::to_string(e.heroic_strikethrough));
|
||||||
v.push_back("'" + Strings::Escape(e.special_abilities) + "'");
|
v.push_back("'" + Strings::Escape(e.special_abilities) + "'");
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
@@ -431,9 +452,12 @@ public:
|
|||||||
v.push_back(std::to_string(e.min_dmg));
|
v.push_back(std::to_string(e.min_dmg));
|
||||||
v.push_back(std::to_string(e.max_dmg));
|
v.push_back(std::to_string(e.max_dmg));
|
||||||
v.push_back(std::to_string(e.hp_regen_rate));
|
v.push_back(std::to_string(e.hp_regen_rate));
|
||||||
|
v.push_back(std::to_string(e.hp_regen_per_second));
|
||||||
v.push_back(std::to_string(e.attack_delay));
|
v.push_back(std::to_string(e.attack_delay));
|
||||||
v.push_back(std::to_string(e.spell_scale));
|
v.push_back(std::to_string(e.spell_scale));
|
||||||
v.push_back(std::to_string(e.heal_scale));
|
v.push_back(std::to_string(e.heal_scale));
|
||||||
|
v.push_back(std::to_string(e.avoidance));
|
||||||
|
v.push_back(std::to_string(e.heroic_strikethrough));
|
||||||
v.push_back("'" + Strings::Escape(e.special_abilities) + "'");
|
v.push_back("'" + Strings::Escape(e.special_abilities) + "'");
|
||||||
|
|
||||||
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
insert_chunks.push_back("(" + Strings::Implode(",", v) + ")");
|
||||||
@@ -473,7 +497,7 @@ public:
|
|||||||
e.zone_id_list = row[2] ? row[2] : "";
|
e.zone_id_list = row[2] ? row[2] : "";
|
||||||
e.instance_version_list = row[3] ? row[3] : "";
|
e.instance_version_list = row[3] ? row[3] : "";
|
||||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
e.hp = strtoll(row[5], nullptr, 10);
|
||||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||||
@@ -493,11 +517,14 @@ public:
|
|||||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||||
e.hp_regen_rate = static_cast<int32_t>(atoi(row[25]));
|
e.hp_regen_rate = strtoll(row[25], nullptr, 10);
|
||||||
e.attack_delay = static_cast<int32_t>(atoi(row[26]));
|
e.hp_regen_per_second = strtoll(row[26], nullptr, 10);
|
||||||
e.spell_scale = static_cast<int32_t>(atoi(row[27]));
|
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||||
e.heal_scale = static_cast<int32_t>(atoi(row[28]));
|
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||||
e.special_abilities = row[29] ? row[29] : "";
|
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||||
|
e.avoidance = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
|
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||||
|
e.special_abilities = row[32] ? row[32] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@@ -527,7 +554,7 @@ public:
|
|||||||
e.zone_id_list = row[2] ? row[2] : "";
|
e.zone_id_list = row[2] ? row[2] : "";
|
||||||
e.instance_version_list = row[3] ? row[3] : "";
|
e.instance_version_list = row[3] ? row[3] : "";
|
||||||
e.ac = static_cast<int32_t>(atoi(row[4]));
|
e.ac = static_cast<int32_t>(atoi(row[4]));
|
||||||
e.hp = static_cast<int32_t>(atoi(row[5]));
|
e.hp = strtoll(row[5], nullptr, 10);
|
||||||
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
e.accuracy = static_cast<int32_t>(atoi(row[6]));
|
||||||
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
e.slow_mitigation = static_cast<int32_t>(atoi(row[7]));
|
||||||
e.attack = static_cast<int32_t>(atoi(row[8]));
|
e.attack = static_cast<int32_t>(atoi(row[8]));
|
||||||
@@ -547,11 +574,14 @@ public:
|
|||||||
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
e.physical_resist = static_cast<int32_t>(atoi(row[22]));
|
||||||
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
e.min_dmg = static_cast<int32_t>(atoi(row[23]));
|
||||||
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
e.max_dmg = static_cast<int32_t>(atoi(row[24]));
|
||||||
e.hp_regen_rate = static_cast<int32_t>(atoi(row[25]));
|
e.hp_regen_rate = strtoll(row[25], nullptr, 10);
|
||||||
e.attack_delay = static_cast<int32_t>(atoi(row[26]));
|
e.hp_regen_per_second = strtoll(row[26], nullptr, 10);
|
||||||
e.spell_scale = static_cast<int32_t>(atoi(row[27]));
|
e.attack_delay = static_cast<int32_t>(atoi(row[27]));
|
||||||
e.heal_scale = static_cast<int32_t>(atoi(row[28]));
|
e.spell_scale = static_cast<int32_t>(atoi(row[28]));
|
||||||
e.special_abilities = row[29] ? row[29] : "";
|
e.heal_scale = static_cast<int32_t>(atoi(row[29]));
|
||||||
|
e.avoidance = static_cast<uint32_t>(strtoul(row[30], nullptr, 10));
|
||||||
|
e.heroic_strikethrough = static_cast<int32_t>(atoi(row[31]));
|
||||||
|
e.special_abilities = row[32] ? row[32] : "";
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,11 +16,14 @@
|
|||||||
#include "../../strings.h"
|
#include "../../strings.h"
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
|
|
||||||
|
|
||||||
class BaseRaidMembersRepository {
|
class BaseRaidMembersRepository {
|
||||||
public:
|
public:
|
||||||
struct RaidMembers {
|
struct RaidMembers {
|
||||||
|
uint64_t id;
|
||||||
int32_t raidid;
|
int32_t raidid;
|
||||||
int32_t charid;
|
int32_t charid;
|
||||||
|
int32_t bot_id;
|
||||||
uint32_t groupid;
|
uint32_t groupid;
|
||||||
int8_t _class;
|
int8_t _class;
|
||||||
int8_t level;
|
int8_t level;
|
||||||
@@ -32,14 +35,16 @@ public:
|
|||||||
|
|
||||||
static std::string PrimaryKey()
|
static std::string PrimaryKey()
|
||||||
{
|
{
|
||||||
return std::string("charid");
|
return std::string("id");
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::vector<std::string> Columns()
|
static std::vector<std::string> Columns()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
"id",
|
||||||
"raidid",
|
"raidid",
|
||||||
"charid",
|
"charid",
|
||||||
|
"bot_id",
|
||||||
"groupid",
|
"groupid",
|
||||||
"_class",
|
"_class",
|
||||||
"level",
|
"level",
|
||||||
@@ -53,8 +58,10 @@ public:
|
|||||||
static std::vector<std::string> SelectColumns()
|
static std::vector<std::string> SelectColumns()
|
||||||
{
|
{
|
||||||
return {
|
return {
|
||||||
|
"id",
|
||||||
"raidid",
|
"raidid",
|
||||||
"charid",
|
"charid",
|
||||||
|
"bot_id",
|
||||||
"groupid",
|
"groupid",
|
||||||
"_class",
|
"_class",
|
||||||
"level",
|
"level",
|
||||||
@@ -102,8 +109,10 @@ public:
|
|||||||
{
|
{
|
||||||
RaidMembers e{};
|
RaidMembers e{};
|
||||||
|
|
||||||
|
e.id = 0;
|
||||||
e.raidid = 0;
|
e.raidid = 0;
|
||||||
e.charid = 0;
|
e.charid = 0;
|
||||||
|
e.bot_id = 0;
|
||||||
e.groupid = 0;
|
e.groupid = 0;
|
||||||
e._class = 0;
|
e._class = 0;
|
||||||
e.level = 0;
|
e.level = 0;
|
||||||
@@ -121,7 +130,7 @@ public:
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
for (auto &raid_members : raid_memberss) {
|
for (auto &raid_members : raid_memberss) {
|
||||||
if (raid_members.charid == raid_members_id) {
|
if (raid_members.id == raid_members_id) {
|
||||||
return raid_members;
|
return raid_members;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -136,8 +145,9 @@ public:
|
|||||||
{
|
{
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
"{} WHERE id = {} LIMIT 1",
|
"{} WHERE {} = {} LIMIT 1",
|
||||||
BaseSelect(),
|
BaseSelect(),
|
||||||
|
PrimaryKey(),
|
||||||
raid_members_id
|
raid_members_id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
@@ -146,15 +156,17 @@ public:
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
RaidMembers e{};
|
RaidMembers e{};
|
||||||
|
|
||||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
e.raidid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.groupid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
e.charid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e._class = static_cast<int8_t>(atoi(row[3]));
|
e.bot_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.level = static_cast<int8_t>(atoi(row[4]));
|
e.groupid = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.name = row[5] ? row[5] : "";
|
e._class = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.isgroupleader = static_cast<int8_t>(atoi(row[6]));
|
e.level = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.israidleader = static_cast<int8_t>(atoi(row[7]));
|
e.name = row[7] ? row[7] : "";
|
||||||
e.islooter = static_cast<int8_t>(atoi(row[8]));
|
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||||
|
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||||
|
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
@@ -188,15 +200,16 @@ public:
|
|||||||
|
|
||||||
auto columns = Columns();
|
auto columns = Columns();
|
||||||
|
|
||||||
v.push_back(columns[0] + " = " + std::to_string(e.raidid));
|
v.push_back(columns[1] + " = " + std::to_string(e.raidid));
|
||||||
v.push_back(columns[1] + " = " + std::to_string(e.charid));
|
v.push_back(columns[2] + " = " + std::to_string(e.charid));
|
||||||
v.push_back(columns[2] + " = " + std::to_string(e.groupid));
|
v.push_back(columns[3] + " = " + std::to_string(e.bot_id));
|
||||||
v.push_back(columns[3] + " = " + std::to_string(e._class));
|
v.push_back(columns[4] + " = " + std::to_string(e.groupid));
|
||||||
v.push_back(columns[4] + " = " + std::to_string(e.level));
|
v.push_back(columns[5] + " = " + std::to_string(e._class));
|
||||||
v.push_back(columns[5] + " = '" + Strings::Escape(e.name) + "'");
|
v.push_back(columns[6] + " = " + std::to_string(e.level));
|
||||||
v.push_back(columns[6] + " = " + std::to_string(e.isgroupleader));
|
v.push_back(columns[7] + " = '" + Strings::Escape(e.name) + "'");
|
||||||
v.push_back(columns[7] + " = " + std::to_string(e.israidleader));
|
v.push_back(columns[8] + " = " + std::to_string(e.isgroupleader));
|
||||||
v.push_back(columns[8] + " = " + std::to_string(e.islooter));
|
v.push_back(columns[9] + " = " + std::to_string(e.israidleader));
|
||||||
|
v.push_back(columns[10] + " = " + std::to_string(e.islooter));
|
||||||
|
|
||||||
auto results = db.QueryDatabase(
|
auto results = db.QueryDatabase(
|
||||||
fmt::format(
|
fmt::format(
|
||||||
@@ -204,7 +217,7 @@ public:
|
|||||||
TableName(),
|
TableName(),
|
||||||
Strings::Implode(", ", v),
|
Strings::Implode(", ", v),
|
||||||
PrimaryKey(),
|
PrimaryKey(),
|
||||||
e.charid
|
e.id
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -218,8 +231,10 @@ public:
|
|||||||
{
|
{
|
||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.raidid));
|
v.push_back(std::to_string(e.raidid));
|
||||||
v.push_back(std::to_string(e.charid));
|
v.push_back(std::to_string(e.charid));
|
||||||
|
v.push_back(std::to_string(e.bot_id));
|
||||||
v.push_back(std::to_string(e.groupid));
|
v.push_back(std::to_string(e.groupid));
|
||||||
v.push_back(std::to_string(e._class));
|
v.push_back(std::to_string(e._class));
|
||||||
v.push_back(std::to_string(e.level));
|
v.push_back(std::to_string(e.level));
|
||||||
@@ -237,7 +252,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (results.Success()) {
|
if (results.Success()) {
|
||||||
e.charid = results.LastInsertedID();
|
e.id = results.LastInsertedID();
|
||||||
return e;
|
return e;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -256,8 +271,10 @@ public:
|
|||||||
for (auto &e: entries) {
|
for (auto &e: entries) {
|
||||||
std::vector<std::string> v;
|
std::vector<std::string> v;
|
||||||
|
|
||||||
|
v.push_back(std::to_string(e.id));
|
||||||
v.push_back(std::to_string(e.raidid));
|
v.push_back(std::to_string(e.raidid));
|
||||||
v.push_back(std::to_string(e.charid));
|
v.push_back(std::to_string(e.charid));
|
||||||
|
v.push_back(std::to_string(e.bot_id));
|
||||||
v.push_back(std::to_string(e.groupid));
|
v.push_back(std::to_string(e.groupid));
|
||||||
v.push_back(std::to_string(e._class));
|
v.push_back(std::to_string(e._class));
|
||||||
v.push_back(std::to_string(e.level));
|
v.push_back(std::to_string(e.level));
|
||||||
@@ -298,15 +315,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
RaidMembers e{};
|
RaidMembers e{};
|
||||||
|
|
||||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
e.raidid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.groupid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
e.charid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e._class = static_cast<int8_t>(atoi(row[3]));
|
e.bot_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.level = static_cast<int8_t>(atoi(row[4]));
|
e.groupid = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.name = row[5] ? row[5] : "";
|
e._class = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.isgroupleader = static_cast<int8_t>(atoi(row[6]));
|
e.level = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.israidleader = static_cast<int8_t>(atoi(row[7]));
|
e.name = row[7] ? row[7] : "";
|
||||||
e.islooter = static_cast<int8_t>(atoi(row[8]));
|
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||||
|
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
@@ -331,15 +350,17 @@ public:
|
|||||||
for (auto row = results.begin(); row != results.end(); ++row) {
|
for (auto row = results.begin(); row != results.end(); ++row) {
|
||||||
RaidMembers e{};
|
RaidMembers e{};
|
||||||
|
|
||||||
e.raidid = static_cast<int32_t>(atoi(row[0]));
|
e.id = strtoull(row[0], nullptr, 10);
|
||||||
e.charid = static_cast<int32_t>(atoi(row[1]));
|
e.raidid = static_cast<int32_t>(atoi(row[1]));
|
||||||
e.groupid = static_cast<uint32_t>(strtoul(row[2], nullptr, 10));
|
e.charid = static_cast<int32_t>(atoi(row[2]));
|
||||||
e._class = static_cast<int8_t>(atoi(row[3]));
|
e.bot_id = static_cast<int32_t>(atoi(row[3]));
|
||||||
e.level = static_cast<int8_t>(atoi(row[4]));
|
e.groupid = static_cast<uint32_t>(strtoul(row[4], nullptr, 10));
|
||||||
e.name = row[5] ? row[5] : "";
|
e._class = static_cast<int8_t>(atoi(row[5]));
|
||||||
e.isgroupleader = static_cast<int8_t>(atoi(row[6]));
|
e.level = static_cast<int8_t>(atoi(row[6]));
|
||||||
e.israidleader = static_cast<int8_t>(atoi(row[7]));
|
e.name = row[7] ? row[7] : "";
|
||||||
e.islooter = static_cast<int8_t>(atoi(row[8]));
|
e.isgroupleader = static_cast<int8_t>(atoi(row[8]));
|
||||||
|
e.israidleader = static_cast<int8_t>(atoi(row[9]));
|
||||||
|
e.islooter = static_cast<int8_t>(atoi(row[10]));
|
||||||
|
|
||||||
all_entries.push_back(e);
|
all_entries.push_back(e);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -141,11 +141,11 @@ bool RuleManager::SetRule(const std::string &rule_name, const std::string &rule_
|
|||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case IntRule:
|
case IntRule:
|
||||||
m_RuleIntValues[index] = Strings::ToInt(rule_value.c_str());
|
m_RuleIntValues[index] = Strings::ToInt(rule_value);
|
||||||
LogRules("Set rule [{}] to value [{}]", rule_name, m_RuleIntValues[index]);
|
LogRules("Set rule [{}] to value [{}]", rule_name, m_RuleIntValues[index]);
|
||||||
break;
|
break;
|
||||||
case RealRule:
|
case RealRule:
|
||||||
m_RuleRealValues[index] = Strings::ToFloat(rule_value.c_str());
|
m_RuleRealValues[index] = Strings::ToFloat(rule_value);
|
||||||
LogRules("Set rule [{}] to value [{:.2f}]", rule_name, m_RuleRealValues[index]);
|
LogRules("Set rule [{}] to value [{:.2f}]", rule_name, m_RuleRealValues[index]);
|
||||||
break;
|
break;
|
||||||
case BoolRule:
|
case BoolRule:
|
||||||
|
|||||||
+6
-1
@@ -93,6 +93,9 @@ RULE_INT(Character, ItemEnduranceRegenCap, 15, "Limit on endurance regeneration
|
|||||||
RULE_INT(Character, ItemExtraDmgCap, 150, "Cap for bonuses to melee skills like Bash, Frenzy, etc.")
|
RULE_INT(Character, ItemExtraDmgCap, 150, "Cap for bonuses to melee skills like Bash, Frenzy, etc.")
|
||||||
RULE_INT(Character, HasteCap, 100, "Haste cap for non-v3(over haste) haste")
|
RULE_INT(Character, HasteCap, 100, "Haste cap for non-v3(over haste) haste")
|
||||||
RULE_INT(Character, Hastev3Cap, 25, "Haste cap for v3(over haste) haste")
|
RULE_INT(Character, Hastev3Cap, 25, "Haste cap for v3(over haste) haste")
|
||||||
|
RULE_BOOL(Character, HeroicStatsUseDataBucketsToScale, false, "Allows scaling the benefits a character receives from Heroic Stats using Data Buckets. Stacks with other Heroic Stats Mulitplier Rules.")
|
||||||
|
RULE_REAL(Character, HeroicIntelligenceIncreaseSpellDmgMultiplier, 0.00, "Allows Heroic Intelligence to increase a Players Worn Spell Damage Stat from Equipment, for example, setting this rule to 1.00 will always grant 1 Spell Damage per 1 Heroic Intelligence")
|
||||||
|
RULE_REAL(Character, HeroicWisdomIncreaseHealAmtMultiplier, 0.00, "Allows Heroic Wisdom to increase a Players Worn Heal Amount Stat from Equipment, for example, setting this rule to 1.00 will always grant 1 Heal Amount per 1 Heroic Wisdom")
|
||||||
RULE_REAL(Character, HeroicStrengthMultiplier, 1.00, "Multplier scales benefits from Heroic Strength. Grants 25 Base Endurance, 0.05 Endurance Regen, 1 Melee Damage each Hit, and 1 Shield AC per 10 Heroic Strength.")
|
RULE_REAL(Character, HeroicStrengthMultiplier, 1.00, "Multplier scales benefits from Heroic Strength. Grants 25 Base Endurance, 0.05 Endurance Regen, 1 Melee Damage each Hit, and 1 Shield AC per 10 Heroic Strength.")
|
||||||
RULE_REAL(Character, HeroicStaminaMultiplier, 1.00, "Multplier scales benefits from Heroic Stamina. Grants 25 Base Endurance, 0.05 Endurance Regen, 100 Base HP, and 0.5 HP Regen per 10 Heroic Stamina.")
|
RULE_REAL(Character, HeroicStaminaMultiplier, 1.00, "Multplier scales benefits from Heroic Stamina. Grants 25 Base Endurance, 0.05 Endurance Regen, 100 Base HP, and 0.5 HP Regen per 10 Heroic Stamina.")
|
||||||
RULE_REAL(Character, HeroicAgilityMultiplier, 1.00, "Multplier scales benefits from Heroic Agility. Grants 25 Base Endurance, 0.05 Endurance Regen, and 1 Avoidance AC per 10 Heroic Agility. (Rule does not change Dodge Chance)")
|
RULE_REAL(Character, HeroicAgilityMultiplier, 1.00, "Multplier scales benefits from Heroic Agility. Grants 25 Base Endurance, 0.05 Endurance Regen, and 1 Avoidance AC per 10 Heroic Agility. (Rule does not change Dodge Chance)")
|
||||||
@@ -211,6 +214,7 @@ RULE_BOOL(Character, IgnoreLevelBasedHasteCaps, false, "Ignores hard coded level
|
|||||||
RULE_BOOL(Character, EnableRaidEXPModifier, true, "Enable or disable the raid experience modifier, default is true")
|
RULE_BOOL(Character, EnableRaidEXPModifier, true, "Enable or disable the raid experience modifier, default is true")
|
||||||
RULE_BOOL(Character, EnableRaidMemberEXPModifier, true, "Enable or disable the raid experience modifier based on members in raid, default is true")
|
RULE_BOOL(Character, EnableRaidMemberEXPModifier, true, "Enable or disable the raid experience modifier based on members in raid, default is true")
|
||||||
RULE_BOOL(Character, LeaveCursorMoneyOnCorpse, false, "Enable or disable leaving cursor money on player corpses")
|
RULE_BOOL(Character, LeaveCursorMoneyOnCorpse, false, "Enable or disable leaving cursor money on player corpses")
|
||||||
|
RULE_BOOL(Character, ItemExtraSkillDamageCalcAsPercent, false, "If enabled, apply Item Extra Skill Damage as Percentage-based modifiers")
|
||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Mercs)
|
RULE_CATEGORY(Mercs)
|
||||||
@@ -270,7 +274,6 @@ RULE_BOOL(World, EnableTutorialButton, true, "Setting whether the Tutorial butto
|
|||||||
RULE_BOOL(World, EnableReturnHomeButton, true, "Setting whether the Return Home button should be active")
|
RULE_BOOL(World, EnableReturnHomeButton, true, "Setting whether the Return Home button should be active")
|
||||||
RULE_INT(World, MaxLevelForTutorial, 10, "The highest level with which you can enter the tutorial")
|
RULE_INT(World, MaxLevelForTutorial, 10, "The highest level with which you can enter the tutorial")
|
||||||
RULE_INT(World, TutorialZoneID, 189, "Zone ID of the tutorial")
|
RULE_INT(World, TutorialZoneID, 189, "Zone ID of the tutorial")
|
||||||
RULE_INT(World, GuildBankZoneID, 345, "Zone ID of the guild bank")
|
|
||||||
RULE_INT(World, MinOfflineTimeToReturnHome, 21600, "Minimum offline time to activate the Return Home button. 21600 seconds is 6 Hours")
|
RULE_INT(World, MinOfflineTimeToReturnHome, 21600, "Minimum offline time to activate the Return Home button. 21600 seconds is 6 Hours")
|
||||||
RULE_INT(World, MaxClientsPerIP, -1, "Maximum number of clients allowed to connect per IP address if account status is < AddMaxClientsStatus. Default value: -1 (feature disabled)")
|
RULE_INT(World, MaxClientsPerIP, -1, "Maximum number of clients allowed to connect per IP address if account status is < AddMaxClientsStatus. Default value: -1 (feature disabled)")
|
||||||
RULE_INT(World, ExemptMaxClientsStatus, -1, "Exempt accounts from the MaxClientsPerIP and AddMaxClientsStatus rules, if their status is >= this value. Default value: -1 (feature disabled)")
|
RULE_INT(World, ExemptMaxClientsStatus, -1, "Exempt accounts from the MaxClientsPerIP and AddMaxClientsStatus rules, if their status is >= this value. Default value: -1 (feature disabled)")
|
||||||
@@ -350,6 +353,7 @@ RULE_REAL(Watermap, FishingLineStepSize, 1, "Basic step size for fishing calc, t
|
|||||||
RULE_CATEGORY_END()
|
RULE_CATEGORY_END()
|
||||||
|
|
||||||
RULE_CATEGORY(Spells)
|
RULE_CATEGORY(Spells)
|
||||||
|
RULE_BOOL(Spells, AllowExtraDmgSkill, false, "Allow ExtraDmgSkill from Items, Spells, and AAs to apply ExtraDmgAmt when the ExtraDmgSkill matches the casted Spells Skill Type.")
|
||||||
RULE_INT(Spells, BaseCritChance, 0, "Base percentage chance that everyone has to crit a spell")
|
RULE_INT(Spells, BaseCritChance, 0, "Base percentage chance that everyone has to crit a spell")
|
||||||
RULE_INT(Spells, BaseCritRatio, 100, "Base percentage bonus to damage on a successful spell crit. 100=2xdamage")
|
RULE_INT(Spells, BaseCritRatio, 100, "Base percentage bonus to damage on a successful spell crit. 100=2xdamage")
|
||||||
RULE_INT(Spells, WizCritLevel, 12, "Level wizards first get spell crits")
|
RULE_INT(Spells, WizCritLevel, 12, "Level wizards first get spell crits")
|
||||||
@@ -578,6 +582,7 @@ RULE_BOOL(TaskSystem, RecordCompletedOptionalActivities, false, "Record complete
|
|||||||
RULE_BOOL(TaskSystem, KeepOneRecordPerCompletedTask, true, "Keep only one record per completed task")
|
RULE_BOOL(TaskSystem, KeepOneRecordPerCompletedTask, true, "Keep only one record per completed task")
|
||||||
RULE_BOOL(TaskSystem, EnableTaskProximity, true, "Enable task proximity system")
|
RULE_BOOL(TaskSystem, EnableTaskProximity, true, "Enable task proximity system")
|
||||||
RULE_INT(TaskSystem, RequestCooldownTimerSeconds, 15, "Seconds between allowing characters to request tasks (live-like default: 15 seconds)")
|
RULE_INT(TaskSystem, RequestCooldownTimerSeconds, 15, "Seconds between allowing characters to request tasks (live-like default: 15 seconds)")
|
||||||
|
RULE_BOOL(TaskSystem, ExpRewardsIgnoreLevelBasedEXPMods, false, "Rewarding Level Based Exp will ignore Rule LevelBasedEXPMods if true")
|
||||||
RULE_INT(TaskSystem, SharedTasksWorldProcessRate, 6000, "Timer interval (milliseconds) that shared tasks are processed in world")
|
RULE_INT(TaskSystem, SharedTasksWorldProcessRate, 6000, "Timer interval (milliseconds) that shared tasks are processed in world")
|
||||||
RULE_INT(TaskSystem, SharedTasksTerminateTimerMS, 120000, "Delay (milliseconds) until a shared task is terminated if requirements are no longer met after member removal (default: 2 minutes)")
|
RULE_INT(TaskSystem, SharedTasksTerminateTimerMS, 120000, "Delay (milliseconds) until a shared task is terminated if requirements are no longer met after member removal (default: 2 minutes)")
|
||||||
RULE_BOOL(TaskSystem, UpdateOneElementPerTask, true, "If true (live-like) task updates only increment the first matching activity. If false all matching elements will be incremented.")
|
RULE_BOOL(TaskSystem, UpdateOneElementPerTask, true, "If true (live-like) task updates only increment the first matching activity. If false all matching elements will be incremented.")
|
||||||
|
|||||||
+2
-1
@@ -99,8 +99,9 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
~Seperator() {
|
~Seperator() {
|
||||||
for (int i=0; i<=maxargnum; i++)
|
for (int i=0; i<=maxargnum; i++) {
|
||||||
safe_delete_array(arg[i]);
|
safe_delete_array(arg[i]);
|
||||||
|
}
|
||||||
safe_delete_array(arg);
|
safe_delete_array(arg);
|
||||||
safe_delete_array(argplus);
|
safe_delete_array(argplus);
|
||||||
safe_delete_array(msg);
|
safe_delete_array(msg);
|
||||||
|
|||||||
+137
-183
@@ -126,7 +126,7 @@ uint32 SharedDatabase::GetTotalTimeEntitledOnAccount(uint32 AccountID) {
|
|||||||
const std::string query = StringFormat("SELECT `time_played` FROM `character_data` WHERE `account_id` = %u", AccountID);
|
const std::string query = StringFormat("SELECT `time_played` FROM `character_data` WHERE `account_id` = %u", AccountID);
|
||||||
auto results = QueryDatabase(query);
|
auto results = QueryDatabase(query);
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
EntitledTime += Strings::ToInt(row[0]);
|
EntitledTime += Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
return EntitledTime;
|
return EntitledTime;
|
||||||
}
|
}
|
||||||
@@ -228,8 +228,8 @@ bool SharedDatabase::VerifyInventory(uint32 account_id, int16 slot_id, const EQ:
|
|||||||
|
|
||||||
auto& row = results.begin();
|
auto& row = results.begin();
|
||||||
|
|
||||||
const uint32 id = Strings::ToInt(row[0]);
|
const uint32 id = Strings::ToUnsignedInt(row[0]);
|
||||||
const uint16 charges = Strings::ToInt(row[1]);
|
const uint16 charges = Strings::ToUnsignedInt(row[1]);
|
||||||
|
|
||||||
uint16 expect_charges;
|
uint16 expect_charges;
|
||||||
|
|
||||||
@@ -519,16 +519,16 @@ bool SharedDatabase::GetSharedBank(uint32 id, EQ::InventoryProfile *inv, bool is
|
|||||||
|
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
int16 slot_id = static_cast<int16>(Strings::ToInt(row[0]));
|
int16 slot_id = static_cast<int16>(Strings::ToInt(row[0]));
|
||||||
uint32 item_id = static_cast<uint32>(Strings::ToInt(row[1]));
|
uint32 item_id = Strings::ToUnsignedInt(row[1]);
|
||||||
const int16 charges = static_cast<int16>(Strings::ToInt(row[2]));
|
const int16 charges = static_cast<int16>(Strings::ToInt(row[2]));
|
||||||
|
|
||||||
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
||||||
aug[0] = static_cast<uint32>(Strings::ToInt(row[3]));
|
aug[0] = Strings::ToUnsignedInt(row[3]);
|
||||||
aug[1] = static_cast<uint32>(Strings::ToInt(row[4]));
|
aug[1] = Strings::ToUnsignedInt(row[4]);
|
||||||
aug[2] = static_cast<uint32>(Strings::ToInt(row[5]));
|
aug[2] = Strings::ToUnsignedInt(row[5]);
|
||||||
aug[3] = static_cast<uint32>(Strings::ToInt(row[6]));
|
aug[3] = Strings::ToUnsignedInt(row[6]);
|
||||||
aug[4] = static_cast<uint32>(Strings::ToInt(row[7]));
|
aug[4] = Strings::ToUnsignedInt(row[7]);
|
||||||
aug[5] = static_cast<uint32>(Strings::ToInt(row[8]));
|
aug[5] = Strings::ToUnsignedInt(row[8]);
|
||||||
|
|
||||||
const EQ::ItemData *item = GetItem(item_id);
|
const EQ::ItemData *item = GetItem(item_id);
|
||||||
|
|
||||||
@@ -548,27 +548,7 @@ bool SharedDatabase::GetSharedBank(uint32 id, EQ::InventoryProfile *inv, bool is
|
|||||||
|
|
||||||
if (inst && row[9]) {
|
if (inst && row[9]) {
|
||||||
std::string data_str(row[9]);
|
std::string data_str(row[9]);
|
||||||
std::string idAsString;
|
inst->SetCustomDataString(data_str);
|
||||||
std::string value;
|
|
||||||
bool use_id = true;
|
|
||||||
|
|
||||||
for (int i = 0; i < data_str.length(); ++i) {
|
|
||||||
if (data_str[i] == '^') {
|
|
||||||
if (!use_id) {
|
|
||||||
inst->SetCustomData(idAsString, value);
|
|
||||||
idAsString.clear();
|
|
||||||
value.clear();
|
|
||||||
}
|
|
||||||
use_id = !use_id;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char v = data_str[i];
|
|
||||||
if (use_id)
|
|
||||||
idAsString.push_back(v);
|
|
||||||
else
|
|
||||||
value.push_back(v);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// theoretically inst can be nullptr ... this would be very bad ...
|
// theoretically inst can be nullptr ... this would be very bad ...
|
||||||
@@ -645,8 +625,8 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQ::InventoryProfile *inv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32 item_id = Strings::ToInt(row[1]);
|
uint32 item_id = Strings::ToUnsignedInt(row[1]);
|
||||||
const uint16 charges = Strings::ToInt(row[2]);
|
const uint16 charges = Strings::ToUnsignedInt(row[2]);
|
||||||
const uint32 color = Strings::ToUnsignedInt(row[3]);
|
const uint32 color = Strings::ToUnsignedInt(row[3]);
|
||||||
|
|
||||||
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
||||||
@@ -658,7 +638,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQ::InventoryProfile *inv)
|
|||||||
aug[4] = Strings::ToUnsignedInt(row[8]);
|
aug[4] = Strings::ToUnsignedInt(row[8]);
|
||||||
aug[5] = Strings::ToUnsignedInt(row[9]);
|
aug[5] = Strings::ToUnsignedInt(row[9]);
|
||||||
|
|
||||||
const bool instnodrop = (row[10] && static_cast<uint16>(Strings::ToInt(row[10]))) ? true : false;
|
const bool instnodrop = (row[10] && static_cast<uint16>(Strings::ToUnsignedInt(row[10])));
|
||||||
|
|
||||||
const uint32 ornament_icon = Strings::ToUnsignedInt(row[12]);
|
const uint32 ornament_icon = Strings::ToUnsignedInt(row[12]);
|
||||||
const uint32 ornament_idfile = Strings::ToUnsignedInt(row[13]);
|
const uint32 ornament_idfile = Strings::ToUnsignedInt(row[13]);
|
||||||
@@ -679,28 +659,7 @@ bool SharedDatabase::GetInventory(uint32 char_id, EQ::InventoryProfile *inv)
|
|||||||
|
|
||||||
if (row[11]) {
|
if (row[11]) {
|
||||||
std::string data_str(row[11]);
|
std::string data_str(row[11]);
|
||||||
std::string idAsString;
|
inst->SetCustomDataString(data_str);
|
||||||
std::string value;
|
|
||||||
bool use_id = true;
|
|
||||||
|
|
||||||
for (int i = 0; i < data_str.length(); ++i) {
|
|
||||||
if (data_str[i] == '^') {
|
|
||||||
if (!use_id) {
|
|
||||||
inst->SetCustomData(idAsString, value);
|
|
||||||
idAsString.clear();
|
|
||||||
value.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
use_id = !use_id;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char v = data_str[i];
|
|
||||||
if (use_id)
|
|
||||||
idAsString.push_back(v);
|
|
||||||
else
|
|
||||||
value.push_back(v);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inst->SetOrnamentIcon(ornament_icon);
|
inst->SetOrnamentIcon(ornament_icon);
|
||||||
@@ -795,19 +754,19 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQ::InventoryPr
|
|||||||
|
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
int16 slot_id = Strings::ToInt(row[0]);
|
int16 slot_id = Strings::ToInt(row[0]);
|
||||||
uint32 item_id = Strings::ToInt(row[1]);
|
uint32 item_id = Strings::ToUnsignedInt(row[1]);
|
||||||
const int8 charges = Strings::ToInt(row[2]);
|
const int8 charges = Strings::ToInt(row[2]);
|
||||||
const uint32 color = Strings::ToUnsignedInt(row[3]);
|
const uint32 color = Strings::ToUnsignedInt(row[3]);
|
||||||
|
|
||||||
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
uint32 aug[EQ::invaug::SOCKET_COUNT];
|
||||||
aug[0] = static_cast<uint32>(Strings::ToInt(row[4]));
|
aug[0] = Strings::ToUnsignedInt(row[4]);
|
||||||
aug[1] = static_cast<uint32>(Strings::ToInt(row[5]));
|
aug[1] = Strings::ToUnsignedInt(row[5]);
|
||||||
aug[2] = static_cast<uint32>(Strings::ToInt(row[6]));
|
aug[2] = Strings::ToUnsignedInt(row[6]);
|
||||||
aug[3] = static_cast<uint32>(Strings::ToInt(row[7]));
|
aug[3] = Strings::ToUnsignedInt(row[7]);
|
||||||
aug[4] = static_cast<uint32>(Strings::ToInt(row[8]));
|
aug[4] = Strings::ToUnsignedInt(row[8]);
|
||||||
aug[5] = static_cast<uint32>(Strings::ToInt(row[9]));
|
aug[5] = Strings::ToUnsignedInt(row[9]);
|
||||||
|
|
||||||
const bool instnodrop = (row[10] && static_cast<uint16>(Strings::ToInt(row[10]))) ? true : false;
|
const bool instnodrop = (row[10] && static_cast<uint16>(Strings::ToUnsignedInt(row[10])));
|
||||||
const uint32 ornament_icon = Strings::ToUnsignedInt(row[12]);
|
const uint32 ornament_icon = Strings::ToUnsignedInt(row[12]);
|
||||||
const uint32 ornament_idfile = Strings::ToUnsignedInt(row[13]);
|
const uint32 ornament_idfile = Strings::ToUnsignedInt(row[13]);
|
||||||
uint32 ornament_hero_model = Strings::ToUnsignedInt(row[14]);
|
uint32 ornament_hero_model = Strings::ToUnsignedInt(row[14]);
|
||||||
@@ -825,28 +784,7 @@ bool SharedDatabase::GetInventory(uint32 account_id, char *name, EQ::InventoryPr
|
|||||||
|
|
||||||
if (row[11]) {
|
if (row[11]) {
|
||||||
std::string data_str(row[11]);
|
std::string data_str(row[11]);
|
||||||
std::string idAsString;
|
inst->SetCustomDataString(data_str);
|
||||||
std::string value;
|
|
||||||
bool use_id = true;
|
|
||||||
|
|
||||||
for (int i = 0; i < data_str.length(); ++i) {
|
|
||||||
if (data_str[i] == '^') {
|
|
||||||
if (!use_id) {
|
|
||||||
inst->SetCustomData(idAsString, value);
|
|
||||||
idAsString.clear();
|
|
||||||
value.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
use_id = !use_id;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
const char v = data_str[i];
|
|
||||||
if (use_id)
|
|
||||||
idAsString.push_back(v);
|
|
||||||
else
|
|
||||||
value.push_back(v);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
inst->SetOrnamentIcon(ornament_icon);
|
inst->SetOrnamentIcon(ornament_icon);
|
||||||
@@ -905,7 +843,7 @@ uint32 SharedDatabase::GetItemRecastTimestamp(uint32 char_id, uint32 recast_type
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
auto& row = results.begin();
|
auto& row = results.begin();
|
||||||
return static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedDatabase::ClearOldRecastTimestamps(uint32 char_id)
|
void SharedDatabase::ClearOldRecastTimestamps(uint32 char_id)
|
||||||
@@ -933,10 +871,10 @@ void SharedDatabase::GetItemsCount(int32 &item_count, uint32 &max_id)
|
|||||||
auto& row = results.begin();
|
auto& row = results.begin();
|
||||||
|
|
||||||
if (row[0])
|
if (row[0])
|
||||||
max_id = Strings::ToInt(row[0]);
|
max_id = Strings::ToUnsignedInt(row[0]);
|
||||||
|
|
||||||
if (row[1])
|
if (row[1])
|
||||||
item_count = Strings::ToInt(row[1]);
|
item_count = Strings::ToUnsignedInt(row[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SharedDatabase::LoadItems(const std::string &prefix) {
|
bool SharedDatabase::LoadItems(const std::string &prefix) {
|
||||||
@@ -1025,24 +963,24 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
strn0cpy(item.Lore, row[ItemField::lore], sizeof(item.Lore));
|
strn0cpy(item.Lore, row[ItemField::lore], sizeof(item.Lore));
|
||||||
|
|
||||||
// Flags
|
// Flags
|
||||||
item.ArtifactFlag = Strings::ToInt(row[ItemField::artifactflag]) ? true : false;
|
item.ArtifactFlag = Strings::ToBool(row[ItemField::artifactflag]);
|
||||||
item.Attuneable = disable_attuneable ? false : Strings::ToInt(row[ItemField::attuneable]) ? true : false;
|
item.Attuneable = !disable_attuneable && Strings::ToBool(row[ItemField::attuneable]);
|
||||||
item.BenefitFlag = Strings::ToInt(row[ItemField::benefitflag]) ? true : false;
|
item.BenefitFlag = Strings::ToBool(row[ItemField::benefitflag]);
|
||||||
item.FVNoDrop = Strings::ToInt(row[ItemField::fvnodrop]) ? true : false;
|
item.FVNoDrop = Strings::ToBool(row[ItemField::fvnodrop]);
|
||||||
item.Magic = Strings::ToInt(row[ItemField::magic]) ? true : false;
|
item.Magic = Strings::ToBool(row[ItemField::magic]);
|
||||||
item.NoDrop = disable_no_drop ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::nodrop]));
|
item.NoDrop = disable_no_drop ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::nodrop]));
|
||||||
item.NoPet = disable_no_pet ? false : Strings::ToInt(row[ItemField::nopet]) ? true : false;
|
item.NoPet = !disable_no_pet && Strings::ToBool(row[ItemField::nopet]);
|
||||||
item.NoRent = disable_no_rent ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::norent]));
|
item.NoRent = disable_no_rent ? static_cast<uint8>(255) : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::norent]));
|
||||||
item.NoTransfer = disable_no_transfer ? false : Strings::ToInt(row[ItemField::notransfer]) ? true : false;
|
item.NoTransfer = !disable_no_transfer && Strings::ToBool(row[ItemField::notransfer]);
|
||||||
item.PendingLoreFlag = Strings::ToInt(row[ItemField::pendingloreflag]) ? true : false;
|
item.PendingLoreFlag = Strings::ToBool(row[ItemField::pendingloreflag]);
|
||||||
item.QuestItemFlag = Strings::ToInt(row[ItemField::questitemflag]) ? true : false;
|
item.QuestItemFlag = Strings::ToBool(row[ItemField::questitemflag]);
|
||||||
item.Stackable = Strings::ToInt(row[ItemField::stackable]) ? true : false;
|
item.Stackable = Strings::ToBool(row[ItemField::stackable]);
|
||||||
item.Tradeskills = Strings::ToInt(row[ItemField::tradeskills]) ? true : false;
|
item.Tradeskills = Strings::ToBool(row[ItemField::tradeskills]);
|
||||||
item.SummonedFlag = Strings::ToInt(row[ItemField::summonedflag]) ? true : false;
|
item.SummonedFlag = Strings::ToBool(row[ItemField::summonedflag]);
|
||||||
|
|
||||||
// Lore
|
// Lore
|
||||||
item.LoreGroup = disable_lore ? 0 : Strings::ToInt(row[ItemField::loregroup]);
|
item.LoreGroup = disable_lore ? 0 : Strings::ToInt(row[ItemField::loregroup]);
|
||||||
item.LoreFlag = disable_lore ? false : item.LoreGroup != 0;
|
item.LoreFlag = !disable_lore && item.LoreGroup != 0;
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
item.AugType = Strings::ToUnsignedInt(row[ItemField::augtype]);
|
item.AugType = Strings::ToUnsignedInt(row[ItemField::augtype]);
|
||||||
@@ -1058,7 +996,7 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
item.Weight = Strings::ToInt(row[ItemField::weight]);
|
item.Weight = Strings::ToInt(row[ItemField::weight]);
|
||||||
|
|
||||||
// Potion Belt
|
// Potion Belt
|
||||||
item.PotionBelt = disable_potion_belt ? false : Strings::ToInt(row[ItemField::potionbelt]) ? true : false;
|
item.PotionBelt = !disable_potion_belt && Strings::ToBool(row[ItemField::potionbelt]);
|
||||||
item.PotionBeltSlots = disable_potion_belt ? 0 : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::potionbeltslots]));
|
item.PotionBeltSlots = disable_potion_belt ? 0 : static_cast<uint8>(Strings::ToUnsignedInt(row[ItemField::potionbeltslots]));
|
||||||
|
|
||||||
// Merchant
|
// Merchant
|
||||||
@@ -1169,8 +1107,8 @@ void SharedDatabase::LoadItems(void *data, uint32 size, int32 items, uint32 max_
|
|||||||
item.SkillModType = Strings::ToUnsignedInt(row[ItemField::skillmodtype]);
|
item.SkillModType = Strings::ToUnsignedInt(row[ItemField::skillmodtype]);
|
||||||
|
|
||||||
// Extra Damage Skill
|
// Extra Damage Skill
|
||||||
item.ExtraDmgSkill = Strings::ToUnsignedInt(row[ItemField::extradmgskill]);
|
item.ExtraDmgSkill = Strings::ToInt(row[ItemField::extradmgskill]);
|
||||||
item.ExtraDmgAmt = Strings::ToUnsignedInt(row[ItemField::extradmgamt]);
|
item.ExtraDmgAmt = Strings::ToInt(row[ItemField::extradmgamt]);
|
||||||
|
|
||||||
// Bard
|
// Bard
|
||||||
item.BardType = Strings::ToUnsignedInt(row[ItemField::bardtype]);
|
item.BardType = Strings::ToUnsignedInt(row[ItemField::bardtype]);
|
||||||
@@ -1369,8 +1307,8 @@ void SharedDatabase::GetFactionListInfo(uint32 &list_count, uint32 &max_lists) {
|
|||||||
|
|
||||||
auto& row = results.begin();
|
auto& row = results.begin();
|
||||||
|
|
||||||
list_count = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
list_count = Strings::ToUnsignedInt(row[0]);
|
||||||
max_lists = static_cast<uint32>(Strings::ToUnsignedInt(row[1] ? row[1] : "0"));
|
max_lists = Strings::ToUnsignedInt(row[1] ? row[1] : "0");
|
||||||
}
|
}
|
||||||
|
|
||||||
const NPCFactionList* SharedDatabase::GetNPCFactionEntry(uint32 id) const
|
const NPCFactionList* SharedDatabase::GetNPCFactionEntry(uint32 id) const
|
||||||
@@ -1403,7 +1341,7 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
|
|||||||
uint32 current_entry = 0;
|
uint32 current_entry = 0;
|
||||||
|
|
||||||
for(auto& row = results.begin(); row != results.end(); ++row) {
|
for(auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
const uint32 id = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
const uint32 id = Strings::ToUnsignedInt(row[0]);
|
||||||
if(id != current_id) {
|
if(id != current_id) {
|
||||||
if(current_id != 0) {
|
if(current_id != 0) {
|
||||||
hash.insert(current_id, faction);
|
hash.insert(current_id, faction);
|
||||||
@@ -1413,7 +1351,7 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
|
|||||||
current_entry = 0;
|
current_entry = 0;
|
||||||
current_id = id;
|
current_id = id;
|
||||||
faction.id = id;
|
faction.id = id;
|
||||||
faction.primaryfaction = static_cast<uint32>(Strings::ToUnsignedInt(row[1]));
|
faction.primaryfaction = Strings::ToUnsignedInt(row[1]);
|
||||||
faction.assistprimaryfaction = (Strings::ToInt(row[2]) == 0);
|
faction.assistprimaryfaction = (Strings::ToInt(row[2]) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1423,10 +1361,10 @@ void SharedDatabase::LoadNPCFactionLists(void *data, uint32 size, uint32 list_co
|
|||||||
if(current_entry >= MAX_NPC_FACTIONS)
|
if(current_entry >= MAX_NPC_FACTIONS)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
faction.factionid[current_entry] = static_cast<uint32>(Strings::ToUnsignedInt(row[3]));
|
faction.factionid[current_entry] = Strings::ToUnsignedInt(row[3]);
|
||||||
faction.factionvalue[current_entry] = static_cast<int32>(Strings::ToInt(row[4]));
|
faction.factionvalue[current_entry] = Strings::ToInt(row[4]);
|
||||||
faction.factionnpcvalue[current_entry] = static_cast<int8>(Strings::ToInt(row[5]));
|
faction.factionnpcvalue[current_entry] = static_cast<int8>(Strings::ToInt(row[5]));
|
||||||
faction.factiontemp[current_entry] = static_cast<uint8>(Strings::ToInt(row[6]));
|
faction.factiontemp[current_entry] = static_cast<uint8>(Strings::ToUnsignedInt(row[6]));
|
||||||
++current_entry;
|
++current_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1544,7 +1482,11 @@ EQ::ItemInstance* SharedDatabase::CreateItem(
|
|||||||
uint32 aug4,
|
uint32 aug4,
|
||||||
uint32 aug5,
|
uint32 aug5,
|
||||||
uint32 aug6,
|
uint32 aug6,
|
||||||
bool attuned
|
bool attuned,
|
||||||
|
const std::string& custom_data,
|
||||||
|
uint32 ornamenticon,
|
||||||
|
uint32 ornamentidfile,
|
||||||
|
uint32 ornament_hero_model
|
||||||
) {
|
) {
|
||||||
EQ::ItemInstance* inst = nullptr;
|
EQ::ItemInstance* inst = nullptr;
|
||||||
|
|
||||||
@@ -1565,6 +1507,10 @@ EQ::ItemInstance* SharedDatabase::CreateItem(
|
|||||||
inst->PutAugment(this, 4, aug5);
|
inst->PutAugment(this, 4, aug5);
|
||||||
inst->PutAugment(this, 5, aug6);
|
inst->PutAugment(this, 5, aug6);
|
||||||
inst->SetAttuned(attuned);
|
inst->SetAttuned(attuned);
|
||||||
|
inst->SetCustomDataString(custom_data);
|
||||||
|
inst->SetOrnamentIcon(ornamenticon);
|
||||||
|
inst->SetOrnamentationIDFile(ornamentidfile);
|
||||||
|
inst->SetOrnamentHeroModel(ornament_hero_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
@@ -1581,7 +1527,11 @@ EQ::ItemInstance* SharedDatabase::CreateItem(
|
|||||||
uint32 aug4,
|
uint32 aug4,
|
||||||
uint32 aug5,
|
uint32 aug5,
|
||||||
uint32 aug6,
|
uint32 aug6,
|
||||||
bool attuned
|
bool attuned,
|
||||||
|
const std::string& custom_data,
|
||||||
|
uint32 ornamenticon,
|
||||||
|
uint32 ornamentidfile,
|
||||||
|
uint32 ornament_hero_model
|
||||||
) {
|
) {
|
||||||
EQ::ItemInstance* inst = nullptr;
|
EQ::ItemInstance* inst = nullptr;
|
||||||
if (item) {
|
if (item) {
|
||||||
@@ -1600,6 +1550,10 @@ EQ::ItemInstance* SharedDatabase::CreateItem(
|
|||||||
inst->PutAugment(this, 4, aug5);
|
inst->PutAugment(this, 4, aug5);
|
||||||
inst->PutAugment(this, 5, aug6);
|
inst->PutAugment(this, 5, aug6);
|
||||||
inst->SetAttuned(attuned);
|
inst->SetAttuned(attuned);
|
||||||
|
inst->SetCustomDataString(custom_data);
|
||||||
|
inst->SetOrnamentIcon(ornamenticon);
|
||||||
|
inst->SetOrnamentationIDFile(ornamentidfile);
|
||||||
|
inst->SetOrnamentHeroModel(ornament_hero_model);
|
||||||
}
|
}
|
||||||
|
|
||||||
return inst;
|
return inst;
|
||||||
@@ -1664,7 +1618,7 @@ bool SharedDatabase::GetCommandSettings(std::map<std::string, std::pair<uint8, s
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
command_settings[row[0]].first = Strings::ToInt(row[1]);
|
command_settings[row[0]].first = Strings::ToUnsignedInt(row[1]);
|
||||||
if (row[2][0] == 0)
|
if (row[2][0] == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@@ -1762,10 +1716,10 @@ void SharedDatabase::LoadSkillCaps(void *data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(auto& row = results.begin(); row != results.end(); ++row) {
|
for(auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
const uint8 skillID = Strings::ToInt(row[0]);
|
const uint8 skillID = Strings::ToUnsignedInt(row[0]);
|
||||||
const uint8 class_ = Strings::ToInt(row[1]) - 1;
|
const uint8 class_ = Strings::ToUnsignedInt(row[1]) - 1;
|
||||||
const uint8 level = Strings::ToInt(row[2]);
|
const uint8 level = Strings::ToUnsignedInt(row[2]);
|
||||||
const uint16 cap = Strings::ToInt(row[3]);
|
const uint16 cap = Strings::ToUnsignedInt(row[3]);
|
||||||
|
|
||||||
if(skillID >= skill_count || class_ >= class_count || level >= level_count)
|
if(skillID >= skill_count || class_ >= class_count || level >= level_count)
|
||||||
continue;
|
continue;
|
||||||
@@ -1866,7 +1820,7 @@ void SharedDatabase::LoadDamageShieldTypes(SPDat_Spell_Struct* sp, int32 iMaxSpe
|
|||||||
for(auto& row = results.begin(); row != results.end(); ++row) {
|
for(auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
const int spellID = Strings::ToInt(row[0]);
|
const int spellID = Strings::ToInt(row[0]);
|
||||||
if((spellID > 0) && (spellID <= iMaxSpellID))
|
if((spellID > 0) && (spellID <= iMaxSpellID))
|
||||||
sp[spellID].damage_shield_type = Strings::ToInt(row[1]);
|
sp[spellID].damage_shield_type = Strings::ToUnsignedInt(row[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1947,16 +1901,16 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
strn0cpy(sp[tempid].cast_on_other, row[7], sizeof(sp[tempid].cast_on_other));
|
strn0cpy(sp[tempid].cast_on_other, row[7], sizeof(sp[tempid].cast_on_other));
|
||||||
strn0cpy(sp[tempid].spell_fades, row[8], sizeof(sp[tempid].spell_fades));
|
strn0cpy(sp[tempid].spell_fades, row[8], sizeof(sp[tempid].spell_fades));
|
||||||
|
|
||||||
sp[tempid].range=static_cast<float>(Strings::ToFloat(row[9]));
|
sp[tempid].range = Strings::ToFloat(row[9]);
|
||||||
sp[tempid].aoe_range=static_cast<float>(Strings::ToFloat(row[10]));
|
sp[tempid].aoe_range = Strings::ToFloat(row[10]);
|
||||||
sp[tempid].push_back=static_cast<float>(Strings::ToFloat(row[11]));
|
sp[tempid].push_back = Strings::ToFloat(row[11]);
|
||||||
sp[tempid].push_up=static_cast<float>(Strings::ToFloat(row[12]));
|
sp[tempid].push_up = Strings::ToFloat(row[12]);
|
||||||
sp[tempid].cast_time=Strings::ToInt(row[13]);
|
sp[tempid].cast_time=Strings::ToUnsignedInt(row[13]);
|
||||||
sp[tempid].recovery_time=Strings::ToInt(row[14]);
|
sp[tempid].recovery_time=Strings::ToUnsignedInt(row[14]);
|
||||||
sp[tempid].recast_time=Strings::ToInt(row[15]);
|
sp[tempid].recast_time=Strings::ToUnsignedInt(row[15]);
|
||||||
sp[tempid].buff_duration_formula=Strings::ToInt(row[16]);
|
sp[tempid].buff_duration_formula=Strings::ToUnsignedInt(row[16]);
|
||||||
sp[tempid].buff_duration=Strings::ToInt(row[17]);
|
sp[tempid].buff_duration=Strings::ToUnsignedInt(row[17]);
|
||||||
sp[tempid].aoe_duration=Strings::ToInt(row[18]);
|
sp[tempid].aoe_duration=Strings::ToUnsignedInt(row[18]);
|
||||||
sp[tempid].mana=Strings::ToInt(row[19]);
|
sp[tempid].mana=Strings::ToInt(row[19]);
|
||||||
|
|
||||||
int y=0;
|
int y=0;
|
||||||
@@ -1979,7 +1933,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
sp[tempid].no_expend_reagent[y]=Strings::ToInt(row[66+y]);
|
sp[tempid].no_expend_reagent[y]=Strings::ToInt(row[66+y]);
|
||||||
|
|
||||||
for(y=0; y< EFFECT_COUNT;y++)
|
for(y=0; y< EFFECT_COUNT;y++)
|
||||||
sp[tempid].formula[y]=Strings::ToInt(row[70+y]);
|
sp[tempid].formula[y]=Strings::ToUnsignedInt(row[70+y]);
|
||||||
|
|
||||||
sp[tempid].good_effect=Strings::ToInt(row[83]);
|
sp[tempid].good_effect=Strings::ToInt(row[83]);
|
||||||
sp[tempid].activated=Strings::ToInt(row[84]);
|
sp[tempid].activated=Strings::ToInt(row[84]);
|
||||||
@@ -2014,26 +1968,26 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
sp[tempid].deities[y]=Strings::ToInt(row[126+y]);
|
sp[tempid].deities[y]=Strings::ToInt(row[126+y]);
|
||||||
|
|
||||||
sp[tempid].new_icon=Strings::ToInt(row[144]);
|
sp[tempid].new_icon=Strings::ToInt(row[144]);
|
||||||
sp[tempid].uninterruptable=Strings::ToInt(row[146]) != 0;
|
sp[tempid].uninterruptable=Strings::ToBool(row[146]);
|
||||||
sp[tempid].resist_difficulty=Strings::ToInt(row[147]);
|
sp[tempid].resist_difficulty=Strings::ToInt(row[147]);
|
||||||
sp[tempid].unstackable_dot = Strings::ToInt(row[148]) != 0;
|
sp[tempid].unstackable_dot = Strings::ToBool(row[148]);
|
||||||
sp[tempid].recourse_link = Strings::ToInt(row[150]);
|
sp[tempid].recourse_link = Strings::ToUnsignedInt(row[150]);
|
||||||
sp[tempid].no_partial_resist = Strings::ToInt(row[151]) != 0;
|
sp[tempid].no_partial_resist = Strings::ToBool(row[151]);
|
||||||
|
|
||||||
sp[tempid].short_buff_box = Strings::ToInt(row[154]);
|
sp[tempid].short_buff_box = Strings::ToInt(row[154]);
|
||||||
sp[tempid].description_id = Strings::ToInt(row[155]);
|
sp[tempid].description_id = Strings::ToInt(row[155]);
|
||||||
sp[tempid].type_description_id = Strings::ToInt(row[156]);
|
sp[tempid].type_description_id = Strings::ToInt(row[156]);
|
||||||
sp[tempid].effect_description_id = Strings::ToInt(row[157]);
|
sp[tempid].effect_description_id = Strings::ToInt(row[157]);
|
||||||
|
|
||||||
sp[tempid].npc_no_los = Strings::ToInt(row[159]) != 0;
|
sp[tempid].npc_no_los = Strings::ToBool(row[159]);
|
||||||
sp[tempid].feedbackable = Strings::ToInt(row[160]) != 0;
|
sp[tempid].feedbackable = Strings::ToBool(row[160]);
|
||||||
sp[tempid].reflectable = Strings::ToInt(row[161]) != 0;
|
sp[tempid].reflectable = Strings::ToBool(row[161]);
|
||||||
sp[tempid].bonus_hate=Strings::ToInt(row[162]);
|
sp[tempid].bonus_hate=Strings::ToInt(row[162]);
|
||||||
|
|
||||||
sp[tempid].ldon_trap = Strings::ToInt(row[165]) != 0;
|
sp[tempid].ldon_trap = Strings::ToBool(row[165]);
|
||||||
sp[tempid].endurance_cost= Strings::ToInt(row[166]);
|
sp[tempid].endurance_cost= Strings::ToInt(row[166]);
|
||||||
sp[tempid].timer_id= Strings::ToInt(row[167]);
|
sp[tempid].timer_id= Strings::ToInt(row[167]);
|
||||||
sp[tempid].is_discipline = Strings::ToInt(row[168]) != 0;
|
sp[tempid].is_discipline = Strings::ToBool(row[168]);
|
||||||
sp[tempid].hate_added= Strings::ToInt(row[173]);
|
sp[tempid].hate_added= Strings::ToInt(row[173]);
|
||||||
sp[tempid].endurance_upkeep=Strings::ToInt(row[174]);
|
sp[tempid].endurance_upkeep=Strings::ToInt(row[174]);
|
||||||
sp[tempid].hit_number_type = Strings::ToInt(row[175]);
|
sp[tempid].hit_number_type = Strings::ToInt(row[175]);
|
||||||
@@ -2046,19 +2000,19 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
sp[tempid].pvp_duration_cap = Strings::ToInt(row[182]);
|
sp[tempid].pvp_duration_cap = Strings::ToInt(row[182]);
|
||||||
sp[tempid].pcnpc_only_flag= Strings::ToInt(row[183]);
|
sp[tempid].pcnpc_only_flag= Strings::ToInt(row[183]);
|
||||||
sp[tempid].cast_not_standing = Strings::ToInt(row[184]) != 0;
|
sp[tempid].cast_not_standing = Strings::ToInt(row[184]) != 0;
|
||||||
sp[tempid].can_mgb=Strings::ToInt(row[185]);
|
sp[tempid].can_mgb= Strings::ToBool(row[185]);
|
||||||
sp[tempid].dispel_flag = Strings::ToInt(row[186]);
|
sp[tempid].dispel_flag = Strings::ToInt(row[186]);
|
||||||
sp[tempid].min_resist = Strings::ToInt(row[189]);
|
sp[tempid].min_resist = Strings::ToInt(row[189]);
|
||||||
sp[tempid].max_resist = Strings::ToInt(row[190]);
|
sp[tempid].max_resist = Strings::ToInt(row[190]);
|
||||||
sp[tempid].viral_targets = Strings::ToInt(row[191]);
|
sp[tempid].viral_targets = Strings::ToInt(row[191]);
|
||||||
sp[tempid].viral_timer = Strings::ToInt(row[192]);
|
sp[tempid].viral_timer = Strings::ToInt(row[192]);
|
||||||
sp[tempid].nimbus_effect = Strings::ToInt(row[193]);
|
sp[tempid].nimbus_effect = Strings::ToInt(row[193]);
|
||||||
sp[tempid].directional_start = static_cast<float>(Strings::ToInt(row[194]));
|
sp[tempid].directional_start = Strings::ToFloat(row[194]);
|
||||||
sp[tempid].directional_end = static_cast<float>(Strings::ToInt(row[195]));
|
sp[tempid].directional_end = Strings::ToFloat(row[195]);
|
||||||
sp[tempid].sneak = Strings::ToInt(row[196]) != 0;
|
sp[tempid].sneak = Strings::ToBool(row[196]);
|
||||||
sp[tempid].not_focusable = Strings::ToInt(row[197]) != 0;
|
sp[tempid].not_focusable = Strings::ToBool(row[197]);
|
||||||
sp[tempid].no_detrimental_spell_aggro = Strings::ToInt(row[198]) != 0;
|
sp[tempid].no_detrimental_spell_aggro = Strings::ToBool(row[198]);
|
||||||
sp[tempid].suspendable = Strings::ToInt(row[200]) != 0;
|
sp[tempid].suspendable = Strings::ToBool(row[200]);
|
||||||
sp[tempid].viral_range = Strings::ToInt(row[201]);
|
sp[tempid].viral_range = Strings::ToInt(row[201]);
|
||||||
sp[tempid].song_cap = Strings::ToInt(row[202]);
|
sp[tempid].song_cap = Strings::ToInt(row[202]);
|
||||||
sp[tempid].no_block = Strings::ToInt(row[205]);
|
sp[tempid].no_block = Strings::ToInt(row[205]);
|
||||||
@@ -2066,22 +2020,22 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) {
|
|||||||
sp[tempid].rank = Strings::ToInt(row[208]);
|
sp[tempid].rank = Strings::ToInt(row[208]);
|
||||||
sp[tempid].no_resist=Strings::ToInt(row[209]);
|
sp[tempid].no_resist=Strings::ToInt(row[209]);
|
||||||
sp[tempid].cast_restriction = Strings::ToInt(row[211]);
|
sp[tempid].cast_restriction = Strings::ToInt(row[211]);
|
||||||
sp[tempid].allow_rest = Strings::ToInt(row[212]) != 0;
|
sp[tempid].allow_rest = Strings::ToBool(row[212]);
|
||||||
sp[tempid].can_cast_in_combat = Strings::ToInt(row[213]) != 0;
|
sp[tempid].can_cast_in_combat = Strings::ToBool(row[213]);
|
||||||
sp[tempid].can_cast_out_of_combat = Strings::ToInt(row[214]) != 0;
|
sp[tempid].can_cast_out_of_combat = Strings::ToBool(row[214]);
|
||||||
sp[tempid].override_crit_chance = Strings::ToInt(row[217]);
|
sp[tempid].override_crit_chance = Strings::ToInt(row[217]);
|
||||||
sp[tempid].aoe_max_targets = Strings::ToInt(row[218]);
|
sp[tempid].aoe_max_targets = Strings::ToInt(row[218]);
|
||||||
sp[tempid].no_heal_damage_item_mod = Strings::ToInt(row[219]);
|
sp[tempid].no_heal_damage_item_mod = Strings::ToInt(row[219]);
|
||||||
sp[tempid].caster_requirement_id = Strings::ToInt(row[220]);
|
sp[tempid].caster_requirement_id = Strings::ToInt(row[220]);
|
||||||
sp[tempid].spell_class = Strings::ToInt(row[221]);
|
sp[tempid].spell_class = Strings::ToInt(row[221]);
|
||||||
sp[tempid].spell_subclass = Strings::ToInt(row[222]);
|
sp[tempid].spell_subclass = Strings::ToInt(row[222]);
|
||||||
sp[tempid].persist_death = Strings::ToInt(row[224]) != 0;
|
sp[tempid].persist_death = Strings::ToBool(row[224]);
|
||||||
sp[tempid].min_distance = static_cast<float>(Strings::ToFloat(row[227]));
|
sp[tempid].min_distance = Strings::ToFloat(row[227]);
|
||||||
sp[tempid].min_distance_mod = static_cast<float>(Strings::ToFloat(row[228]));
|
sp[tempid].min_distance_mod = Strings::ToFloat(row[228]);
|
||||||
sp[tempid].max_distance = static_cast<float>(Strings::ToFloat(row[229]));
|
sp[tempid].max_distance = Strings::ToFloat(row[229]);
|
||||||
sp[tempid].max_distance_mod = static_cast<float>(Strings::ToFloat(row[230]));
|
sp[tempid].max_distance_mod = Strings::ToFloat(row[230]);
|
||||||
sp[tempid].min_range = static_cast<float>(Strings::ToInt(row[231]));
|
sp[tempid].min_range = Strings::ToFloat(row[231]);
|
||||||
sp[tempid].no_remove = Strings::ToInt(row[232]) != 0;
|
sp[tempid].no_remove = Strings::ToBool(row[232]);
|
||||||
sp[tempid].damage_shield_type = 0;
|
sp[tempid].damage_shield_type = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2218,9 +2172,9 @@ void SharedDatabase::GetLootTableInfo(uint32 &loot_table_count, uint32 &max_loot
|
|||||||
|
|
||||||
auto& row = results.begin();
|
auto& row = results.begin();
|
||||||
|
|
||||||
loot_table_count = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
loot_table_count = Strings::ToUnsignedInt(row[0]);
|
||||||
max_loot_table = static_cast<uint32>(Strings::ToUnsignedInt(row[1] ? row[1] : "0"));
|
max_loot_table = Strings::ToUnsignedInt(row[1] ? row[1] : "0");
|
||||||
loot_table_entries = static_cast<uint32>(Strings::ToUnsignedInt(row[2]));
|
loot_table_entries = Strings::ToUnsignedInt(row[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedDatabase::GetLootDropInfo(uint32 &loot_drop_count, uint32 &max_loot_drop, uint32 &loot_drop_entries) {
|
void SharedDatabase::GetLootDropInfo(uint32 &loot_drop_count, uint32 &max_loot_drop, uint32 &loot_drop_entries) {
|
||||||
@@ -2243,9 +2197,9 @@ void SharedDatabase::GetLootDropInfo(uint32 &loot_drop_count, uint32 &max_loot_d
|
|||||||
|
|
||||||
auto& row =results.begin();
|
auto& row =results.begin();
|
||||||
|
|
||||||
loot_drop_count = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
loot_drop_count = Strings::ToUnsignedInt(row[0]);
|
||||||
max_loot_drop = static_cast<uint32>(Strings::ToUnsignedInt(row[1] ? row[1] : "0"));
|
max_loot_drop = Strings::ToUnsignedInt(row[1] ? row[1] : "0");
|
||||||
loot_drop_entries = static_cast<uint32>(Strings::ToUnsignedInt(row[2]));
|
loot_drop_entries = Strings::ToUnsignedInt(row[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SharedDatabase::LoadLootTables(void *data, uint32 size) {
|
void SharedDatabase::LoadLootTables(void *data, uint32 size) {
|
||||||
@@ -2289,7 +2243,7 @@ void SharedDatabase::LoadLootTables(void *data, uint32 size) {
|
|||||||
uint32 current_entry = 0;
|
uint32 current_entry = 0;
|
||||||
|
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
const uint32 id = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
const uint32 id = Strings::ToUnsignedInt(row[0]);
|
||||||
if (id != current_id) {
|
if (id != current_id) {
|
||||||
if (current_id != 0) {
|
if (current_id != 0) {
|
||||||
hash.insert(
|
hash.insert(
|
||||||
@@ -2301,9 +2255,9 @@ void SharedDatabase::LoadLootTables(void *data, uint32 size) {
|
|||||||
memset(loot_table, 0, sizeof(LootTable_Struct) + (sizeof(LootTableEntries_Struct) * 128));
|
memset(loot_table, 0, sizeof(LootTable_Struct) + (sizeof(LootTableEntries_Struct) * 128));
|
||||||
current_entry = 0;
|
current_entry = 0;
|
||||||
current_id = id;
|
current_id = id;
|
||||||
lt->mincash = static_cast<uint32>(Strings::ToUnsignedInt(row[1]));
|
lt->mincash = Strings::ToUnsignedInt(row[1]);
|
||||||
lt->maxcash = static_cast<uint32>(Strings::ToUnsignedInt(row[2]));
|
lt->maxcash = Strings::ToUnsignedInt(row[2]);
|
||||||
lt->avgcoin = static_cast<uint32>(Strings::ToUnsignedInt(row[3]));
|
lt->avgcoin = Strings::ToUnsignedInt(row[3]);
|
||||||
|
|
||||||
lt->content_flags.min_expansion = static_cast<int16>(Strings::ToInt(row[9]));
|
lt->content_flags.min_expansion = static_cast<int16>(Strings::ToInt(row[9]));
|
||||||
lt->content_flags.max_expansion = static_cast<int16>(Strings::ToInt(row[10]));
|
lt->content_flags.max_expansion = static_cast<int16>(Strings::ToInt(row[10]));
|
||||||
@@ -2320,11 +2274,11 @@ void SharedDatabase::LoadLootTables(void *data, uint32 size) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
lt->Entries[current_entry].lootdrop_id = static_cast<uint32>(Strings::ToUnsignedInt(row[4]));
|
lt->Entries[current_entry].lootdrop_id = Strings::ToUnsignedInt(row[4]);
|
||||||
lt->Entries[current_entry].multiplier = static_cast<uint8>(Strings::ToInt(row[5]));
|
lt->Entries[current_entry].multiplier = static_cast<uint8>(Strings::ToUnsignedInt(row[5]));
|
||||||
lt->Entries[current_entry].droplimit = static_cast<uint8>(Strings::ToInt(row[6]));
|
lt->Entries[current_entry].droplimit = static_cast<uint8>(Strings::ToUnsignedInt(row[6]));
|
||||||
lt->Entries[current_entry].mindrop = static_cast<uint8>(Strings::ToInt(row[7]));
|
lt->Entries[current_entry].mindrop = static_cast<uint8>(Strings::ToUnsignedInt(row[7]));
|
||||||
lt->Entries[current_entry].probability = static_cast<float>(Strings::ToFloat(row[8]));
|
lt->Entries[current_entry].probability = Strings::ToFloat(row[8]);
|
||||||
|
|
||||||
++(lt->NumEntries);
|
++(lt->NumEntries);
|
||||||
++current_entry;
|
++current_entry;
|
||||||
@@ -2383,7 +2337,7 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
|
|||||||
uint32 current_entry = 0;
|
uint32 current_entry = 0;
|
||||||
|
|
||||||
for (auto& row = results.begin(); row != results.end(); ++row) {
|
for (auto& row = results.begin(); row != results.end(); ++row) {
|
||||||
const auto id = static_cast<uint32>(Strings::ToUnsignedInt(row[0]));
|
const auto id = Strings::ToUnsignedInt(row[0]);
|
||||||
if (id != current_id) {
|
if (id != current_id) {
|
||||||
if (current_id != 0) {
|
if (current_id != 0) {
|
||||||
hash.insert(
|
hash.insert(
|
||||||
@@ -2397,7 +2351,7 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
|
|||||||
current_id = id;
|
current_id = id;
|
||||||
|
|
||||||
p_loot_drop_struct->content_flags.min_expansion = static_cast<int16>(Strings::ToInt(row[10]));
|
p_loot_drop_struct->content_flags.min_expansion = static_cast<int16>(Strings::ToInt(row[10]));
|
||||||
p_loot_drop_struct->content_flags.max_expansion = static_cast<int16>(Strings::ToInt(row[11]));
|
p_loot_drop_struct->content_flags.max_expansion = static_cast<int16>(Strings::ToUnsignedInt(row[11]));
|
||||||
|
|
||||||
strn0cpy(p_loot_drop_struct->content_flags.content_flags, row[12], sizeof(p_loot_drop_struct->content_flags.content_flags));
|
strn0cpy(p_loot_drop_struct->content_flags.content_flags, row[12], sizeof(p_loot_drop_struct->content_flags.content_flags));
|
||||||
strn0cpy(p_loot_drop_struct->content_flags.content_flags_disabled, row[13], sizeof(p_loot_drop_struct->content_flags.content_flags_disabled));
|
strn0cpy(p_loot_drop_struct->content_flags.content_flags_disabled, row[13], sizeof(p_loot_drop_struct->content_flags.content_flags_disabled));
|
||||||
@@ -2407,15 +2361,15 @@ void SharedDatabase::LoadLootDrops(void *data, uint32 size) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
p_loot_drop_struct->Entries[current_entry].item_id = static_cast<uint32>(Strings::ToUnsignedInt(row[1]));
|
p_loot_drop_struct->Entries[current_entry].item_id = Strings::ToUnsignedInt(row[1]);
|
||||||
p_loot_drop_struct->Entries[current_entry].item_charges = static_cast<int8>(Strings::ToInt(row[2]));
|
p_loot_drop_struct->Entries[current_entry].item_charges = static_cast<int8>(Strings::ToUnsignedInt(row[2]));
|
||||||
p_loot_drop_struct->Entries[current_entry].equip_item = static_cast<uint8>(Strings::ToInt(row[3]));
|
p_loot_drop_struct->Entries[current_entry].equip_item = static_cast<uint8>(Strings::ToUnsignedInt(row[3]));
|
||||||
p_loot_drop_struct->Entries[current_entry].chance = static_cast<float>(Strings::ToFloat(row[4]));
|
p_loot_drop_struct->Entries[current_entry].chance = Strings::ToFloat(row[4]);
|
||||||
p_loot_drop_struct->Entries[current_entry].trivial_min_level = static_cast<uint16>(Strings::ToInt(row[5]));
|
p_loot_drop_struct->Entries[current_entry].trivial_min_level = static_cast<uint16>(Strings::ToUnsignedInt(row[5]));
|
||||||
p_loot_drop_struct->Entries[current_entry].trivial_max_level = static_cast<uint16>(Strings::ToInt(row[6]));
|
p_loot_drop_struct->Entries[current_entry].trivial_max_level = static_cast<uint16>(Strings::ToUnsignedInt(row[6]));
|
||||||
p_loot_drop_struct->Entries[current_entry].npc_min_level = static_cast<uint16>(Strings::ToInt(row[7]));
|
p_loot_drop_struct->Entries[current_entry].npc_min_level = static_cast<uint16>(Strings::ToUnsignedInt(row[7]));
|
||||||
p_loot_drop_struct->Entries[current_entry].npc_max_level = static_cast<uint16>(Strings::ToInt(row[8]));
|
p_loot_drop_struct->Entries[current_entry].npc_max_level = static_cast<uint16>(Strings::ToUnsignedInt(row[8]));
|
||||||
p_loot_drop_struct->Entries[current_entry].multiplier = static_cast<uint8>(Strings::ToInt(row[9]));
|
p_loot_drop_struct->Entries[current_entry].multiplier = static_cast<uint8>(Strings::ToUnsignedInt(row[9]));
|
||||||
|
|
||||||
++(p_loot_drop_struct->NumEntries);
|
++(p_loot_drop_struct->NumEntries);
|
||||||
++current_entry;
|
++current_entry;
|
||||||
|
|||||||
+10
-2
@@ -126,7 +126,11 @@ public:
|
|||||||
uint32 aug4 = 0,
|
uint32 aug4 = 0,
|
||||||
uint32 aug5 = 0,
|
uint32 aug5 = 0,
|
||||||
uint32 aug6 = 0,
|
uint32 aug6 = 0,
|
||||||
bool attuned = 0
|
bool attuned = false,
|
||||||
|
const std::string& custom_data = "",
|
||||||
|
uint32 ornamenticon = 0,
|
||||||
|
uint32 ornamentidfile = 0,
|
||||||
|
uint32 ornament_hero_model = 0
|
||||||
);
|
);
|
||||||
EQ::ItemInstance *CreateItem(
|
EQ::ItemInstance *CreateItem(
|
||||||
const EQ::ItemData *item,
|
const EQ::ItemData *item,
|
||||||
@@ -137,7 +141,11 @@ public:
|
|||||||
uint32 aug4 = 0,
|
uint32 aug4 = 0,
|
||||||
uint32 aug5 = 0,
|
uint32 aug5 = 0,
|
||||||
uint32 aug6 = 0,
|
uint32 aug6 = 0,
|
||||||
bool attuned = 0
|
bool attuned = false,
|
||||||
|
const std::string &custom_data = "",
|
||||||
|
uint32 ornamenticon = 0,
|
||||||
|
uint32 ornamentidfile = 0,
|
||||||
|
uint32 ornament_hero_model = 0
|
||||||
);
|
);
|
||||||
EQ::ItemInstance *CreateBaseItem(const EQ::ItemData *item, int16 charges = 0);
|
EQ::ItemInstance *CreateBaseItem(const EQ::ItemData *item, int16 charges = 0);
|
||||||
|
|
||||||
|
|||||||
+19
-1
@@ -260,13 +260,31 @@ const std::map<EQ::skills::SkillType, std::string>& EQ::skills::GetSkillTypeMap(
|
|||||||
return skill_type_map;
|
return skill_type_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const std::vector<EQ::skills::SkillType>& EQ::skills::GetExtraDamageSkills()
|
||||||
|
{
|
||||||
|
static const std::vector<EQ::skills::SkillType> v = {
|
||||||
|
EQ::skills::SkillBackstab,
|
||||||
|
EQ::skills::SkillBash,
|
||||||
|
EQ::skills::SkillDragonPunch, // Same ID as Tail Rake
|
||||||
|
EQ::skills::SkillEagleStrike,
|
||||||
|
EQ::skills::SkillFlyingKick,
|
||||||
|
EQ::skills::SkillKick,
|
||||||
|
EQ::skills::SkillRoundKick,
|
||||||
|
EQ::skills::SkillRoundKick,
|
||||||
|
EQ::skills::SkillTigerClaw,
|
||||||
|
EQ::skills::SkillFrenzy
|
||||||
|
};
|
||||||
|
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
std::string EQ::skills::GetSkillName(SkillType skill)
|
std::string EQ::skills::GetSkillName(SkillType skill)
|
||||||
{
|
{
|
||||||
if (skill >= Skill1HBlunt && skill <= Skill2HPiercing) {
|
if (skill >= Skill1HBlunt && skill <= Skill2HPiercing) {
|
||||||
auto skills = GetSkillTypeMap();
|
auto skills = GetSkillTypeMap();
|
||||||
return skills[skill];
|
return skills[skill];
|
||||||
}
|
}
|
||||||
return std::string();
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
EQ::SkillProfile::SkillProfile()
|
EQ::SkillProfile::SkillProfile()
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
namespace EQ
|
namespace EQ
|
||||||
@@ -170,6 +171,7 @@ namespace EQ
|
|||||||
bool IsMeleeDmg(SkillType skill);
|
bool IsMeleeDmg(SkillType skill);
|
||||||
|
|
||||||
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
extern const std::map<SkillType, std::string>& GetSkillTypeMap();
|
||||||
|
extern const std::vector<SkillType>& GetExtraDamageSkills();
|
||||||
|
|
||||||
std::string GetSkillName(SkillType skill);
|
std::string GetSkillName(SkillType skill);
|
||||||
} /*skills*/
|
} /*skills*/
|
||||||
|
|||||||
+2
-2
@@ -504,7 +504,7 @@ enum SpellRestriction
|
|||||||
HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, //
|
HAS_NO_ILLUSIONS_OF_GRANDEUR_BUFF = 12519, //
|
||||||
IS_HP_ABOVE_50_PCT = 16010, //
|
IS_HP_ABOVE_50_PCT = 16010, //
|
||||||
IS_HP_UNDER_50_PCT = 16031, //
|
IS_HP_UNDER_50_PCT = 16031, //
|
||||||
IS_OFF_HAND_EQUIPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
|
IS_OFF_HAND_EQUIPPED = 27672, // You must be wielding a weapon or shield in your offhand to use this ability.
|
||||||
HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction |
|
HAS_NO_PACT_OF_FATE_RECOURSE_BUFF = 29556, // This spell will not work while Pact of Fate Recourse is active. | caster restriction |
|
||||||
HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon.
|
HAS_NO_SHROUD_OF_PRAYER_BUFF = 32339, // Your target cannot receive another Quiet Prayer this soon.
|
||||||
IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana.
|
IS_MANA_BELOW_20_PCT = 38311, // This ability requires you to be at or below 20% of your maximum mana.
|
||||||
@@ -1211,7 +1211,7 @@ typedef enum {
|
|||||||
#define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front
|
#define SE_Double_Backstab_Front 473 // implemented - Chance to double backstab from front
|
||||||
#define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner
|
#define SE_Pet_Crit_Melee_Damage_Pct_Owner 474 // implemenetd - Critical damage mod applied to pets from owner
|
||||||
#define SE_Trigger_Spell_Non_Item 475 // implemented - Trigger spell on cast only if not from item click.
|
#define SE_Trigger_Spell_Non_Item 475 // implemented - Trigger spell on cast only if not from item click.
|
||||||
#define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Duel Wield is equiped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none
|
#define SE_Weapon_Stance 476 // implemented, @Misc, Apply a specific spell buffs automatically depending 2Hander, Shield or Dual Wield is equipped, base: spellid, base: 0=2H 1=Shield 2=DW, max: none
|
||||||
#define SE_Hatelist_To_Top_Index 477 // Implemented - Chance to be set to top of rampage list
|
#define SE_Hatelist_To_Top_Index 477 // Implemented - Chance to be set to top of rampage list
|
||||||
#define SE_Hatelist_To_Tail_Index 478 // Implemented - Chance to be set to bottom of rampage list
|
#define SE_Hatelist_To_Tail_Index 478 // Implemented - Chance to be set to bottom of rampage list
|
||||||
#define SE_Ff_Value_Min 479 // implemented, @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value
|
#define SE_Ff_Value_Min 479 // implemented, @Ff, Minimum base value of a spell that can be focused, base: spells to be focused base1 value
|
||||||
|
|||||||
+8
-8
@@ -115,7 +115,7 @@ Strings::SearchDelim(const std::string &haystack, const std::string &needle, con
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::string Strings::Implode(std::string glue, std::vector<std::string> src)
|
std::string Strings::Implode(const std::string& glue, std::vector<std::string> src)
|
||||||
{
|
{
|
||||||
if (src.empty()) {
|
if (src.empty()) {
|
||||||
return {};
|
return {};
|
||||||
@@ -272,7 +272,7 @@ std::string Strings::Repeat(std::string s, int n)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Strings::Contains(std::vector<std::string> container, std::string element)
|
bool Strings::Contains(std::vector<std::string> container, const std::string& element)
|
||||||
{
|
{
|
||||||
return std::find(container.begin(), container.end(), element) != container.end();
|
return std::find(container.begin(), container.end(), element) != container.end();
|
||||||
}
|
}
|
||||||
@@ -316,7 +316,7 @@ const std::string Strings::ToUpper(std::string s)
|
|||||||
);
|
);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
const std::string Strings::UcFirst(std::string s)
|
const std::string Strings::UcFirst(const std::string& s)
|
||||||
{
|
{
|
||||||
std::string output = s;
|
std::string output = s;
|
||||||
if (!s.empty()) {
|
if (!s.empty()) {
|
||||||
@@ -327,7 +327,7 @@ const std::string Strings::UcFirst(std::string s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::vector<std::string> Strings::Wrap(std::vector<std::string> &src, std::string character)
|
std::vector<std::string> Strings::Wrap(std::vector<std::string> &src, const std::string& character)
|
||||||
{
|
{
|
||||||
std::vector<std::string> new_vector;
|
std::vector<std::string> new_vector;
|
||||||
new_vector.reserve(src.size());
|
new_vector.reserve(src.size());
|
||||||
@@ -659,7 +659,7 @@ std::string Strings::SecondsToTime(int duration, bool is_milliseconds)
|
|||||||
return time_string;
|
return time_string;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string &Strings::LTrim(std::string &str, const std::string &chars)
|
std::string &Strings::LTrim(std::string &str, std::string_view chars)
|
||||||
{
|
{
|
||||||
str.erase(0, str.find_first_not_of(chars));
|
str.erase(0, str.find_first_not_of(chars));
|
||||||
return str;
|
return str;
|
||||||
@@ -670,7 +670,7 @@ std::string Strings::MillisecondsToTime(int duration)
|
|||||||
return SecondsToTime(duration, true);
|
return SecondsToTime(duration, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string &Strings::RTrim(std::string &str, const std::string &chars)
|
std::string &Strings::RTrim(std::string &str, std::string_view chars)
|
||||||
{
|
{
|
||||||
str.erase(str.find_last_not_of(chars) + 1);
|
str.erase(str.find_last_not_of(chars) + 1);
|
||||||
return str;
|
return str;
|
||||||
@@ -682,7 +682,7 @@ std::string &Strings::Trim(std::string &str, const std::string &chars)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function to convert single digit or two digit number into words
|
// Function to convert single digit or two digit number into words
|
||||||
std::string Strings::ConvertToDigit(int n, std::string suffix)
|
std::string Strings::ConvertToDigit(int n, const std::string& suffix)
|
||||||
{
|
{
|
||||||
// if n is zero
|
// if n is zero
|
||||||
if (n == 0) {
|
if (n == 0) {
|
||||||
@@ -745,7 +745,7 @@ uint32 Strings::TimeToSeconds(std::string time_string)
|
|||||||
return duration;
|
return duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Strings::ToBool(std::string bool_string)
|
bool Strings::ToBool(const std::string& bool_string)
|
||||||
{
|
{
|
||||||
if (
|
if (
|
||||||
Strings::Contains(bool_string, "true") ||
|
Strings::Contains(bool_string, "true") ||
|
||||||
|
|||||||
+8
-8
@@ -84,7 +84,7 @@ namespace EQ {
|
|||||||
|
|
||||||
class Strings {
|
class Strings {
|
||||||
public:
|
public:
|
||||||
static bool Contains(std::vector<std::string> container, std::string element);
|
static bool Contains(std::vector<std::string> container, const std::string& element);
|
||||||
static bool Contains(const std::string& subject, const std::string& search);
|
static bool Contains(const std::string& subject, const std::string& search);
|
||||||
static int ToInt(const std::string &s, int fallback = 0);
|
static int ToInt(const std::string &s, int fallback = 0);
|
||||||
static int64 ToBigInt(const std::string &s, int64 fallback = 0);
|
static int64 ToBigInt(const std::string &s, int64 fallback = 0);
|
||||||
@@ -96,9 +96,9 @@ public:
|
|||||||
static bool IsFloat(const std::string &s);
|
static bool IsFloat(const std::string &s);
|
||||||
static const std::string ToLower(std::string s);
|
static const std::string ToLower(std::string s);
|
||||||
static const std::string ToUpper(std::string s);
|
static const std::string ToUpper(std::string s);
|
||||||
static const std::string UcFirst(std::string s);
|
static const std::string UcFirst(const std::string& s);
|
||||||
static std::string <rim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
static std::string <rim(std::string &str, std::string_view chars = "\t\n\v\f\r ");
|
||||||
static std::string &RTrim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
static std::string &RTrim(std::string &str, std::string_view chars = "\t\n\v\f\r ");
|
||||||
static std::string &Trim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
static std::string &Trim(std::string &str, const std::string &chars = "\t\n\v\f\r ");
|
||||||
static std::string Commify(const std::string &number);
|
static std::string Commify(const std::string &number);
|
||||||
static std::string Commify(uint16 number) { return Strings::Commify(std::to_string(number)); };
|
static std::string Commify(uint16 number) { return Strings::Commify(std::to_string(number)); };
|
||||||
@@ -107,10 +107,10 @@ public:
|
|||||||
static std::string Commify(int16 number) { return Strings::Commify(std::to_string(number)); };
|
static std::string Commify(int16 number) { return Strings::Commify(std::to_string(number)); };
|
||||||
static std::string Commify(int32 number) { return Strings::Commify(std::to_string(number)); };
|
static std::string Commify(int32 number) { return Strings::Commify(std::to_string(number)); };
|
||||||
static std::string Commify(int64 number) { return Strings::Commify(std::to_string(number)); };
|
static std::string Commify(int64 number) { return Strings::Commify(std::to_string(number)); };
|
||||||
static std::string ConvertToDigit(int n, std::string suffix);
|
static std::string ConvertToDigit(int n, const std::string& suffix);
|
||||||
static std::string Escape(const std::string &s);
|
static std::string Escape(const std::string &s);
|
||||||
static std::string GetBetween(const std::string &s, std::string start_delim, std::string stop_delim);
|
static std::string GetBetween(const std::string &s, std::string start_delim, std::string stop_delim);
|
||||||
static std::string Implode(std::string glue, std::vector<std::string> src);
|
static std::string Implode(const std::string& glue, std::vector<std::string> src);
|
||||||
static std::string Join(const std::vector<std::string> &ar, const std::string &delim);
|
static std::string Join(const std::vector<std::string> &ar, const std::string &delim);
|
||||||
static std::string Join(const std::vector<uint32_t> &ar, const std::string &delim);
|
static std::string Join(const std::vector<uint32_t> &ar, const std::string &delim);
|
||||||
static std::string MillisecondsToTime(int duration);
|
static std::string MillisecondsToTime(int duration);
|
||||||
@@ -122,10 +122,10 @@ public:
|
|||||||
static std::string::size_type SearchDelim(const std::string &haystack, const std::string &needle, const char deliminator = ',');
|
static std::string::size_type SearchDelim(const std::string &haystack, const std::string &needle, const char deliminator = ',');
|
||||||
static std::vector<std::string> Split(const std::string &s, const char delim = ',');
|
static std::vector<std::string> Split(const std::string &s, const char delim = ',');
|
||||||
static std::vector<std::string> Split(const std::string& s, const std::string& delimiter);
|
static std::vector<std::string> Split(const std::string& s, const std::string& delimiter);
|
||||||
static std::vector<std::string> Wrap(std::vector<std::string> &src, std::string character);
|
static std::vector<std::string> Wrap(std::vector<std::string> &src, const std::string& character);
|
||||||
static void FindReplace(std::string &string_subject, const std::string &search_string, const std::string &replace_string);
|
static void FindReplace(std::string &string_subject, const std::string &search_string, const std::string &replace_string);
|
||||||
static uint32 TimeToSeconds(std::string time_string);
|
static uint32 TimeToSeconds(std::string time_string);
|
||||||
static bool ToBool(std::string bool_string);
|
static bool ToBool(const std::string& bool_string);
|
||||||
static inline bool EqualFold(const std::string &string_one, const std::string &string_two) { return strcasecmp(string_one.c_str(), string_two.c_str()) == 0; }
|
static inline bool EqualFold(const std::string &string_one, const std::string &string_two) { return strcasecmp(string_one.c_str(), string_two.c_str()) == 0; }
|
||||||
static std::string Random(size_t length);
|
static std::string Random(size_t length);
|
||||||
|
|
||||||
|
|||||||
@@ -71,14 +71,6 @@ namespace StructStrategyFactory {
|
|||||||
strategies[first_opcode] = structs;
|
strategies[first_opcode] = structs;
|
||||||
}
|
}
|
||||||
|
|
||||||
const StructStrategy *FindPatch(EmuOpcode first_opcode) {
|
|
||||||
std::map<EmuOpcode, const StructStrategy *>::const_iterator res;
|
|
||||||
res = strategies.find(first_opcode);
|
|
||||||
if(res == strategies.end())
|
|
||||||
return(nullptr);
|
|
||||||
return(res->second);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,6 @@ protected:
|
|||||||
//effectively a singleton, but I decided to do it this way for no apparent reason.
|
//effectively a singleton, but I decided to do it this way for no apparent reason.
|
||||||
namespace StructStrategyFactory {
|
namespace StructStrategyFactory {
|
||||||
void RegisterPatch(EmuOpcode first_opcode, const StructStrategy *structs);
|
void RegisterPatch(EmuOpcode first_opcode, const StructStrategy *structs);
|
||||||
|
|
||||||
//does NOT return ownership of the strategy.
|
|
||||||
const StructStrategy *FindPatch(EmuOpcode first_opcode);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-3
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
// Build variables
|
// Build variables
|
||||||
// these get injected during the build pipeline
|
// these get injected during the build pipeline
|
||||||
#define CURRENT_VERSION "22.4.5-dev" // always append -dev to the current version for custom-builds
|
#define CURRENT_VERSION "22.9.0-dev" // always append -dev to the current version for custom-builds
|
||||||
#define LOGIN_VERSION "0.8.0"
|
#define LOGIN_VERSION "0.8.0"
|
||||||
#define COMPILE_DATE __DATE__
|
#define COMPILE_DATE __DATE__
|
||||||
#define COMPILE_TIME __TIME__
|
#define COMPILE_TIME __TIME__
|
||||||
@@ -42,8 +42,9 @@
|
|||||||
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
* Manifest: https://github.com/EQEmu/Server/blob/master/utils/sql/db_update_manifest.txt
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define CURRENT_BINARY_DATABASE_VERSION 9222
|
#define CURRENT_BINARY_DATABASE_VERSION 9227
|
||||||
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9038
|
|
||||||
|
#define CURRENT_BINARY_BOTS_DATABASE_VERSION 9039
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -1,490 +0,0 @@
|
|||||||
#include "../common/types.h"
|
|
||||||
|
|
||||||
inline const char* StaticGetZoneName(uint32 zoneID) {
|
|
||||||
// @merth: I did the following query to retrieve these (following by a simple find/replace)
|
|
||||||
// select concat('case ', zoneidnumber), concat(short_name, '";') from zone order by zoneidnumber;
|
|
||||||
switch (zoneID) {
|
|
||||||
case 1: return "qeynos";
|
|
||||||
case 2: return "qeynos2";
|
|
||||||
case 3: return "qrg";
|
|
||||||
case 4: return "qeytoqrg";
|
|
||||||
case 5: return "highpass";
|
|
||||||
case 6: return "highkeep";
|
|
||||||
case 8: return "freportn";
|
|
||||||
case 9: return "freportw";
|
|
||||||
case 10: return "freporte";
|
|
||||||
case 11: return "runnyeye";
|
|
||||||
case 12: return "qey2hh1";
|
|
||||||
case 13: return "northkarana";
|
|
||||||
case 14: return "southkarana";
|
|
||||||
case 15: return "eastkarana";
|
|
||||||
case 16: return "beholder";
|
|
||||||
case 17: return "blackburrow";
|
|
||||||
case 18: return "paw";
|
|
||||||
case 19: return "rivervale";
|
|
||||||
case 20: return "kithicor";
|
|
||||||
case 21: return "commons";
|
|
||||||
case 22: return "ecommons";
|
|
||||||
case 23: return "erudnint";
|
|
||||||
case 24: return "erudnext";
|
|
||||||
case 25: return "nektulos";
|
|
||||||
case 26: return "cshome";
|
|
||||||
case 27: return "lavastorm";
|
|
||||||
case 28: return "nektropos";
|
|
||||||
case 29: return "halas";
|
|
||||||
case 30: return "everfrost";
|
|
||||||
case 31: return "soldunga";
|
|
||||||
case 32: return "soldungb";
|
|
||||||
case 33: return "misty";
|
|
||||||
case 34: return "nro";
|
|
||||||
case 35: return "sro";
|
|
||||||
case 36: return "befallen";
|
|
||||||
case 37: return "oasis";
|
|
||||||
case 38: return "tox";
|
|
||||||
case 39: return "hole";
|
|
||||||
case 40: return "neriaka";
|
|
||||||
case 41: return "neriakb";
|
|
||||||
case 42: return "neriakc";
|
|
||||||
case 43: return "neriakd";
|
|
||||||
case 44: return "najena";
|
|
||||||
case 45: return "qcat";
|
|
||||||
case 46: return "innothule";
|
|
||||||
case 47: return "feerrott";
|
|
||||||
case 48: return "cazicthule";
|
|
||||||
case 49: return "oggok";
|
|
||||||
case 50: return "rathemtn";
|
|
||||||
case 51: return "lakerathe";
|
|
||||||
case 52: return "grobb";
|
|
||||||
case 53: return "aviak";
|
|
||||||
case 54: return "gfaydark";
|
|
||||||
case 55: return "akanon";
|
|
||||||
case 56: return "steamfont";
|
|
||||||
case 57: return "lfaydark";
|
|
||||||
case 58: return "crushbone";
|
|
||||||
case 59: return "mistmoore";
|
|
||||||
case 60: return "kaladima";
|
|
||||||
case 61: return "felwithea";
|
|
||||||
case 62: return "felwitheb";
|
|
||||||
case 63: return "unrest";
|
|
||||||
case 64: return "kedge";
|
|
||||||
case 65: return "guktop";
|
|
||||||
case 66: return "gukbottom";
|
|
||||||
case 67: return "kaladimb";
|
|
||||||
case 68: return "butcher";
|
|
||||||
case 69: return "oot";
|
|
||||||
case 70: return "cauldron";
|
|
||||||
case 71: return "airplane";
|
|
||||||
case 72: return "fearplane";
|
|
||||||
case 73: return "permafrost";
|
|
||||||
case 74: return "kerraridge";
|
|
||||||
case 75: return "paineel";
|
|
||||||
case 76: return "hateplane";
|
|
||||||
case 77: return "arena";
|
|
||||||
case 78: return "fieldofbone";
|
|
||||||
case 79: return "warslikswood";
|
|
||||||
case 80: return "soltemple";
|
|
||||||
case 81: return "droga";
|
|
||||||
case 82: return "cabwest";
|
|
||||||
case 83: return "swampofnohope";
|
|
||||||
case 84: return "firiona";
|
|
||||||
case 85: return "lakeofillomen";
|
|
||||||
case 86: return "dreadlands";
|
|
||||||
case 87: return "burningwood";
|
|
||||||
case 88: return "kaesora";
|
|
||||||
case 89: return "sebilis";
|
|
||||||
case 90: return "citymist";
|
|
||||||
case 91: return "skyfire";
|
|
||||||
case 92: return "frontiermtns";
|
|
||||||
case 93: return "overthere";
|
|
||||||
case 94: return "emeraldjungle";
|
|
||||||
case 95: return "trakanon";
|
|
||||||
case 96: return "timorous";
|
|
||||||
case 97: return "kurn";
|
|
||||||
case 98: return "erudsxing";
|
|
||||||
case 100: return "stonebrunt";
|
|
||||||
case 101: return "warrens";
|
|
||||||
case 102: return "karnor";
|
|
||||||
case 103: return "chardok";
|
|
||||||
case 104: return "dalnir";
|
|
||||||
case 105: return "charasis";
|
|
||||||
case 106: return "cabeast";
|
|
||||||
case 107: return "nurga";
|
|
||||||
case 108: return "veeshan";
|
|
||||||
case 109: return "veksar";
|
|
||||||
case 110: return "iceclad";
|
|
||||||
case 111: return "frozenshadow";
|
|
||||||
case 112: return "velketor";
|
|
||||||
case 113: return "kael";
|
|
||||||
case 114: return "skyshrine";
|
|
||||||
case 115: return "thurgadina";
|
|
||||||
case 116: return "eastwastes";
|
|
||||||
case 117: return "cobaltscar";
|
|
||||||
case 118: return "greatdivide";
|
|
||||||
case 119: return "wakening";
|
|
||||||
case 120: return "westwastes";
|
|
||||||
case 121: return "crystal";
|
|
||||||
case 123: return "necropolis";
|
|
||||||
case 124: return "templeveeshan";
|
|
||||||
case 125: return "sirens";
|
|
||||||
case 126: return "mischiefplane";
|
|
||||||
case 127: return "growthplane";
|
|
||||||
case 128: return "sleeper";
|
|
||||||
case 129: return "thurgadinb";
|
|
||||||
case 130: return "erudsxing2";
|
|
||||||
case 150: return "shadowhaven";
|
|
||||||
case 151: return "bazaar";
|
|
||||||
case 152: return "nexus";
|
|
||||||
case 153: return "echo";
|
|
||||||
case 154: return "acrylia";
|
|
||||||
case 155: return "sharvahl";
|
|
||||||
case 156: return "paludal";
|
|
||||||
case 157: return "fungusgrove";
|
|
||||||
case 158: return "vexthal";
|
|
||||||
case 159: return "sseru";
|
|
||||||
case 160: return "katta";
|
|
||||||
case 161: return "netherbian";
|
|
||||||
case 162: return "ssratemple";
|
|
||||||
case 163: return "griegsend";
|
|
||||||
case 164: return "thedeep";
|
|
||||||
case 165: return "shadeweaver";
|
|
||||||
case 166: return "hollowshade";
|
|
||||||
case 167: return "grimling";
|
|
||||||
case 168: return "mseru";
|
|
||||||
case 169: return "letalis";
|
|
||||||
case 170: return "twilight";
|
|
||||||
case 171: return "thegrey";
|
|
||||||
case 172: return "tenebrous";
|
|
||||||
case 173: return "maiden";
|
|
||||||
case 174: return "dawnshroud";
|
|
||||||
case 175: return "scarlet";
|
|
||||||
case 176: return "umbral";
|
|
||||||
case 179: return "akheva";
|
|
||||||
case 180: return "arena2";
|
|
||||||
case 181: return "jaggedpine";
|
|
||||||
case 182: return "nedaria";
|
|
||||||
case 183: return "tutorial";
|
|
||||||
case 184: return "load";
|
|
||||||
case 185: return "load2";
|
|
||||||
case 186: return "hateplaneb";
|
|
||||||
case 187: return "shadowrest";
|
|
||||||
case 188: return "tutoriala";
|
|
||||||
case 189: return "tutorialb";
|
|
||||||
case 190: return "clz";
|
|
||||||
case 200: return "codecay";
|
|
||||||
case 201: return "pojustice";
|
|
||||||
case 202: return "poknowledge";
|
|
||||||
case 203: return "potranquility";
|
|
||||||
case 204: return "ponightmare";
|
|
||||||
case 205: return "podisease";
|
|
||||||
case 206: return "poinnovation";
|
|
||||||
case 207: return "potorment";
|
|
||||||
case 208: return "povalor";
|
|
||||||
case 209: return "bothunder";
|
|
||||||
case 210: return "postorms";
|
|
||||||
case 211: return "hohonora";
|
|
||||||
case 212: return "solrotower";
|
|
||||||
case 213: return "powar";
|
|
||||||
case 214: return "potactics";
|
|
||||||
case 215: return "poair";
|
|
||||||
case 216: return "powater";
|
|
||||||
case 217: return "pofire";
|
|
||||||
case 218: return "poeartha";
|
|
||||||
case 219: return "potimea";
|
|
||||||
case 220: return "hohonorb";
|
|
||||||
case 221: return "nightmareb";
|
|
||||||
case 222: return "poearthb";
|
|
||||||
case 223: return "potimeb";
|
|
||||||
case 224: return "gunthak";
|
|
||||||
case 225: return "dulak";
|
|
||||||
case 226: return "torgiran";
|
|
||||||
case 227: return "nadox";
|
|
||||||
case 228: return "hatesfury";
|
|
||||||
case 229: return "guka";
|
|
||||||
case 230: return "ruja";
|
|
||||||
case 231: return "taka";
|
|
||||||
case 232: return "mira";
|
|
||||||
case 233: return "mmca";
|
|
||||||
case 234: return "gukb";
|
|
||||||
case 235: return "rujb";
|
|
||||||
case 236: return "takb";
|
|
||||||
case 237: return "mirb";
|
|
||||||
case 238: return "mmcb";
|
|
||||||
case 239: return "gukc";
|
|
||||||
case 240: return "rujc";
|
|
||||||
case 241: return "takc";
|
|
||||||
case 242: return "mirc";
|
|
||||||
case 243: return "mmcc";
|
|
||||||
case 244: return "gukd";
|
|
||||||
case 245: return "rujd";
|
|
||||||
case 246: return "takd";
|
|
||||||
case 247: return "mird";
|
|
||||||
case 248: return "mmcd";
|
|
||||||
case 249: return "guke";
|
|
||||||
case 250: return "ruje";
|
|
||||||
case 251: return "take";
|
|
||||||
case 252: return "mire";
|
|
||||||
case 253: return "mmce";
|
|
||||||
case 254: return "gukf";
|
|
||||||
case 255: return "rujf";
|
|
||||||
case 256: return "takf";
|
|
||||||
case 257: return "mirf";
|
|
||||||
case 258: return "mmcf";
|
|
||||||
case 259: return "gukg";
|
|
||||||
case 260: return "rujg";
|
|
||||||
case 261: return "takg";
|
|
||||||
case 262: return "mirg";
|
|
||||||
case 263: return "mmcg";
|
|
||||||
case 264: return "gukh";
|
|
||||||
case 265: return "rujh";
|
|
||||||
case 266: return "takh";
|
|
||||||
case 267: return "mirh";
|
|
||||||
case 268: return "mmch";
|
|
||||||
case 269: return "ruji";
|
|
||||||
case 270: return "taki";
|
|
||||||
case 271: return "miri";
|
|
||||||
case 272: return "mmci";
|
|
||||||
case 273: return "rujj";
|
|
||||||
case 274: return "takj";
|
|
||||||
case 275: return "mirj";
|
|
||||||
case 276: return "mmcj";
|
|
||||||
case 277: return "chardokb";
|
|
||||||
case 278: return "soldungc";
|
|
||||||
case 279: return "abysmal";
|
|
||||||
case 280: return "natimbi";
|
|
||||||
case 281: return "qinimi";
|
|
||||||
case 282: return "riwwi";
|
|
||||||
case 283: return "barindu";
|
|
||||||
case 284: return "ferubi";
|
|
||||||
case 285: return "snpool";
|
|
||||||
case 286: return "snlair";
|
|
||||||
case 287: return "snplant";
|
|
||||||
case 288: return "sncrematory";
|
|
||||||
case 289: return "tipt";
|
|
||||||
case 290: return "vxed";
|
|
||||||
case 291: return "yxtta";
|
|
||||||
case 292: return "uqua";
|
|
||||||
case 293: return "kodtaz";
|
|
||||||
case 294: return "ikkinz";
|
|
||||||
case 295: return "qvic";
|
|
||||||
case 296: return "inktuta";
|
|
||||||
case 297: return "txevu";
|
|
||||||
case 298: return "tacvi";
|
|
||||||
case 299: return "qvicb";
|
|
||||||
case 300: return "wallofslaughter";
|
|
||||||
case 301: return "bloodfields";
|
|
||||||
case 302: return "draniksscar";
|
|
||||||
case 303: return "causeway";
|
|
||||||
case 304: return "chambersa";
|
|
||||||
case 305: return "chambersb";
|
|
||||||
case 306: return "chambersc";
|
|
||||||
case 307: return "chambersd";
|
|
||||||
case 308: return "chamberse";
|
|
||||||
case 309: return "chambersf";
|
|
||||||
case 316: return "provinggrounds";
|
|
||||||
case 317: return "anguish";
|
|
||||||
case 318: return "dranikhollowsa";
|
|
||||||
case 319: return "dranikhollowsb";
|
|
||||||
case 320: return "dranikhollowsc";
|
|
||||||
case 328: return "dranikcatacombsa";
|
|
||||||
case 329: return "dranikcatacombsb";
|
|
||||||
case 330: return "dranikcatacombsc";
|
|
||||||
case 331: return "draniksewersa";
|
|
||||||
case 332: return "draniksewersb";
|
|
||||||
case 333: return "draniksewersc";
|
|
||||||
case 334: return "riftseekers";
|
|
||||||
case 335: return "harbingers";
|
|
||||||
case 336: return "dranik";
|
|
||||||
case 337: return "broodlands";
|
|
||||||
case 338: return "stillmoona";
|
|
||||||
case 339: return "stillmoonb";
|
|
||||||
case 340: return "thundercrest";
|
|
||||||
case 341: return "delvea";
|
|
||||||
case 342: return "delveb";
|
|
||||||
case 343: return "thenest";
|
|
||||||
case 344: return "guildlobby";
|
|
||||||
case 345: return "guildhall";
|
|
||||||
case 346: return "barter";
|
|
||||||
case 347: return "illsalin";
|
|
||||||
case 348: return "illsalina";
|
|
||||||
case 349: return "illsalinb";
|
|
||||||
case 350: return "illsalinc";
|
|
||||||
case 351: return "dreadspire";
|
|
||||||
case 354: return "drachnidhive";
|
|
||||||
case 355: return "drachnidhivea";
|
|
||||||
case 356: return "drachnidhiveb";
|
|
||||||
case 357: return "drachnidhivec";
|
|
||||||
case 358: return "westkorlach";
|
|
||||||
case 359: return "westkorlacha";
|
|
||||||
case 360: return "westkorlachb";
|
|
||||||
case 361: return "westkorlachc";
|
|
||||||
case 362: return "eastkorlach";
|
|
||||||
case 363: return "eastkorlacha";
|
|
||||||
case 364: return "shadowspine";
|
|
||||||
case 365: return "corathus";
|
|
||||||
case 366: return "corathusa";
|
|
||||||
case 367: return "corathusb";
|
|
||||||
case 368: return "nektulosa";
|
|
||||||
case 369: return "arcstone";
|
|
||||||
case 370: return "relic";
|
|
||||||
case 371: return "skylance";
|
|
||||||
case 372: return "devastation";
|
|
||||||
case 373: return "devastationa";
|
|
||||||
case 374: return "rage";
|
|
||||||
case 375: return "ragea";
|
|
||||||
case 376: return "takishruins";
|
|
||||||
case 377: return "takishruinsa";
|
|
||||||
case 378: return "elddar";
|
|
||||||
case 379: return "elddara";
|
|
||||||
case 380: return "theater";
|
|
||||||
case 381: return "theatera";
|
|
||||||
case 382: return "freeporteast";
|
|
||||||
case 383: return "freeportwest";
|
|
||||||
case 384: return "freeportsewers";
|
|
||||||
case 385: return "freeportacademy";
|
|
||||||
case 386: return "freeporttemple";
|
|
||||||
case 387: return "freeportmilitia";
|
|
||||||
case 388: return "freeportarena";
|
|
||||||
case 389: return "freeportcityhall";
|
|
||||||
case 390: return "freeporttheater";
|
|
||||||
case 391: return "freeporthall";
|
|
||||||
case 392: return "northro";
|
|
||||||
case 393: return "southro";
|
|
||||||
case 394: return "crescent";
|
|
||||||
case 395: return "moors";
|
|
||||||
case 396: return "stonehive";
|
|
||||||
case 397: return "mesa";
|
|
||||||
case 398: return "roost";
|
|
||||||
case 399: return "steppes";
|
|
||||||
case 400: return "icefall";
|
|
||||||
case 401: return "valdeholm";
|
|
||||||
case 402: return "frostcrypt";
|
|
||||||
case 403: return "sunderock";
|
|
||||||
case 404: return "vergalid";
|
|
||||||
case 405: return "direwind";
|
|
||||||
case 406: return "ashengate";
|
|
||||||
case 407: return "highpasshold";
|
|
||||||
case 408: return "commonlands";
|
|
||||||
case 409: return "oceanoftears";
|
|
||||||
case 410: return "kithforest";
|
|
||||||
case 411: return "befallenb";
|
|
||||||
case 412: return "highpasskeep";
|
|
||||||
case 413: return "innothuleb";
|
|
||||||
case 414: return "toxxulia";
|
|
||||||
case 415: return "mistythicket";
|
|
||||||
case 416: return "kattacastrum";
|
|
||||||
case 417: return "thalassius";
|
|
||||||
case 418: return "atiiki";
|
|
||||||
case 419: return "zhisza";
|
|
||||||
case 420: return "silyssar";
|
|
||||||
case 421: return "solteris";
|
|
||||||
case 422: return "barren";
|
|
||||||
case 423: return "buriedsea";
|
|
||||||
case 424: return "jardelshook";
|
|
||||||
case 425: return "monkeyrock";
|
|
||||||
case 426: return "suncrest";
|
|
||||||
case 427: return "deadbone";
|
|
||||||
case 428: return "blacksail";
|
|
||||||
case 429: return "maidensgrave";
|
|
||||||
case 430: return "redfeather";
|
|
||||||
case 431: return "shipmvp";
|
|
||||||
case 432: return "shipmvu";
|
|
||||||
case 433: return "shippvu";
|
|
||||||
case 434: return "shipuvu";
|
|
||||||
case 435: return "shipmvm";
|
|
||||||
case 436: return "mechanotus";
|
|
||||||
case 437: return "mansion";
|
|
||||||
case 438: return "steamfactory";
|
|
||||||
case 439: return "shipworkshop";
|
|
||||||
case 440: return "gyrospireb";
|
|
||||||
case 441: return "gyrospirez";
|
|
||||||
case 442: return "dragonscale";
|
|
||||||
case 443: return "lopingplains";
|
|
||||||
case 444: return "hillsofshade";
|
|
||||||
case 445: return "bloodmoon";
|
|
||||||
case 446: return "crystallos";
|
|
||||||
case 447: return "guardian";
|
|
||||||
case 448: return "steamfontmts";
|
|
||||||
case 449: return "cryptofshade";
|
|
||||||
case 451: return "dragonscaleb";
|
|
||||||
case 452: return "oldfieldofbone";
|
|
||||||
case 453: return "oldkaesoraa";
|
|
||||||
case 454: return "oldkaesorab";
|
|
||||||
case 455: return "oldkurn";
|
|
||||||
case 456: return "oldkithicor";
|
|
||||||
case 457: return "oldcommons";
|
|
||||||
case 458: return "oldhighpass";
|
|
||||||
case 459: return "thevoida";
|
|
||||||
case 460: return "thevoidb";
|
|
||||||
case 461: return "thevoidc";
|
|
||||||
case 462: return "thevoidd";
|
|
||||||
case 463: return "thevoide";
|
|
||||||
case 464: return "thevoidf";
|
|
||||||
case 465: return "thevoidg";
|
|
||||||
case 466: return "oceangreenhills";
|
|
||||||
case 467: return "oceangreenvillage";
|
|
||||||
case 468: return "oldblackburrow";
|
|
||||||
case 469: return "bertoxtemple";
|
|
||||||
case 470: return "discord";
|
|
||||||
case 471: return "discordtower";
|
|
||||||
case 472: return "oldbloodfield";
|
|
||||||
case 473: return "precipiceofwar";
|
|
||||||
case 474: return "olddranik";
|
|
||||||
case 475: return "toskirakk";
|
|
||||||
case 476: return "korascian";
|
|
||||||
case 477: return "rathechamber";
|
|
||||||
case 480: return "brellsrest";
|
|
||||||
case 481: return "fungalforest";
|
|
||||||
case 482: return "underquarry";
|
|
||||||
case 483: return "coolingchamber";
|
|
||||||
case 484: return "shiningcity";
|
|
||||||
case 485: return "arthicrex";
|
|
||||||
case 486: return "foundation";
|
|
||||||
case 487: return "lichencreep";
|
|
||||||
case 488: return "pellucid";
|
|
||||||
case 489: return "stonesnake";
|
|
||||||
case 490: return "brellstemple";
|
|
||||||
case 491: return "convorteum";
|
|
||||||
case 492: return "brellsarena";
|
|
||||||
case 493: return "weddingchapel";
|
|
||||||
case 494: return "weddingchapeldark";
|
|
||||||
case 495: return "dragoncrypt";
|
|
||||||
case 700: return "feerrott2";
|
|
||||||
case 701: return "thulehouse1";
|
|
||||||
case 702: return "thulehouse2";
|
|
||||||
case 703: return "housegarden";
|
|
||||||
case 704: return "thulelibrary";
|
|
||||||
case 705: return "well";
|
|
||||||
case 706: return "fallen";
|
|
||||||
case 707: return "morellcastle";
|
|
||||||
case 708: return "somnium";
|
|
||||||
case 709: return "alkabormare";
|
|
||||||
case 710: return "miragulmare";
|
|
||||||
case 711: return "thuledream";
|
|
||||||
case 712: return "neighborhood";
|
|
||||||
case 724: return "argath";
|
|
||||||
case 725: return "arelis";
|
|
||||||
case 726: return "sarithcity";
|
|
||||||
case 727: return "rubak";
|
|
||||||
case 728: return "beastdomain";
|
|
||||||
case 729: return "resplendent";
|
|
||||||
case 730: return "pillarsalra";
|
|
||||||
case 731: return "windsong";
|
|
||||||
case 732: return "cityofbronze";
|
|
||||||
case 733: return "sepulcher";
|
|
||||||
case 734: return "eastsepulcher";
|
|
||||||
case 735: return "westsepulcher";
|
|
||||||
case 752: return "shardslanding";
|
|
||||||
case 753: return "xorbb";
|
|
||||||
case 754: return "kaelshard";
|
|
||||||
case 755: return "eastwastesshard";
|
|
||||||
case 756: return "crystalshard";
|
|
||||||
case 757: return "breedinggrounds";
|
|
||||||
case 758: return "eviltree";
|
|
||||||
case 759: return "grelleth";
|
|
||||||
case 760: return "chapterhouse";
|
|
||||||
case 996: return "arttest";
|
|
||||||
case 998: return "fhalls";
|
|
||||||
case 999: return "apprentice";
|
|
||||||
}
|
|
||||||
return "UNKNWN";
|
|
||||||
}
|
|
||||||
@@ -28,11 +28,6 @@
|
|||||||
int ZoneLaunch::s_running = 0; //the number of zones running under this launcher
|
int ZoneLaunch::s_running = 0; //the number of zones running under this launcher
|
||||||
Timer ZoneLaunch::s_startTimer(1); //I do not trust this things state after static initialization
|
Timer ZoneLaunch::s_startTimer(1); //I do not trust this things state after static initialization
|
||||||
|
|
||||||
void ZoneLaunch::InitStartTimer() {
|
|
||||||
s_startTimer.Start(1);
|
|
||||||
s_startTimer.Trigger();
|
|
||||||
}
|
|
||||||
|
|
||||||
ZoneLaunch::ZoneLaunch(WorldServer *world, const char *launcher_name,
|
ZoneLaunch::ZoneLaunch(WorldServer *world, const char *launcher_name,
|
||||||
const char *zone_name, uint16 port, const EQEmuConfig *config)
|
const char *zone_name, uint16 port, const EQEmuConfig *config)
|
||||||
: m_state(StateStartPending),
|
: m_state(StateStartPending),
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ public:
|
|||||||
void SendStatus() const;
|
void SendStatus() const;
|
||||||
|
|
||||||
const char *GetZone() const { return(m_zone.c_str()); }
|
const char *GetZone() const { return(m_zone.c_str()); }
|
||||||
uint32 GetStartCount() const { return(m_startCount); }
|
|
||||||
|
|
||||||
//should only be called during process init to setup the start timer.
|
|
||||||
static void InitStartTimer();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool IsRunning() const { return(m_state == StateStarted || m_state == StateStopPending || m_state == StateRestartPending); }
|
bool IsRunning() const { return(m_state == StateStarted || m_state == StateStopPending || m_state == StateRestartPending); }
|
||||||
|
|||||||
@@ -260,27 +260,6 @@ bool AccountManagement::UpdateLoginserverWorldAdminAccountPasswordByName(
|
|||||||
return updated_account;
|
return updated_account;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param in_account_id
|
|
||||||
* @param in_account_password_hash
|
|
||||||
*/
|
|
||||||
bool AccountManagement::UpdateLoginserverWorldAdminAccountPasswordById(
|
|
||||||
uint32 in_account_id,
|
|
||||||
const std::string &in_account_password_hash
|
|
||||||
)
|
|
||||||
{
|
|
||||||
bool updated_account = server.db->UpdateLoginWorldAdminAccountPassword(in_account_id, in_account_password_hash);
|
|
||||||
|
|
||||||
LogInfo(
|
|
||||||
"[{}] account_name [{}] status [{}]",
|
|
||||||
__func__,
|
|
||||||
in_account_id,
|
|
||||||
(updated_account ? "success" : "failed")
|
|
||||||
);
|
|
||||||
|
|
||||||
return updated_account;
|
|
||||||
}
|
|
||||||
|
|
||||||
constexpr int REQUEST_TIMEOUT_MS = 1500;
|
constexpr int REQUEST_TIMEOUT_MS = 1500;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -80,16 +80,6 @@ public:
|
|||||||
const std::string &in_account_password
|
const std::string &in_account_password
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* @param in_account_id
|
|
||||||
* @param in_account_password_hash
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
static bool UpdateLoginserverWorldAdminAccountPasswordById(
|
|
||||||
uint32 in_account_id,
|
|
||||||
const std::string &in_account_password_hash
|
|
||||||
);
|
|
||||||
|
|
||||||
static uint32 HealthCheckUserLogin();
|
static uint32 HealthCheckUserLogin();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -658,146 +658,6 @@ void Client::CreateEQEmuAccount(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param connection
|
|
||||||
*/
|
|
||||||
void Client::LoginOnNewConnection(std::shared_ptr<EQ::Net::DaybreakConnection> connection)
|
|
||||||
{
|
|
||||||
m_login_connection = connection;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param conn
|
|
||||||
* @param from
|
|
||||||
* @param to
|
|
||||||
*/
|
|
||||||
void Client::LoginOnStatusChange(
|
|
||||||
std::shared_ptr<EQ::Net::DaybreakConnection> conn,
|
|
||||||
EQ::Net::DbProtocolStatus from,
|
|
||||||
EQ::Net::DbProtocolStatus to
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (to == EQ::Net::StatusConnected) {
|
|
||||||
LogDebug("EQ::Net::StatusConnected");
|
|
||||||
LoginSendSessionReady();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (to == EQ::Net::StatusDisconnecting || to == EQ::Net::StatusDisconnected) {
|
|
||||||
LogDebug("EQ::Net::StatusDisconnecting || EQ::Net::StatusDisconnected");
|
|
||||||
|
|
||||||
DoFailedLogin();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param conn
|
|
||||||
* @param from
|
|
||||||
* @param to
|
|
||||||
*/
|
|
||||||
void Client::LoginOnStatusChangeIgnored(
|
|
||||||
std::shared_ptr<EQ::Net::DaybreakConnection> conn,
|
|
||||||
EQ::Net::DbProtocolStatus from,
|
|
||||||
EQ::Net::DbProtocolStatus to
|
|
||||||
)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param conn
|
|
||||||
* @param p
|
|
||||||
*/
|
|
||||||
void Client::LoginOnPacketRecv(std::shared_ptr<EQ::Net::DaybreakConnection> conn, const EQ::Net::Packet &p)
|
|
||||||
{
|
|
||||||
auto opcode = p.GetUInt16(0);
|
|
||||||
switch (opcode) {
|
|
||||||
case 0x0017: //OP_ChatMessage
|
|
||||||
LoginSendLogin();
|
|
||||||
break;
|
|
||||||
case 0x0018:
|
|
||||||
LoginProcessLoginResponse(p);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::LoginSendSessionReady()
|
|
||||||
{
|
|
||||||
EQ::Net::DynamicPacket p;
|
|
||||||
p.PutUInt16(0, 1); //OP_SessionReady
|
|
||||||
p.PutUInt32(2, 2);
|
|
||||||
|
|
||||||
m_login_connection->QueuePacket(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
void Client::LoginSendLogin()
|
|
||||||
{
|
|
||||||
size_t buffer_len = m_stored_user.length() + m_stored_pass.length() + 2;
|
|
||||||
std::unique_ptr<char[]> buffer(new char[buffer_len]);
|
|
||||||
|
|
||||||
strcpy(&buffer[0], m_stored_user.c_str());
|
|
||||||
strcpy(&buffer[m_stored_user.length() + 1], m_stored_pass.c_str());
|
|
||||||
|
|
||||||
size_t encrypted_len = buffer_len;
|
|
||||||
|
|
||||||
if (encrypted_len % 8 > 0) {
|
|
||||||
encrypted_len = ((encrypted_len / 8) + 1) * 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
EQ::Net::DynamicPacket p;
|
|
||||||
p.Resize(12 + encrypted_len);
|
|
||||||
p.PutUInt16(0, 2); //OP_Login
|
|
||||||
p.PutUInt32(2, 3);
|
|
||||||
|
|
||||||
eqcrypt_block(&buffer[0], buffer_len, (char *) p.Data() + 12, true);
|
|
||||||
|
|
||||||
m_login_connection->QueuePacket(p);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param p
|
|
||||||
*/
|
|
||||||
void Client::LoginProcessLoginResponse(const EQ::Net::Packet &p)
|
|
||||||
{
|
|
||||||
auto encrypt_size = p.Length() - 12;
|
|
||||||
|
|
||||||
if (encrypt_size % 8 > 0) {
|
|
||||||
encrypt_size = (encrypt_size / 8) * 8;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::unique_ptr<char[]> decrypted(new char[encrypt_size]);
|
|
||||||
|
|
||||||
eqcrypt_block((char *) p.Data() + 12, encrypt_size, &decrypted[0], false);
|
|
||||||
|
|
||||||
EQ::Net::StaticPacket sp(&decrypted[0], encrypt_size);
|
|
||||||
auto response_error = sp.GetUInt16(1);
|
|
||||||
|
|
||||||
m_login_connection_manager->OnConnectionStateChange(
|
|
||||||
std::bind(
|
|
||||||
&Client::LoginOnStatusChangeIgnored,
|
|
||||||
this,
|
|
||||||
std::placeholders::_1,
|
|
||||||
std::placeholders::_2,
|
|
||||||
std::placeholders::_3
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
if (response_error > 101) {
|
|
||||||
LogDebug("response [{0}] failed login", response_error);
|
|
||||||
DoFailedLogin();
|
|
||||||
m_login_connection->Close();
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LogDebug(
|
|
||||||
"response [{0}] login succeeded user [{1}]",
|
|
||||||
response_error,
|
|
||||||
m_stored_user
|
|
||||||
);
|
|
||||||
|
|
||||||
auto m_dbid = sp.GetUInt32(8);
|
|
||||||
|
|
||||||
CreateEQEmuAccount(m_stored_user, m_stored_pass, m_dbid);
|
|
||||||
m_login_connection->Close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
bool Client::ProcessHealthCheck(std::string username)
|
bool Client::ProcessHealthCheck(std::string username)
|
||||||
{
|
{
|
||||||
if (username == "healthcheckuser") {
|
if (username == "healthcheckuser") {
|
||||||
|
|||||||
@@ -198,21 +198,6 @@ private:
|
|||||||
|
|
||||||
std::string m_stored_user;
|
std::string m_stored_user;
|
||||||
std::string m_stored_pass;
|
std::string m_stored_pass;
|
||||||
void LoginOnNewConnection(std::shared_ptr<EQ::Net::DaybreakConnection> connection);
|
|
||||||
void LoginOnStatusChange(
|
|
||||||
std::shared_ptr<EQ::Net::DaybreakConnection> conn,
|
|
||||||
EQ::Net::DbProtocolStatus from,
|
|
||||||
EQ::Net::DbProtocolStatus to
|
|
||||||
);
|
|
||||||
void LoginOnStatusChangeIgnored(
|
|
||||||
std::shared_ptr<EQ::Net::DaybreakConnection> conn,
|
|
||||||
EQ::Net::DbProtocolStatus from,
|
|
||||||
EQ::Net::DbProtocolStatus to
|
|
||||||
);
|
|
||||||
void LoginOnPacketRecv(std::shared_ptr<EQ::Net::DaybreakConnection> conn, const EQ::Net::Packet &p);
|
|
||||||
void LoginSendSessionReady();
|
|
||||||
void LoginSendLogin();
|
|
||||||
void LoginProcessLoginResponse(const EQ::Net::Packet &p);
|
|
||||||
static bool ProcessHealthCheck(std::string username);
|
static bool ProcessHealthCheck(std::string username);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Database::Database(
|
|||||||
user.c_str(),
|
user.c_str(),
|
||||||
pass.c_str(),
|
pass.c_str(),
|
||||||
name.c_str(),
|
name.c_str(),
|
||||||
Strings::ToInt(port),
|
Strings::ToUnsignedInt(port),
|
||||||
&errnum,
|
&errnum,
|
||||||
errbuf
|
errbuf
|
||||||
)
|
)
|
||||||
@@ -93,7 +93,7 @@ bool Database::GetLoginDataFromAccountInfo(
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
id = Strings::ToInt(row[0]);
|
id = Strings::ToUnsignedInt(row[0]);
|
||||||
password = row[1];
|
password = row[1];
|
||||||
|
|
||||||
LogDebug(
|
LogDebug(
|
||||||
@@ -145,7 +145,7 @@ bool Database::GetLoginTokenDataFromToken(
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(row[2], "login_server_id") == 0) {
|
if (strcmp(row[2], "login_server_id") == 0) {
|
||||||
db_account_id = Strings::ToInt(row[3]);
|
db_account_id = Strings::ToUnsignedInt(row[3]);
|
||||||
found_login_id = true;
|
found_login_id = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@ unsigned int Database::GetFreeID(const std::string &loginserver)
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
return Strings::ToInt(row[0]);
|
return Strings::ToUnsignedInt(row[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -373,7 +373,7 @@ Database::DbWorldRegistration Database::GetWorldRegistration(
|
|||||||
r.server_list_type = Strings::ToInt(row[3]);
|
r.server_list_type = Strings::ToInt(row[3]);
|
||||||
r.is_server_trusted = Strings::ToInt(row[2]) > 0;
|
r.is_server_trusted = Strings::ToInt(row[2]) > 0;
|
||||||
r.server_list_description = row[4];
|
r.server_list_description = row[4];
|
||||||
r.server_admin_id = Strings::ToInt(row[5]);
|
r.server_admin_id = Strings::ToUnsignedInt(row[5]);
|
||||||
|
|
||||||
if (r.server_admin_id <= 0) {
|
if (r.server_admin_id <= 0) {
|
||||||
return r;
|
return r;
|
||||||
@@ -513,7 +513,7 @@ bool Database::CreateWorldRegistration(
|
|||||||
|
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
|
|
||||||
id = Strings::ToInt(row[0]);
|
id = Strings::ToUnsignedInt(row[0]);
|
||||||
auto insert_query = fmt::format(
|
auto insert_query = fmt::format(
|
||||||
"INSERT INTO login_world_servers SET id = {0}, long_name = '{1}', short_name = '{2}', last_ip_address = '{3}', \n"
|
"INSERT INTO login_world_servers SET id = {0}, long_name = '{1}', short_name = '{2}', last_ip_address = '{3}', \n"
|
||||||
"login_server_list_type_id = 3, login_server_admin_id = {4}, is_server_trusted = 0, tag_description = ''",
|
"login_server_list_type_id = 3, login_server_admin_id = {4}, is_server_trusted = 0, tag_description = ''",
|
||||||
@@ -647,7 +647,7 @@ Database::DbLoginServerAdmin Database::GetLoginServerAdmin(const std::string &ac
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
r.loaded = true;
|
r.loaded = true;
|
||||||
r.id = Strings::ToInt(row[0]);
|
r.id = Strings::ToUnsignedInt(row[0]);
|
||||||
r.account_name = row[1];
|
r.account_name = row[1];
|
||||||
r.account_password = row[2];
|
r.account_password = row[2];
|
||||||
r.first_name = row[3];
|
r.first_name = row[3];
|
||||||
@@ -683,7 +683,7 @@ Database::DbLoginServerAccount Database::GetLoginServerAccountByAccountName(
|
|||||||
if (results.RowCount() == 1) {
|
if (results.RowCount() == 1) {
|
||||||
auto row = results.begin();
|
auto row = results.begin();
|
||||||
r.loaded = true;
|
r.loaded = true;
|
||||||
r.id = Strings::ToInt(row[0]);
|
r.id = Strings::ToUnsignedInt(row[0]);
|
||||||
r.account_name = row[1];
|
r.account_name = row[1];
|
||||||
r.account_password = row[2];
|
r.account_password = row[2];
|
||||||
r.account_email = row[3];
|
r.account_email = row[3];
|
||||||
|
|||||||
@@ -29,7 +29,6 @@ public:
|
|||||||
* Destructor, frees our database if needed.
|
* Destructor, frees our database if needed.
|
||||||
*/
|
*/
|
||||||
~Database();
|
~Database();
|
||||||
bool IsConnected() { return (m_database != nullptr); }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the login data (password hash and account id) from the account name provided needed for client login procedure.
|
* Retrieves the login data (password hash and account id) from the account name provided needed for client login procedure.
|
||||||
|
|||||||
@@ -23,13 +23,6 @@ struct LoginHandShakeReply_Struct {
|
|||||||
char unknown[1]; // variable length string
|
char unknown[1]; // variable length string
|
||||||
};
|
};
|
||||||
|
|
||||||
// for reference, login buffer is variable (minimum size 8 due to encryption)
|
|
||||||
struct PlayerLogin_Struct {
|
|
||||||
LoginBaseMessage_Struct base_header;
|
|
||||||
char username[1];
|
|
||||||
char password[1];
|
|
||||||
};
|
|
||||||
|
|
||||||
// variable length, can use directly if not serializing strings
|
// variable length, can use directly if not serializing strings
|
||||||
struct PlayerLoginReply_Struct {
|
struct PlayerLoginReply_Struct {
|
||||||
// base header excluded to make struct data easier to encrypt
|
// base header excluded to make struct data easier to encrypt
|
||||||
|
|||||||
@@ -73,25 +73,6 @@ ServerManager::ServerManager()
|
|||||||
|
|
||||||
ServerManager::~ServerManager() = default;
|
ServerManager::~ServerManager() = default;
|
||||||
|
|
||||||
/**
|
|
||||||
* @param ip_address
|
|
||||||
* @param port
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
WorldServer *ServerManager::GetServerByAddress(const std::string &ip_address, int port)
|
|
||||||
{
|
|
||||||
auto iter = m_world_servers.begin();
|
|
||||||
while (iter != m_world_servers.end()) {
|
|
||||||
if ((*iter)->GetConnection()->Handle()->RemoteIP() == ip_address &&
|
|
||||||
(*iter)->GetConnection()->Handle()->RemotePort()) {
|
|
||||||
return (*iter).get();
|
|
||||||
}
|
|
||||||
++iter;
|
|
||||||
}
|
|
||||||
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param client
|
* @param client
|
||||||
* @param sequence
|
* @param sequence
|
||||||
|
|||||||
@@ -72,17 +72,6 @@ public:
|
|||||||
const std::list<std::unique_ptr<WorldServer>> &getWorldServers() const;
|
const std::list<std::unique_ptr<WorldServer>> &getWorldServers() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/**
|
|
||||||
* Retrieves a server(if exists) by ip address
|
|
||||||
* Useful utility for the reconnect process
|
|
||||||
*
|
|
||||||
* @param ip_address
|
|
||||||
* @param port
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
WorldServer *GetServerByAddress(const std::string &ip_address, int port);
|
|
||||||
|
|
||||||
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
|
std::unique_ptr<EQ::Net::ServertalkServer> m_server_connection;
|
||||||
std::list<std::unique_ptr<WorldServer>> m_world_servers;
|
std::list<std::unique_ptr<WorldServer>> m_world_servers;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,6 @@ public:
|
|||||||
* Accesses connection, it is intentional that this is not const (trust me).
|
* Accesses connection, it is intentional that this is not const (trust me).
|
||||||
*/
|
*/
|
||||||
std::shared_ptr<EQ::Net::ServertalkServerConnection> GetConnection() { return m_connection; }
|
std::shared_ptr<EQ::Net::ServertalkServerConnection> GetConnection() { return m_connection; }
|
||||||
void SetConnection(std::shared_ptr<EQ::Net::ServertalkServerConnection> c) { m_connection = c; }
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return
|
* @return
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eqemu-server",
|
"name": "eqemu-server",
|
||||||
"version": "22.4.5",
|
"version": "22.9.0",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/EQEmu/Server.git"
|
"url": "https://github.com/EQEmu/Server.git"
|
||||||
|
|||||||
@@ -45,12 +45,6 @@ public:
|
|||||||
void LogPlayerMove(QSPlayerLogMove_Struct* QS, uint32 Items);
|
void LogPlayerMove(QSPlayerLogMove_Struct* QS, uint32 Items);
|
||||||
void LogMerchantTransaction(QSMerchantLogTransaction_Struct* QS, uint32 Items);
|
void LogMerchantTransaction(QSMerchantLogTransaction_Struct* QS, uint32 Items);
|
||||||
void GeneralQueryReceive(ServerPacket *pack);
|
void GeneralQueryReceive(ServerPacket *pack);
|
||||||
|
|
||||||
protected:
|
|
||||||
void HandleMysqlError(uint32 errnum);
|
|
||||||
private:
|
|
||||||
void DBInitVars();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+5
-3
@@ -393,14 +393,16 @@ bool ChatChannel::RemoveClient(Client *c) {
|
|||||||
|
|
||||||
void ChatChannel::SendOPList(Client *c)
|
void ChatChannel::SendOPList(Client *c)
|
||||||
{
|
{
|
||||||
if (!c)
|
if (!c) {
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
c->GeneralChannelMessage("Channel " + m_name + " op-list: (Owner=" + m_owner + ")");
|
c->GeneralChannelMessage("Channel " + m_name + " op-list: (Owner=" + m_owner + ")");
|
||||||
|
|
||||||
for (auto &&m : m_moderators)
|
for (auto &&m : m_moderators) {
|
||||||
c->GeneralChannelMessage(m);
|
c->GeneralChannelMessage(m);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ChatChannel::SendChannelMembers(Client *c) {
|
void ChatChannel::SendChannelMembers(Client *c) {
|
||||||
|
|
||||||
@@ -657,7 +659,7 @@ ChatChannel *ChatChannelList::RemoveClientFromChannel(const std::string& in_chan
|
|||||||
std::string channel_name = in_channel_name;
|
std::string channel_name = in_channel_name;
|
||||||
|
|
||||||
if (in_channel_name.length() > 0 && isdigit(channel_name[0])) {
|
if (in_channel_name.length() > 0 && isdigit(channel_name[0])) {
|
||||||
channel_name = c->ChannelSlotName(Strings::ToInt(in_channel_name.c_str()));
|
channel_name = c->ChannelSlotName(Strings::ToInt(in_channel_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto *required_channel = FindChannel(channel_name);
|
auto *required_channel = FindChannel(channel_name);
|
||||||
|
|||||||
+17
-15
@@ -379,14 +379,14 @@ static void ProcessSetMessageStatus(std::string SetMessageCommand) {
|
|||||||
|
|
||||||
if (NumEnd == std::string::npos) {
|
if (NumEnd == std::string::npos) {
|
||||||
|
|
||||||
MessageNumber = Strings::ToInt(SetMessageCommand.substr(NumStart).c_str());
|
MessageNumber = Strings::ToInt(SetMessageCommand.substr(NumStart));
|
||||||
|
|
||||||
database.SetMessageStatus(MessageNumber, Status);
|
database.SetMessageStatus(MessageNumber, Status);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
MessageNumber = Strings::ToInt(SetMessageCommand.substr(NumStart, NumEnd - NumStart).c_str());
|
MessageNumber = Strings::ToInt(SetMessageCommand.substr(NumStart, NumEnd - NumStart));
|
||||||
|
|
||||||
database.SetMessageStatus(MessageNumber, Status);
|
database.SetMessageStatus(MessageNumber, Status);
|
||||||
|
|
||||||
@@ -571,7 +571,9 @@ void Clientlist::CheckForStaleConnectionsAll()
|
|||||||
|
|
||||||
void Clientlist::CheckForStaleConnections(Client *c) {
|
void Clientlist::CheckForStaleConnections(Client *c) {
|
||||||
|
|
||||||
if (!c) return;
|
if (!c) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
std::list<Client*>::iterator Iterator;
|
std::list<Client*>::iterator Iterator;
|
||||||
|
|
||||||
@@ -876,7 +878,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string command_string, boo
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case CommandGetBody:
|
case CommandGetBody:
|
||||||
database.SendBody(c, Strings::ToInt(parameters.c_str()));
|
database.SendBody(c, Strings::ToInt(parameters));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CommandMailTo:
|
case CommandMailTo:
|
||||||
@@ -891,7 +893,7 @@ void Clientlist::ProcessOPMailCommand(Client *c, std::string command_string, boo
|
|||||||
case CommandSelectMailBox:
|
case CommandSelectMailBox:
|
||||||
{
|
{
|
||||||
std::string::size_type NumStart = parameters.find_first_of("0123456789");
|
std::string::size_type NumStart = parameters.find_first_of("0123456789");
|
||||||
c->ChangeMailBox(Strings::ToInt(parameters.substr(NumStart).c_str()));
|
c->ChangeMailBox(Strings::ToInt(parameters.substr(NumStart)));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CommandSetMailForwarding:
|
case CommandSetMailForwarding:
|
||||||
@@ -1253,7 +1255,7 @@ void Client::ProcessChannelList(std::string Input) {
|
|||||||
std::string ChannelName = Input;
|
std::string ChannelName = Input;
|
||||||
|
|
||||||
if (isdigit(ChannelName[0]))
|
if (isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||||
|
|
||||||
@@ -1414,7 +1416,7 @@ void Client::SendChannelMessageByNumber(std::string Message) {
|
|||||||
if (MessageStart == std::string::npos)
|
if (MessageStart == std::string::npos)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
int ChannelNumber = Strings::ToInt(Message.substr(0, MessageStart).c_str());
|
int ChannelNumber = Strings::ToInt(Message.substr(0, MessageStart));
|
||||||
|
|
||||||
if ((ChannelNumber < 1) || (ChannelNumber > MAX_JOINED_CHANNELS)) {
|
if ((ChannelNumber < 1) || (ChannelNumber > MAX_JOINED_CHANNELS)) {
|
||||||
|
|
||||||
@@ -1657,7 +1659,7 @@ void Client::SetChannelPassword(std::string ChannelPassword) {
|
|||||||
std::string ChannelName = ChannelPassword.substr(ChannelStart);
|
std::string ChannelName = ChannelPassword.substr(ChannelStart);
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
std::string Message;
|
std::string Message;
|
||||||
|
|
||||||
@@ -1722,7 +1724,7 @@ void Client::SetChannelOwner(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
LogInfo("Set owner of channel [[{}]] to [[{}]]", ChannelName.c_str(), NewOwner.c_str());
|
LogInfo("Set owner of channel [[{}]] to [[{}]]", ChannelName.c_str(), NewOwner.c_str());
|
||||||
|
|
||||||
@@ -1768,7 +1770,7 @@ void Client::OPList(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||||
|
|
||||||
@@ -1811,7 +1813,7 @@ void Client::ChannelInvite(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
LogInfo("[[{}]] invites [[{}]] to channel [[{}]]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
|
LogInfo("[[{}]] invites [[{}]] to channel [[{}]]", GetName().c_str(), Invitee.c_str(), ChannelName.c_str());
|
||||||
|
|
||||||
@@ -1881,7 +1883,7 @@ void Client::ChannelModerate(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
ChatChannel *RequiredChannel = ChannelList->FindChannel(ChannelName);
|
||||||
|
|
||||||
@@ -1939,7 +1941,7 @@ void Client::ChannelGrantModerator(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
LogInfo("[[{}]] gives [[{}]] moderator rights to channel [[{}]]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
|
LogInfo("[[{}]] gives [[{}]] moderator rights to channel [[{}]]", GetName().c_str(), Moderator.c_str(), ChannelName.c_str());
|
||||||
|
|
||||||
@@ -2020,7 +2022,7 @@ void Client::ChannelGrantVoice(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
LogInfo("[[{}]] gives [[{}]] voice to channel [[{}]]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
|
LogInfo("[[{}]] gives [[{}]] voice to channel [[{}]]", GetName().c_str(), Voicee.c_str(), ChannelName.c_str());
|
||||||
|
|
||||||
@@ -2108,7 +2110,7 @@ void Client::ChannelKick(std::string CommandString) {
|
|||||||
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
std::string ChannelName = CapitaliseName(CommandString.substr(ChannelStart));
|
||||||
|
|
||||||
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
if ((ChannelName.length() > 0) && isdigit(ChannelName[0]))
|
||||||
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName.c_str()));
|
ChannelName = ChannelSlotName(Strings::ToInt(ChannelName));
|
||||||
|
|
||||||
LogInfo("[[{}]] kicks [[{}]] from channel [[{}]]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
|
LogInfo("[[{}]] kicks [[{}]] from channel [[{}]]", GetName().c_str(), Kickee.c_str(), ChannelName.c_str());
|
||||||
|
|
||||||
|
|||||||
@@ -283,18 +283,6 @@ void UCSDatabase::LoadFilteredNamesFromDB()
|
|||||||
LogInfo("Loaded [{}] filtered channel name(s)", names.size());
|
LogInfo("Loaded [{}] filtered channel name(s)", names.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UCSDatabase::IsChatChannelInDB(const std::string& channel_name)
|
|
||||||
{
|
|
||||||
auto r = ChatchannelsRepository::Count(
|
|
||||||
*this,
|
|
||||||
fmt::format(
|
|
||||||
"name = {}", Strings::Escape(channel_name)
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
return r > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void UCSDatabase::SaveChatChannel(
|
void UCSDatabase::SaveChatChannel(
|
||||||
const std::string& channel_name,
|
const std::string& channel_name,
|
||||||
const std::string& channel_owner,
|
const std::string& channel_owner,
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ public:
|
|||||||
bool LoadChatChannels();
|
bool LoadChatChannels();
|
||||||
void LoadReservedNamesFromDB();
|
void LoadReservedNamesFromDB();
|
||||||
void LoadFilteredNamesFromDB();
|
void LoadFilteredNamesFromDB();
|
||||||
bool IsChatChannelInDB(const std::string& channel_name);
|
|
||||||
bool CheckChannelNameFilter(const std::string& channel_name);
|
bool CheckChannelNameFilter(const std::string& channel_name);
|
||||||
void SaveChatChannel(const std::string& channel_name, const std::string& channel_owner, const std::string& channel_password, const uint16& min_status);
|
void SaveChatChannel(const std::string& channel_name, const std::string& channel_owner, const std::string& channel_password, const uint16& min_status);
|
||||||
void DeleteChatChannel(const std::string& channel_name);
|
void DeleteChatChannel(const std::string& channel_name);
|
||||||
@@ -62,12 +61,6 @@ public:
|
|||||||
void AddFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
|
void AddFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
|
||||||
void RemoveFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
|
void RemoveFriendOrIgnore(const int& char_id, const int& type, const std::string& name);
|
||||||
void GetFriendsAndIgnore(const int& char_id, std::vector<std::string> &Friends, std::vector<std::string> &Ignorees);
|
void GetFriendsAndIgnore(const int& char_id, std::vector<std::string> &Friends, std::vector<std::string> &Ignorees);
|
||||||
|
|
||||||
protected:
|
|
||||||
void HandleMysqlError(uint32 errnum);
|
|
||||||
private:
|
|
||||||
void DBInitVars();
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
+1
-2
@@ -120,8 +120,7 @@ void WorldServer::ProcessMessage(uint16 opcode, EQ::Net::Packet &p)
|
|||||||
if (Message.length() < 2)
|
if (Message.length() < 2)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (!c)
|
if (!c) {
|
||||||
{
|
|
||||||
LogInfo("Client not found");
|
LogInfo("Client not found");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
//NOTE: you must have a space after the * of a return value
|
|
||||||
|
|
||||||
unsigned int field_count();
|
|
||||||
unsigned long affected_rows();
|
|
||||||
unsigned long insert_id();
|
|
||||||
unsigned int get_errno();
|
|
||||||
Const_char * error();
|
|
||||||
EQDBRes * query(Const_char *q);
|
|
||||||
Const_char * escape_string(Const_char *from); //NOT THREAD SAFE! (m_escapeBuffer)
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "../common/useperl.h"
|
|
||||||
#include "EQDB.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = EQDB PACKAGE = EQDB
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
unsigned long num_rows() { return (res) ? mysql_num_rows(res) : 0; }
|
|
||||||
unsigned long num_fields() { return (res) ? mysql_num_fields(res) : 0; }
|
|
||||||
void DESTROY() { }
|
|
||||||
void finish() { if (res) mysql_free_result(res); res=NULL; };
|
|
||||||
vector<string> fetch_row_array();
|
|
||||||
map<string,string> fetch_row_hash();
|
|
||||||
unsigned long * fetch_lengths() { return (res) ? mysql_fetch_lengths(res) : 0; }
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "../common/useperl.h"
|
|
||||||
#include "EQDBRes.h"
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = EQDBRes PACKAGE = EQDBRes
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
Const_char * GetName() const { return(m_name.c_str()); }
|
|
||||||
int GetStaticCount() const { return(m_zones.size()); }
|
|
||||||
bool IsConnected() const; //is this launcher connected to world
|
|
||||||
|
|
||||||
void DeleteLauncher(); //kill this launcher and all its zones.
|
|
||||||
|
|
||||||
void RestartZone(Const_char *zone_ref);
|
|
||||||
void StopZone(Const_char *zone_ref);
|
|
||||||
void StartZone(Const_char *zone_ref);
|
|
||||||
|
|
||||||
bool BootStaticZone(Const_char *short_name, uint16 port);
|
|
||||||
bool ChangeStaticZone(Const_char *short_name, uint16 port);
|
|
||||||
bool DeleteStaticZone(Const_char *short_name);
|
|
||||||
|
|
||||||
bool SetDynamicCount(int count);
|
|
||||||
int GetDynamicCount() const;
|
|
||||||
|
|
||||||
vector<string> ListZones(); //returns an array of zone refs
|
|
||||||
map<string,string> GetZoneDetails(Const_char *zone_ref);
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "EQWParser.h"
|
|
||||||
#include "EQLConfig.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = EQLConfig PACKAGE = EQLConfig
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
//NOTE: you must have a space after the * of a return value
|
|
||||||
Const_char * GetConfig(Const_char *var_name);
|
|
||||||
void LockWorld();
|
|
||||||
void UnlockWorld();
|
|
||||||
|
|
||||||
bool LSConnected();
|
|
||||||
void LSReconnect();
|
|
||||||
|
|
||||||
int CountZones();
|
|
||||||
vector<string> ListBootedZones(); //returns an array of zone_refs (opaque)
|
|
||||||
map<string,string> GetZoneDetails(Const_char *zone_ref); //returns a hash ref of details
|
|
||||||
|
|
||||||
int CountPlayers();
|
|
||||||
vector<string> ListPlayers(Const_char *zone_name = ""); //returns an array of player refs (opaque)
|
|
||||||
map<string,string> GetPlayerDetails(Const_char *player_ref); //returns a hash ref of details
|
|
||||||
|
|
||||||
int CountLaunchers(bool active_only);
|
|
||||||
// vector<string> ListActiveLaunchers(); //returns an array of launcher names
|
|
||||||
vector<string> ListLaunchers(); //returns an array of launcher names
|
|
||||||
EQLConfig * GetLauncher(Const_char *launcher_name); //returns the EQLConfig object for the specified launcher.
|
|
||||||
void CreateLauncher(Const_char *launcher_name, int dynamic_count);
|
|
||||||
// EQLConfig * FindLauncher(Const_char *zone_ref);
|
|
||||||
|
|
||||||
//Guild routines, mostly wrappers around guild_mgr
|
|
||||||
int32 CreateGuild(const char* name, int32 leader_char_id);
|
|
||||||
bool DeleteGuild(int32 guild_id);
|
|
||||||
bool RenameGuild(int32 guild_id, const char* name);
|
|
||||||
bool SetGuildMOTD(int32 guild_id, const char* motd, const char *setter);
|
|
||||||
bool SetGuildLeader(int32 guild_id, int32 leader_char_id);
|
|
||||||
bool SetGuild(int32 charid, int32 guild_id, int8 rank);
|
|
||||||
bool SetGuildRank(int32 charid, int8 rank);
|
|
||||||
bool SetBankerFlag(int32 charid, bool is_banker);
|
|
||||||
bool SetTributeFlag(int32 charid, bool enabled);
|
|
||||||
bool SetPublicNote(int32 charid, const char *note);
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "EQWParser.h"
|
|
||||||
#include "EQW.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = EQW PACKAGE = EQW
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
Const_char * get(Const_char *name, Const_char *default_value = "") const;
|
|
||||||
int getInt(Const_char *name, int default_value = 0) const;
|
|
||||||
float getFloat(Const_char *name, float default_value = 0.0) const;
|
|
||||||
|
|
||||||
//returns a database-safe string
|
|
||||||
Const_char * getEscaped(Const_char *name, Const_char *default_value = "") const;
|
|
||||||
|
|
||||||
map<string,string> get_all() const;
|
|
||||||
|
|
||||||
void redirect(Const_char *URL);
|
|
||||||
void SetResponseCode(Const_char *code);
|
|
||||||
void header(Const_char *name, Const_char *value);
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#ifdef EMBPERL
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "EQWParser.h"
|
|
||||||
#include "HTTPRequest.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = HTTPRequest PACKAGE = HTTPRequest
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
int32 GetCharID() { return charid; }
|
|
||||||
int32 GetDecayTime() { if (!corpse_decay_timer.Enabled()) return 0xFFFFFFFF; else return corpse_decay_timer.GetRemainingTime(); }
|
|
||||||
inline void Lock() { pLocked = true; }
|
|
||||||
inline void UnLock() { pLocked = false; }
|
|
||||||
inline bool IsLocked() { return pLocked; }
|
|
||||||
inline void ResetLooter() { BeingLootedBy = 0xFFFFFFFF; }
|
|
||||||
inline int32 GetDBID() { return dbid; }
|
|
||||||
inline char* GetOwnerName() { return orgname;}
|
|
||||||
void SetDecayTimer(int32 decaytime);
|
|
||||||
bool IsEmpty();
|
|
||||||
void AddItem(uint32 itemnum, int8 charges, sint16 slot = 0);
|
|
||||||
uint32 GetWornItem(sint16 equipSlot) const;
|
|
||||||
void RemoveItem(int16 lootslot);
|
|
||||||
void SetCash(int16 in_copper, int16 in_silver, int16 in_gold, int16 in_platinum);
|
|
||||||
void RemoveCash();
|
|
||||||
int32 CountItems();
|
|
||||||
void Delete();
|
|
||||||
uint32 GetCopper() { return copper; }
|
|
||||||
uint32 GetSilver() { return silver; }
|
|
||||||
uint32 GetGold() { return gold; }
|
|
||||||
uint32 GetPlatinum() { return platinum; }
|
|
||||||
void Summon(Client* client, bool spell);
|
|
||||||
void CastRezz(int16 spellid, Mob* Caster);
|
|
||||||
void CompleteRezz();
|
|
||||||
bool CanMobLoot(int charid);
|
|
||||||
void AllowMobLoot(Mob *them, int8 slot);
|
|
||||||
void AddLooter(Mob *who);
|
|
||||||
bool IsRezzed() { return isrezzed; }
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
#include "PlayerCorpse.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = Corpse PACKAGE = Corpse
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ ! -h ./miniperl ]; then
|
|
||||||
echo "You must have a link in this dir to perl named ./miniperl"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
./convert client.h Client
|
|
||||||
./convert entity.h EntityList
|
|
||||||
./convert mob.h Mob
|
|
||||||
./convert npc.h NPC
|
|
||||||
./convert PlayerCorpse.h Corpse
|
|
||||||
./convert groups.h Group
|
|
||||||
./convert perlpacket.h PerlPacket
|
|
||||||
./export ../../world/EQW.h EQW.h
|
|
||||||
./convert EQW.h EQW
|
|
||||||
./export ../../common/EQDB.h EQDB.h
|
|
||||||
./convert EQDB.h EQDB
|
|
||||||
./export ../../common/EQDBRes.h EQDBRes.h
|
|
||||||
./convert EQDBRes.h EQDBRes
|
|
||||||
./export ../../world/HTTPRequest.h HTTPRequest.h
|
|
||||||
./convert HTTPRequest.h HTTPRequest
|
|
||||||
./export ../../world/EQLConfig.h EQLConfig.h
|
|
||||||
./convert EQLConfig.h EQLConfig
|
|
||||||
|
|
||||||
echo "Putting files in place..."
|
|
||||||
./put
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
xsubpp -typemap class.typemap class.xs
|
|
||||||
@@ -1,442 +0,0 @@
|
|||||||
#our object types
|
|
||||||
EQLConfig * T_PTROBJ
|
|
||||||
EQDB * T_PTROBJ
|
|
||||||
EQDBRes * T_PTROBJ
|
|
||||||
Client * T_PTROBJ
|
|
||||||
NPC * T_PTROBJ
|
|
||||||
Mob * T_PTROBJ
|
|
||||||
Group * T_PTROBJ
|
|
||||||
Corpse * T_PTROBJ
|
|
||||||
EntityList * T_PTROBJ
|
|
||||||
PerlPacket * T_PTROBJ
|
|
||||||
EQW * T_PTROBJ
|
|
||||||
HTTPRequest * T_PTROBJ
|
|
||||||
Const_char * T_PV
|
|
||||||
|
|
||||||
#some nice c++ types
|
|
||||||
vector<string> T_STRINGARRAY
|
|
||||||
map<string,string> T_STRINGMAP
|
|
||||||
|
|
||||||
#our int types
|
|
||||||
FACTION_VALUE T_IV
|
|
||||||
EmuAppearance T_UV
|
|
||||||
SkillType T_UV
|
|
||||||
Mob::eStandingPetOrder T_IV
|
|
||||||
int32 T_UV
|
|
||||||
int16 T_UV
|
|
||||||
int8 T_UV
|
|
||||||
uint32 T_UV
|
|
||||||
uint16 T_UV
|
|
||||||
uint8 T_UV
|
|
||||||
sint32 T_IV
|
|
||||||
sint16 T_IV
|
|
||||||
sint8 T_IV
|
|
||||||
|
|
||||||
int * T_INTARRAY
|
|
||||||
unsigned long * T_INTARRAY
|
|
||||||
|
|
||||||
# basic C types
|
|
||||||
int T_IV
|
|
||||||
unsigned T_UV
|
|
||||||
unsigned int T_UV
|
|
||||||
long T_IV
|
|
||||||
unsigned long T_UV
|
|
||||||
unsigned long long T_UV
|
|
||||||
short T_IV
|
|
||||||
unsigned short T_UV
|
|
||||||
char T_CHAR
|
|
||||||
unsigned char T_U_CHAR
|
|
||||||
char * T_PV
|
|
||||||
unsigned char * T_PV
|
|
||||||
const char * T_PV
|
|
||||||
caddr_t T_PV
|
|
||||||
wchar_t * T_PV
|
|
||||||
wchar_t T_IV
|
|
||||||
# bool_t is defined in <rpc/rpc.h>
|
|
||||||
bool_t T_IV
|
|
||||||
size_t T_UV
|
|
||||||
ssize_t T_IV
|
|
||||||
time_t T_NV
|
|
||||||
unsigned long * T_OPAQUEPTR
|
|
||||||
char ** T_PACKEDARRAY
|
|
||||||
void * T_PTR
|
|
||||||
Time_t * T_PV
|
|
||||||
SV * T_SV
|
|
||||||
SVREF T_SVREF
|
|
||||||
AV * T_AVREF
|
|
||||||
HV * T_HVREF
|
|
||||||
CV * T_CVREF
|
|
||||||
|
|
||||||
IV T_IV
|
|
||||||
UV T_UV
|
|
||||||
NV T_NV
|
|
||||||
I32 T_IV
|
|
||||||
I16 T_IV
|
|
||||||
I8 T_IV
|
|
||||||
STRLEN T_UV
|
|
||||||
U32 T_U_LONG
|
|
||||||
U16 T_U_SHORT
|
|
||||||
U8 T_UV
|
|
||||||
Result T_U_CHAR
|
|
||||||
Boolean T_BOOL
|
|
||||||
float T_FLOAT
|
|
||||||
double T_DOUBLE
|
|
||||||
SysRet T_SYSRET
|
|
||||||
SysRetLong T_SYSRET
|
|
||||||
FILE * T_STDIO
|
|
||||||
PerlIO * T_INOUT
|
|
||||||
FileHandle T_PTROBJ
|
|
||||||
InputStream T_IN
|
|
||||||
InOutStream T_INOUT
|
|
||||||
OutputStream T_OUT
|
|
||||||
bool T_BOOL
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
INPUT
|
|
||||||
T_SV
|
|
||||||
$var = $arg
|
|
||||||
T_SVREF
|
|
||||||
if (SvROK($arg))
|
|
||||||
$var = (SV*)SvRV($arg);
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not a reference\");
|
|
||||||
T_AVREF
|
|
||||||
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV)
|
|
||||||
$var = (AV*)SvRV($arg);
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not an array reference\");
|
|
||||||
T_HVREF
|
|
||||||
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVHV)
|
|
||||||
$var = (HV*)SvRV($arg);
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not a hash reference\");
|
|
||||||
T_CVREF
|
|
||||||
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVCV)
|
|
||||||
$var = (CV*)SvRV($arg);
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not a code reference\");
|
|
||||||
T_SYSRET
|
|
||||||
$var NOT IMPLEMENTED
|
|
||||||
T_UV
|
|
||||||
$var = ($type)SvUV($arg)
|
|
||||||
T_IV
|
|
||||||
$var = ($type)SvIV($arg)
|
|
||||||
T_INT
|
|
||||||
$var = (int)SvIV($arg)
|
|
||||||
T_ENUM
|
|
||||||
$var = ($type)SvIV($arg)
|
|
||||||
T_BOOL
|
|
||||||
$var = (bool)SvTRUE($arg)
|
|
||||||
T_U_INT
|
|
||||||
$var = (unsigned int)SvUV($arg)
|
|
||||||
T_SHORT
|
|
||||||
$var = (short)SvIV($arg)
|
|
||||||
T_U_SHORT
|
|
||||||
$var = (unsigned short)SvUV($arg)
|
|
||||||
T_LONG
|
|
||||||
$var = (long)SvIV($arg)
|
|
||||||
T_U_LONG
|
|
||||||
$var = (unsigned long)SvUV($arg)
|
|
||||||
T_CHAR
|
|
||||||
$var = (char)*SvPV_nolen($arg)
|
|
||||||
T_U_CHAR
|
|
||||||
$var = (unsigned char)SvUV($arg)
|
|
||||||
T_FLOAT
|
|
||||||
$var = (float)SvNV($arg)
|
|
||||||
T_NV
|
|
||||||
$var = ($type)SvNV($arg)
|
|
||||||
T_DOUBLE
|
|
||||||
$var = (double)SvNV($arg)
|
|
||||||
T_PV
|
|
||||||
$var = ($type)SvPV_nolen($arg)
|
|
||||||
T_PTR
|
|
||||||
$var = INT2PTR($type,SvIV($arg))
|
|
||||||
T_PTRREF
|
|
||||||
if (SvROK($arg)) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = INT2PTR($type,tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not a reference\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_REF_IV_REF
|
|
||||||
if (sv_isa($arg, \"${ntype}\")) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = *INT2PTR($type *, tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not of type ${ntype}\");
|
|
||||||
T_REF_IV_PTR
|
|
||||||
if (sv_isa($arg, \"${ntype}\")) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = INT2PTR($type, tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not of type ${ntype}\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_PTROBJ
|
|
||||||
if (sv_derived_from($arg, \"${ntype}\")) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = INT2PTR($type,tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not of type ${ntype}\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_PTRDESC
|
|
||||||
if (sv_isa($arg, \"${ntype}\")) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
${type}_desc = (\U${type}_DESC\E*) tmp;
|
|
||||||
$var = ${type}_desc->ptr;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not of type ${ntype}\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_REFREF
|
|
||||||
if (SvROK($arg)) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = *INT2PTR($type,tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not a reference\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_REFOBJ
|
|
||||||
if (sv_isa($arg, \"${ntype}\")) {
|
|
||||||
IV tmp = SvIV((SV*)SvRV($arg));
|
|
||||||
$var = *INT2PTR($type,tmp);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not of type ${ntype}\");
|
|
||||||
if($var == NULL)
|
|
||||||
Perl_croak(aTHX_ \"$var is NULL, avoiding crash.\");
|
|
||||||
T_OPAQUE
|
|
||||||
$var = *($type *)SvPV_nolen($arg)
|
|
||||||
T_OPAQUEPTR
|
|
||||||
$var = ($type)SvPV_nolen($arg)
|
|
||||||
T_PACKED
|
|
||||||
$var = XS_unpack_$ntype($arg)
|
|
||||||
T_PACKEDARRAY
|
|
||||||
$var = XS_unpack_$ntype($arg)
|
|
||||||
T_CALLBACK
|
|
||||||
$var = make_perl_cb_$type($arg)
|
|
||||||
T_ARRAY
|
|
||||||
U32 ix_$var = $argoff;
|
|
||||||
$var = $ntype(items -= $argoff);
|
|
||||||
while (items--) {
|
|
||||||
DO_ARRAY_ELEM;
|
|
||||||
ix_$var++;
|
|
||||||
}
|
|
||||||
/* this is the number of elements in the array */
|
|
||||||
ix_$var -= $argoff
|
|
||||||
T_INTARRAY
|
|
||||||
AV *av_$var;
|
|
||||||
if (SvROK($arg) && SvTYPE(SvRV($arg))==SVt_PVAV)
|
|
||||||
av_$var = (AV*)SvRV($arg);
|
|
||||||
else
|
|
||||||
Perl_croak(aTHX_ \"$var is not an array reference\");
|
|
||||||
I32 len_$var = av_len(av_$var) + 1;
|
|
||||||
I32 ix_$var;
|
|
||||||
$var = new $ntype\[len_$var\];
|
|
||||||
for(ix_$var = 0; ix_$var < len_$var; ix_$var ++) {
|
|
||||||
SV **tmp = av_fetch(av_$var, ix_$var, 0);
|
|
||||||
if(tmp == NULL || *tmp == NULL) {
|
|
||||||
$var\[ix_$var\] = 0;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$var\[ix_$var\] = ($ntype)SvIV(*tmp);
|
|
||||||
}
|
|
||||||
T_STDIO
|
|
||||||
$var = PerlIO_findFILE(IoIFP(sv_2io($arg)))
|
|
||||||
T_IN
|
|
||||||
$var = IoIFP(sv_2io($arg))
|
|
||||||
T_INOUT
|
|
||||||
$var = IoIFP(sv_2io($arg))
|
|
||||||
T_OUT
|
|
||||||
$var = IoOFP(sv_2io($arg))
|
|
||||||
T_STRINGARRAY
|
|
||||||
$var NOT IMPLEMENTED
|
|
||||||
T_STRINGMAP
|
|
||||||
$var NOT IMPLEMENTED
|
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
|
||||||
OUTPUT
|
|
||||||
T_SV
|
|
||||||
$arg = $var;
|
|
||||||
T_SVREF
|
|
||||||
$arg = newRV((SV*)$var);
|
|
||||||
T_AVREF
|
|
||||||
$arg = newRV((SV*)$var);
|
|
||||||
T_HVREF
|
|
||||||
$arg = newRV((SV*)$var);
|
|
||||||
T_CVREF
|
|
||||||
$arg = newRV((SV*)$var);
|
|
||||||
T_IV
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
T_UV
|
|
||||||
sv_setuv($arg, (UV)$var);
|
|
||||||
T_INT
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
T_SYSRET
|
|
||||||
if ($var != -1) {
|
|
||||||
if ($var == 0)
|
|
||||||
sv_setpvn($arg, "0 but true", 10);
|
|
||||||
else
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
}
|
|
||||||
T_ENUM
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
T_BOOL
|
|
||||||
$arg = boolSV($var);
|
|
||||||
T_U_INT
|
|
||||||
sv_setuv($arg, (UV)$var);
|
|
||||||
T_SHORT
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
T_U_SHORT
|
|
||||||
sv_setuv($arg, (UV)$var);
|
|
||||||
T_LONG
|
|
||||||
sv_setiv($arg, (IV)$var);
|
|
||||||
T_U_LONG
|
|
||||||
sv_setuv($arg, (UV)$var);
|
|
||||||
T_CHAR
|
|
||||||
sv_setpvn($arg, (char *)&$var, 1);
|
|
||||||
T_U_CHAR
|
|
||||||
sv_setuv($arg, (UV)$var);
|
|
||||||
T_FLOAT
|
|
||||||
sv_setnv($arg, (double)$var);
|
|
||||||
T_NV
|
|
||||||
sv_setnv($arg, (NV)$var);
|
|
||||||
T_DOUBLE
|
|
||||||
sv_setnv($arg, (double)$var);
|
|
||||||
T_PV
|
|
||||||
sv_setpv((SV*)$arg, $var);
|
|
||||||
T_PTR
|
|
||||||
sv_setiv($arg, PTR2IV($var));
|
|
||||||
T_PTRREF
|
|
||||||
sv_setref_pv($arg, Nullch, (void*)$var);
|
|
||||||
T_REF_IV_REF
|
|
||||||
sv_setref_pv($arg, \"${ntype}\", (void*)new $ntype($var));
|
|
||||||
T_REF_IV_PTR
|
|
||||||
sv_setref_pv($arg, \"${ntype}\", (void*)$var);
|
|
||||||
T_PTROBJ
|
|
||||||
sv_setref_pv($arg, \"${ntype}\", (void*)$var);
|
|
||||||
T_PTRDESC
|
|
||||||
sv_setref_pv($arg, \"${ntype}\", (void*)new\U${type}_DESC\E($var));
|
|
||||||
T_REFREF
|
|
||||||
NOT_IMPLEMENTED
|
|
||||||
T_REFOBJ
|
|
||||||
NOT IMPLEMENTED
|
|
||||||
T_OPAQUE
|
|
||||||
sv_setpvn($arg, (char *)&$var, sizeof($var));
|
|
||||||
T_OPAQUEPTR
|
|
||||||
sv_setpvn($arg, (char *)$var, sizeof(*$var));
|
|
||||||
T_PACKED
|
|
||||||
XS_pack_$ntype($arg, $var);
|
|
||||||
T_PACKEDARRAY
|
|
||||||
XS_pack_$ntype($arg, $var, count_$ntype);
|
|
||||||
T_DATAUNIT
|
|
||||||
sv_setpvn($arg, $var.chp(), $var.size());
|
|
||||||
T_CALLBACK
|
|
||||||
sv_setpvn($arg, $var.context.value().chp(),
|
|
||||||
$var.context.value().size());
|
|
||||||
T_ARRAY
|
|
||||||
{
|
|
||||||
U32 ix_$var;
|
|
||||||
EXTEND(SP,size_$var);
|
|
||||||
for (ix_$var = 0; ix_$var < size_$var; ix_$var++) {
|
|
||||||
ST(ix_$var) = sv_newmortal();
|
|
||||||
DO_ARRAY_ELEM
|
|
||||||
}
|
|
||||||
}
|
|
||||||
T_STDIO
|
|
||||||
{
|
|
||||||
GV *gv = newGVgen("$Package");
|
|
||||||
PerlIO *fp = PerlIO_importFILE($var,0);
|
|
||||||
if ( fp && do_open(gv, "+<&", 3, FALSE, 0, 0, fp) )
|
|
||||||
sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1)));
|
|
||||||
else
|
|
||||||
$arg = &PL_sv_undef;
|
|
||||||
}
|
|
||||||
T_IN
|
|
||||||
{
|
|
||||||
GV *gv = newGVgen("$Package");
|
|
||||||
if ( do_open(gv, "<&", 2, FALSE, 0, 0, $var) )
|
|
||||||
sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1)));
|
|
||||||
else
|
|
||||||
$arg = &PL_sv_undef;
|
|
||||||
}
|
|
||||||
T_INOUT
|
|
||||||
{
|
|
||||||
GV *gv = newGVgen("$Package");
|
|
||||||
if ( do_open(gv, "+<&", 3, FALSE, 0, 0, $var) )
|
|
||||||
sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1)));
|
|
||||||
else
|
|
||||||
$arg = &PL_sv_undef;
|
|
||||||
}
|
|
||||||
T_OUT
|
|
||||||
{
|
|
||||||
GV *gv = newGVgen("$Package");
|
|
||||||
if ( do_open(gv, "+>&", 3, FALSE, 0, 0, $var) )
|
|
||||||
sv_setsv($arg, sv_bless(newRV((SV*)gv), gv_stashpv("$Package",1)));
|
|
||||||
else
|
|
||||||
$arg = &PL_sv_undef;
|
|
||||||
}
|
|
||||||
T_STRINGARRAY
|
|
||||||
{
|
|
||||||
U32 ix_$var;
|
|
||||||
/* pop crap off the stack we dont really want */
|
|
||||||
POPs;
|
|
||||||
POPs;
|
|
||||||
/* grow the stack to the number of elements being returned */
|
|
||||||
EXTEND(SP, $var.size());
|
|
||||||
for (ix_$var = 0; ix_$var < $var.size(); ix_$var++) {
|
|
||||||
const string &it = $var\[ix_$var\];
|
|
||||||
ST(ix_$var) = sv_newmortal();
|
|
||||||
sv_setpvn(ST(ix_$var), it.c_str(), it.length());
|
|
||||||
}
|
|
||||||
/* hackish, but im over it. The normal xsubpp return will be right below this */
|
|
||||||
XSRETURN($var.size());
|
|
||||||
}
|
|
||||||
T_STRINGMAP
|
|
||||||
if (RETVAL.begin()!=RETVAL.end())
|
|
||||||
{
|
|
||||||
//NOTE: we are leaking the original $arg right now
|
|
||||||
HV *hv = newHV();
|
|
||||||
sv_2mortal((SV*)hv);
|
|
||||||
$arg = newRV((SV*)hv);
|
|
||||||
|
|
||||||
map<string,string>::const_iterator cur, end;
|
|
||||||
cur = $var.begin();
|
|
||||||
end = $var.end();
|
|
||||||
for(; cur != end; cur++) {
|
|
||||||
/* get the element from the hash, creating if needed (will be needed) */
|
|
||||||
SV**ele = hv_fetch(hv, cur->first.c_str(), cur->first.length(), TRUE);
|
|
||||||
if(ele == NULL) {
|
|
||||||
Perl_croak(aTHX_ \"Unable to create a hash element for $var\");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
/* put our string in the SV associated with this element in the hash */
|
|
||||||
sv_setpvn(*ele, cur->second.c_str(), cur->second.length());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,177 +0,0 @@
|
|||||||
|
|
||||||
//BEGIN CLIENT METHODS
|
|
||||||
|
|
||||||
void SendSound();
|
|
||||||
bool Save(int8 iCommitNow);
|
|
||||||
void SaveBackup();
|
|
||||||
|
|
||||||
inline bool Connected();
|
|
||||||
inline bool InZone();
|
|
||||||
inline void Kick();
|
|
||||||
inline void Disconnect();
|
|
||||||
inline bool IsLD();
|
|
||||||
void WorldKick();
|
|
||||||
inline int8 GetAnon();
|
|
||||||
void Duck();
|
|
||||||
void Stand();
|
|
||||||
|
|
||||||
void SetGM(bool toggle);
|
|
||||||
void SetPVP(bool toggle);
|
|
||||||
inline bool GetPVP();
|
|
||||||
inline bool GetGM();
|
|
||||||
|
|
||||||
inline void SetBaseClass(uint32 i);
|
|
||||||
inline void SetBaseRace(uint32 i);
|
|
||||||
inline void SetBaseGender(uint32 i);
|
|
||||||
|
|
||||||
inline int8 GetBaseFace();
|
|
||||||
|
|
||||||
inline int8 GetLanguageSkill(int16 n);
|
|
||||||
inline Const_char * GetLastName();
|
|
||||||
inline int32 GetLDoNPoints();
|
|
||||||
|
|
||||||
|
|
||||||
inline int8 GetBaseSTR();
|
|
||||||
inline int8 GetBaseSTA();
|
|
||||||
inline int8 GetBaseCHA();
|
|
||||||
inline int8 GetBaseDEX();
|
|
||||||
inline int8 GetBaseINT();
|
|
||||||
inline int8 GetBaseAGI();
|
|
||||||
inline int8 GetBaseWIS();
|
|
||||||
|
|
||||||
int16 GetWeight();
|
|
||||||
inline uint32 GetEXP();
|
|
||||||
bool UpdateLDoNPoints(sint32 points, int32 theme);
|
|
||||||
inline void SetDeity(uint32 i);
|
|
||||||
|
|
||||||
void AddEXP(uint32 add_exp, int8 conlevel = 0xFF, bool resexp = false);
|
|
||||||
void SetEXP(uint32 set_exp, uint32 set_aaxp, bool resexp=false);
|
|
||||||
|
|
||||||
void SetBindPoint(int to_zone = -1, float new_x = 0.0f, float new_y = 0.0f, float new_z = 0.0f);
|
|
||||||
void MovePC(int32 zoneID, float x, float y, float z, float heading);
|
|
||||||
void ChangeLastName(const char* in_lastname);
|
|
||||||
|
|
||||||
FACTION_VALUE GetFactionLevel(int32 char_id, int32 npc_id, int32 p_race, int32 p_class, int32 p_deity, sint32 pFaction, Mob* tnpc);
|
|
||||||
|
|
||||||
void SetFactionLevel(int32 char_id, int32 npc_id, int8 char_class, int8 char_race, int8 char_deity);
|
|
||||||
void SetFactionLevel2(int32 char_id, sint32 faction_id, int8 char_class, int8 char_race, int8 char_deity, sint32 value);
|
|
||||||
sint16 GetRawItemAC();
|
|
||||||
|
|
||||||
inline int32 AccountID();
|
|
||||||
inline Const_char * AccountName();
|
|
||||||
inline sint16 Admin();
|
|
||||||
inline int32 CharacterID();
|
|
||||||
void UpdateAdmin(bool iFromDB = true);
|
|
||||||
void UpdateWho(int8 remove = 0);
|
|
||||||
|
|
||||||
inline int8 GuildRank();
|
|
||||||
inline int32 GuildID();
|
|
||||||
|
|
||||||
int8 GetFace();
|
|
||||||
|
|
||||||
bool TakeMoneyFromPP(uint32 copper);
|
|
||||||
void AddMoneyToPP(uint32 copper, uint32 silver, uint32 gold,uint32 platinum,bool updateclient);
|
|
||||||
|
|
||||||
bool TGB() {return tgb;}
|
|
||||||
|
|
||||||
int16 GetSkillPoints() {return m_pp.points;}
|
|
||||||
void SetSkillPoints(int inp) {m_pp.points = inp;}
|
|
||||||
|
|
||||||
void IncreaseSkill(int skill_id, int value = 1) { if (skill_id <= HIGHEST_SKILL) { m_pp.skills[skill_id] += value; } }
|
|
||||||
void IncreaseLanguageSkill(int skill_id, int value = 1) { if (skill_id < 26) { m_pp.languages[skill_id] += value; } }
|
|
||||||
virtual uint16 GetSkill(SkillType skill_id) const { if (skill_id <= HIGHEST_SKILL) { return((itembonuses.skillmod[skill_id] > 0)? m_pp.skills[skill_id]*(100 + itembonuses.skillmod[skill_id])/100 : m_pp.skills[skill_id]); } return 0; }
|
|
||||||
uint32 GetRawSkill(SkillType skill_id) const { if (skill_id <= HIGHEST_SKILL) { return(m_pp.skills[skill_id]); } return 0; }
|
|
||||||
bool HasSkill(SkillType skill_id) const;
|
|
||||||
bool CanHaveSkill(SkillType skill_id) const;
|
|
||||||
void SetSkill(SkillType skill_num, int8 value); // socket 12-29-01
|
|
||||||
void AddSkill(SkillType skillid, int8 value);
|
|
||||||
void CheckSpecializeIncrease(int16 spell_id);
|
|
||||||
bool CheckIncreaseSkill(SkillType skillid, int chancemodi = 0);
|
|
||||||
void SetLanguageSkill(int langid, int value);
|
|
||||||
int8 MaxSkill(SkillType skillid);
|
|
||||||
|
|
||||||
void GMKill();
|
|
||||||
inline bool IsMedding();
|
|
||||||
inline int16 GetDuelTarget();
|
|
||||||
inline bool IsDueling();
|
|
||||||
inline void SetDuelTarget(int16 set_id);
|
|
||||||
inline void SetDueling(bool duel);
|
|
||||||
|
|
||||||
void ResetAA();
|
|
||||||
|
|
||||||
void MemSpell(int16 spell_id, int slot, bool update_client = true);
|
|
||||||
void UnmemSpell(int slot, bool update_client = true);
|
|
||||||
void UnmemSpellAll(bool update_client = true);
|
|
||||||
void ScribeSpell(int16 spell_id, int slot, bool update_client = true);
|
|
||||||
void UnscribeSpell(int slot, bool update_client = true);
|
|
||||||
void UnscribeSpellAll(bool update_client = true);
|
|
||||||
|
|
||||||
inline bool IsSitting();
|
|
||||||
inline bool IsBecomeNPC();
|
|
||||||
inline int8 GetBecomeNPCLevel();
|
|
||||||
inline void SetBecomeNPC(bool flag);
|
|
||||||
inline void SetBecomeNPCLevel(int8 level);
|
|
||||||
bool LootToStack(uint32 itemid);
|
|
||||||
void SetFeigned(bool in_feigned);
|
|
||||||
inline bool GetFeigned();
|
|
||||||
|
|
||||||
inline bool AutoSplitEnabled();
|
|
||||||
|
|
||||||
void SetHorseId(int16 horseid_in);
|
|
||||||
int16 GetHorseId();
|
|
||||||
|
|
||||||
uint32 NukeItem(uint32 itemnum);
|
|
||||||
void SetTint(sint16 slot_id, uint32 color);
|
|
||||||
void SetMaterial(sint16 slot_id, uint32 item_id);
|
|
||||||
void Undye();
|
|
||||||
uint32 GetItemIDAt(sint16 slot_id);
|
|
||||||
void DeleteItemInInventory(sint16 slot_id, sint8 quantity = 0, bool client_update = false);
|
|
||||||
void SummonItem(uint32 item_id, sint8 charges = 0);
|
|
||||||
void SetStats(int8 type,sint16 increase_val);
|
|
||||||
void IncStats(int8 type,sint16 increase_val);
|
|
||||||
void DropItem(sint16 slot_id);
|
|
||||||
|
|
||||||
void BreakInvis();
|
|
||||||
Group* GetGroup();
|
|
||||||
void LeaveGroup();
|
|
||||||
|
|
||||||
bool Hungry();
|
|
||||||
bool Thirsty();
|
|
||||||
int16 GetInstrumentMod(int16 spell_id);
|
|
||||||
bool DecreaseByID(int32 type, int8 amt);
|
|
||||||
int8 SlotConvert2(int8 slot);
|
|
||||||
void Escape();
|
|
||||||
void RemoveNoRent();
|
|
||||||
void RangedAttack(Mob* other);
|
|
||||||
void ThrowingAttack(Mob* other);
|
|
||||||
void GoFish();
|
|
||||||
void ForageItem();
|
|
||||||
float CalcPriceMod(Mob* other = 0, bool reverse = false);
|
|
||||||
void ResetTrade();
|
|
||||||
bool UseDiscipline(int32 spell_id, int32 target);
|
|
||||||
sint32 GetCharacterFactionLevel(sint32 faction_id);
|
|
||||||
|
|
||||||
|
|
||||||
void SetZoneFlag(uint32 zone_id);
|
|
||||||
void ClearZoneFlag(uint32 zone_id);
|
|
||||||
bool HasZoneFlag(uint32 zone_id) const;
|
|
||||||
void SendZoneFlagInfo(Client *to) const;
|
|
||||||
void LoadZoneFlags();
|
|
||||||
void SetAATitle(const char *txt);
|
|
||||||
|
|
||||||
//TODO: inventory and ptimers interfaces
|
|
||||||
//I think there are two GetAA methods in client
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
#include "client.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MODULE = Client PACKAGE = Client
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,44 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ ! -r "$1" -o -z "$2" ]; then
|
|
||||||
echo "Usage: $0 headerfile classname"
|
|
||||||
fi
|
|
||||||
|
|
||||||
name=`basename "$1" .h`
|
|
||||||
name="perl_${name}"
|
|
||||||
|
|
||||||
echo "Starting conversion of $2" >&2
|
|
||||||
|
|
||||||
{
|
|
||||||
cat "$1.xs"
|
|
||||||
|
|
||||||
cat "$1" \
|
|
||||||
| sed -e 's/inline//g' -e 's/const//g' -e 's/virtual//g' \
|
|
||||||
-e 's/{.*}/;/g' -e 's#//.*$##g' \
|
|
||||||
-e 's/(void)/()/g' \
|
|
||||||
| tr -d '[&;]' \
|
|
||||||
| perl -p -e "s/^\\s+(.+)[ \\t]([a-zA-Z0-9_]*)\\(/&\$1&$2::\$2(/g" \
|
|
||||||
| tr '&' '\n'
|
|
||||||
|
|
||||||
} > tmp
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
xsubpp -typemap class.typemap tmp \
|
|
||||||
| sed -e "s/\"$2::/\"/g" \
|
|
||||||
-e 's/("\([a-zA-Z0-9_]*\)"/(strcpy(buf, "\1")/g' \
|
|
||||||
-e 's/ / /g' -e 's/ / /g' \
|
|
||||||
-e 's#char\* file = __FILE__;#char file[256];^ strncpy(file, __FILE__, 256);^ file[255] = '\0';^ ^ if(items != 1)^ fprintf(stderr, "boot_quest does not take any arguments.");^ char buf[128];^^ //add the strcpy stuff to get rid of const warnings....^^#g' \
|
|
||||||
-e 's/Ptr//g' \
|
|
||||||
-e 's/Mob__e/Mob::e/g' \
|
|
||||||
| tr '^' '\n' \
|
|
||||||
| grep -v "^#line"
|
|
||||||
|
|
||||||
echo "#endif //EMBPERL_XS_CLASSES"
|
|
||||||
echo
|
|
||||||
} > "$name.cpp"
|
|
||||||
|
|
||||||
|
|
||||||
#rm -f tmp
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
|
|
||||||
Mob* GetMobID(int16 id);
|
|
||||||
Mob* GetMob(const char* name);
|
|
||||||
Mob* GetMobByNpcTypeID(int32 get_id);
|
|
||||||
Client* GetClientByName(const char *name);
|
|
||||||
Client* GetClientByAccID(int32 accid);
|
|
||||||
Client* GetClientByID(int16 id);
|
|
||||||
Client* GetClientByCharID(int32 iCharID);
|
|
||||||
Client* GetClientByWID(int32 iWID);
|
|
||||||
Group* GetGroupByMob(Mob* mob);
|
|
||||||
Group* GetGroupByClient(Client* client);
|
|
||||||
Group* GetGroupByID(int32 id);
|
|
||||||
Group* GetGroupByLeaderName(char* leader);
|
|
||||||
Corpse* GetCorpseByOwner(Client* client);
|
|
||||||
Corpse* GetCorpseByID(int16 id);
|
|
||||||
Corpse* GetCorpseByName(char* name);
|
|
||||||
void ClearClientPetitionQueue();
|
|
||||||
bool CanAddHateForMob(Mob *p);
|
|
||||||
|
|
||||||
void Clear();
|
|
||||||
bool RemoveMob(int16 delete_id);
|
|
||||||
bool RemoveClient(int16 delete_id);
|
|
||||||
bool RemoveNPC(int16 delete_id);
|
|
||||||
bool RemoveGroup(int32 delete_id);
|
|
||||||
bool RemoveCorpse(int16 delete_id);
|
|
||||||
bool RemoveDoor(int16 delete_id);
|
|
||||||
bool RemoveTrap(int16 delete_id);
|
|
||||||
bool RemoveObject(int16 delete_id);
|
|
||||||
void RemoveAllMobs();
|
|
||||||
void RemoveAllClients();
|
|
||||||
void RemoveAllNPCs();
|
|
||||||
void RemoveAllGroups();
|
|
||||||
void RemoveAllCorpses();
|
|
||||||
void RemoveAllDoors();
|
|
||||||
void RemoveAllTraps();
|
|
||||||
void RemoveAllObjects();
|
|
||||||
|
|
||||||
void Message(int32 to_guilddbid, int32 type, const char* message, ...);
|
|
||||||
void MessageStatus(int32 to_guilddbid, int to_minstatus, int32 type, const char* message, ...);
|
|
||||||
void MessageClose(Mob* sender, bool skipsender, float dist, int32 type, const char* message, ...);
|
|
||||||
|
|
||||||
void RemoveFromTargets(Mob* mob);
|
|
||||||
void ReplaceWithTarget(Mob* pOldMob, Mob*pNewTarget);
|
|
||||||
|
|
||||||
void OpenDoorsNear(NPC* opener);
|
|
||||||
|
|
||||||
char* MakeNameUnique(char* name);
|
|
||||||
static char* RemoveNumbers(char* name);
|
|
||||||
// signal quest command support
|
|
||||||
void SignalMobsByNPCID(int32 npc_type, int signal_id);
|
|
||||||
void RemoveEntity(int16 id);
|
|
||||||
|
|
||||||
sint32 DeleteNPCCorpses();
|
|
||||||
sint32 DeletePlayerCorpses();
|
|
||||||
void HalveAggro(Mob* who);
|
|
||||||
void DoubleAggro(Mob* who);
|
|
||||||
void ClearFeignAggro(Mob* targ);
|
|
||||||
|
|
||||||
bool Fighting(Mob* targ);
|
|
||||||
void RemoveFromHateLists(Mob* mob, bool settoone = false);
|
|
||||||
void MessageGroup(Mob* sender, bool skipclose, int32 type, const char* message, ...);
|
|
||||||
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
#include "entity.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = EntityList PACKAGE = EntityList
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
FROM="$1"
|
|
||||||
TO="$2"
|
|
||||||
|
|
||||||
if [ ! -r "$1" -o -z "$2" ]; then
|
|
||||||
echo "Usage: $0 [src] [dest]"
|
|
||||||
fi
|
|
||||||
|
|
||||||
grep -A100000 "BEGIN PERL EXPORT" "$FROM" \
|
|
||||||
| grep -B 100000 "END PERL EXPORT" \
|
|
||||||
| grep -v "PERL EXPORT" >"$TO"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
void DisbandGroup();
|
|
||||||
bool IsGroupMember(Mob* client);
|
|
||||||
void CastGroupSpell(Mob* caster,uint16 spellid);
|
|
||||||
void SplitExp(uint32 exp, Mob* other);
|
|
||||||
void GroupMessage(Mob* sender,const char* message);
|
|
||||||
int32 GetTotalGroupDamage(Mob* other);
|
|
||||||
void SplitMoney(uint32 copper, uint32 silver, uint32 gold, uint32 platinum);
|
|
||||||
void SetLeader(Mob* newleader){ leader=newleader; };
|
|
||||||
Mob* GetLeader(){ return leader; };
|
|
||||||
char* GetLeaderName(){ return membername[0]; };
|
|
||||||
void SendHPPacketsTo(Mob* newmember);
|
|
||||||
void SendHPPacketsFrom(Mob* newmember);
|
|
||||||
bool IsLeader(Mob* leadertest) { return leadertest==leader; };
|
|
||||||
int8 GroupCount();
|
|
||||||
int32 GetHighestLevel();
|
|
||||||
void TeleportGroup(Mob* sender, int32 zoneID, float x, float y, float z, float heading);
|
|
||||||
inline const int32 GetID() const { return id; }
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
#include "groups.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = Group PACKAGE = Group
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,249 +0,0 @@
|
|||||||
|
|
||||||
//BEGIN ENTITY METHODS
|
|
||||||
|
|
||||||
virtual bool IsClient() { return false; }
|
|
||||||
virtual bool IsNPC() { return false; }
|
|
||||||
virtual bool IsMob() { return false; }
|
|
||||||
virtual bool IsCorpse() { return false; }
|
|
||||||
virtual bool IsPlayerCorpse() { return false; }
|
|
||||||
virtual bool IsNPCCorpse() { return false; }
|
|
||||||
virtual bool IsObject() { return false; }
|
|
||||||
// virtual bool IsGroup() { return false; }
|
|
||||||
virtual bool IsDoor() { return false; }
|
|
||||||
virtual bool IsTrap() { return false; }
|
|
||||||
virtual bool IsBeacon() { return false; }
|
|
||||||
|
|
||||||
Client* CastToClient();
|
|
||||||
NPC* CastToNPC();
|
|
||||||
Mob* CastToMob();
|
|
||||||
Corpse* CastToCorpse();
|
|
||||||
// Object* CastToObject();
|
|
||||||
// Group* CastToGroup();
|
|
||||||
// Doors* CastToDoors();
|
|
||||||
// Trap* CastToTrap();
|
|
||||||
// Beacon* CastToBeacon();
|
|
||||||
|
|
||||||
//BEGIN MOB METHODS
|
|
||||||
int16& GetID();
|
|
||||||
virtual Const_char * GetName();
|
|
||||||
void Depop(bool StartSpawnTimer = true);
|
|
||||||
|
|
||||||
void RogueAssassinate(Mob* other);
|
|
||||||
bool BehindMob(Mob* other = 0, float playerx = 0.0f, float playery = 0.0f);
|
|
||||||
void SetLevel(uint8 in_level, bool command = false);
|
|
||||||
|
|
||||||
uint32 GetSkill(SkillType skill_num);
|
|
||||||
void SendWearChange(int8 material_slot);
|
|
||||||
sint32 GetEquipment(int8 material_slot); // returns item id
|
|
||||||
sint32 GetEquipmentMaterial(int8 material_slot);
|
|
||||||
sint32 GetEquipmentColor(int8 material_slot);
|
|
||||||
bool IsMoving();
|
|
||||||
void GoToBind();
|
|
||||||
void Gate();
|
|
||||||
bool Attack(Mob* other, int Hand = 13, bool FromRiposte = false)
|
|
||||||
virtual void Damage(Mob* from, sint32 damage, int16 spell_id, SkillType attack_skill, bool avoidable = true, sint8 buffslot = -1, bool iBuffTic = false) {};
|
|
||||||
|
|
||||||
void Heal();
|
|
||||||
void SetMaxHP();
|
|
||||||
int32 GetLevelCon(int8 iOtherLevel);
|
|
||||||
void SetHP(sint32 hp);
|
|
||||||
void DoAnim(const int animnum, int type=1);
|
|
||||||
void ChangeSize(float in_size, bool bNoRestriction = false);
|
|
||||||
void GMMove(float x, float y, float z, float heading = 0.01);
|
|
||||||
void SendPosUpdate(int8 iSendToSelf = 0);
|
|
||||||
void SendPosition();
|
|
||||||
bool HasProcs();
|
|
||||||
//bool CheckLos(Mob* other);
|
|
||||||
bool IsInvisible(Mob *other = 0);
|
|
||||||
void SetInvisible(bool state);
|
|
||||||
bool FindBuff(int16 spellid);
|
|
||||||
bool FindType(int8 type, bool bOffensive = false, int16 threshold = 100);
|
|
||||||
sint8 GetBuffSlotFromType(int8 type);
|
|
||||||
void MakePet(int16 spell_id, const char* pettype, const char *name=NULL);
|
|
||||||
virtual inline int16 GetBaseRace();
|
|
||||||
virtual inline int8 GetBaseGender();
|
|
||||||
virtual inline int8 GetDeity();
|
|
||||||
inline const int16& GetRace();
|
|
||||||
inline const int8& GetGender();
|
|
||||||
inline const int8& GetTexture();
|
|
||||||
inline const int8& GetHelmTexture();
|
|
||||||
inline const int8& GetClass();
|
|
||||||
inline const uint8& GetLevel();
|
|
||||||
Const_char * GetCleanName();
|
|
||||||
inline Mob* GetTarget();
|
|
||||||
virtual inline void SetTarget(Mob* mob);
|
|
||||||
virtual inline float GetHPRatio();
|
|
||||||
|
|
||||||
bool IsWarriorClass();
|
|
||||||
virtual inline const sint32& GetHP();
|
|
||||||
virtual inline const sint32& GetMaxHP();
|
|
||||||
virtual float GetWalkspeed();
|
|
||||||
virtual float GetRunspeed();
|
|
||||||
virtual int GetCasterLevel(int16 spell_id);
|
|
||||||
virtual inline const sint32& GetMaxMana();
|
|
||||||
virtual inline const sint32& GetMana();
|
|
||||||
virtual void SetMana(sint32 amount);
|
|
||||||
virtual inline float GetManaRatio();
|
|
||||||
|
|
||||||
inline virtual int16 GetAC();
|
|
||||||
inline virtual int16 GetATK();
|
|
||||||
inline virtual sint16 GetSTR();
|
|
||||||
inline virtual sint16 GetSTA();
|
|
||||||
inline virtual sint16 GetDEX();
|
|
||||||
inline virtual sint16 GetAGI();
|
|
||||||
inline virtual sint16 GetINT();
|
|
||||||
inline virtual sint16 GetWIS();
|
|
||||||
inline virtual sint16 GetCHA();
|
|
||||||
inline virtual sint16 GetMR();
|
|
||||||
inline virtual sint16 GetFR();
|
|
||||||
inline virtual sint16 GetDR();
|
|
||||||
inline virtual sint16 GetPR();
|
|
||||||
inline virtual sint16 GetCR();
|
|
||||||
|
|
||||||
inline virtual sint16 GetMaxSTR();
|
|
||||||
inline virtual sint16 GetMaxSTA();
|
|
||||||
inline virtual sint16 GetMaxDEX();
|
|
||||||
inline virtual sint16 GetMaxAGI();
|
|
||||||
inline virtual sint16 GetMaxINT();
|
|
||||||
inline virtual sint16 GetMaxWIS();
|
|
||||||
inline virtual sint16 GetMaxCHA();
|
|
||||||
|
|
||||||
virtual float GetActSpellRange(int16 spell_id, float range);
|
|
||||||
virtual sint32 GetActSpellDamage(int16 spell_id, sint32 value);
|
|
||||||
virtual sint32 GetActSpellHealing(int16 spell_id, sint32 value);
|
|
||||||
virtual sint32 GetActSpellCost(int16 spell_id, sint32 cost);
|
|
||||||
virtual sint32 GetActSpellDuration(int16 spell_id, sint32 duration);
|
|
||||||
virtual sint32 GetActSpellCasttime(int16 spell_id, sint32 casttime);
|
|
||||||
double ResistSpell(uint8 ressit_type, int16 spell_id, Mob *caster);
|
|
||||||
uint16 GetSpecializeSkillValue(int16 spell_id) const;
|
|
||||||
|
|
||||||
int32 GetNPCTypeID();
|
|
||||||
bool IsTargeted();
|
|
||||||
|
|
||||||
inline const float& GetX();
|
|
||||||
inline const float& GetY();
|
|
||||||
inline const float& GetZ();
|
|
||||||
inline const float& GetHeading();
|
|
||||||
inline const float& GetSize();
|
|
||||||
|
|
||||||
void SetFollowID(int32 id);
|
|
||||||
int32 GetFollowID();
|
|
||||||
|
|
||||||
virtual void Message(int32 type, const char* message, ...);
|
|
||||||
virtual void MessageString(int32 type, int32 string_id, int32 distance = 0);
|
|
||||||
void Say(const char *format, ...);
|
|
||||||
void Shout(const char *format, ...);
|
|
||||||
void Emote(const char *format, ...);
|
|
||||||
void InterruptSpell(int16 spellid = 0xFFFF);
|
|
||||||
|
|
||||||
virtual void CastSpell(int16 spell_id, int16 target_id, int16 slot = 10, sint32 casttime = -1, sint32 mana_cost = -1);
|
|
||||||
bool IsImmuneToSpell(int16 spell_id, Mob *caster);
|
|
||||||
void BuffFadeBySpellID(int16 spell_id);
|
|
||||||
void BuffFadeByEffect(int effectid, int skipslot = -1);
|
|
||||||
void BuffFadeAll();
|
|
||||||
void BuffFadeBySlot(int slot, bool iRecalcBonuses = true);
|
|
||||||
|
|
||||||
int CanBuffStack(int16 spellid, int8 caster_level, bool iFailIfOverwrite = false);
|
|
||||||
inline bool IsCasting();
|
|
||||||
int16 CastingSpellID();
|
|
||||||
|
|
||||||
void SetAppearance(EmuAppearance app, bool iIgnoreSelf = true);
|
|
||||||
|
|
||||||
inline EmuAppearance GetAppearance();
|
|
||||||
inline const int8& GetRunAnimSpeed();
|
|
||||||
inline void SetRunAnimSpeed(sint8 in);
|
|
||||||
|
|
||||||
void SetPetID(int16 NewPetID);
|
|
||||||
inline const int16& GetPetID();
|
|
||||||
void SetOwnerID(int16 NewOwnerID);
|
|
||||||
inline const int16& GetOwnerID();
|
|
||||||
inline const int16& GetPetType();
|
|
||||||
|
|
||||||
inline const int8& GetBodyType();
|
|
||||||
virtual void Stun(int duration);
|
|
||||||
|
|
||||||
void Spin();
|
|
||||||
void Kill();
|
|
||||||
|
|
||||||
inline void SetInvul(bool invul);
|
|
||||||
inline bool GetInvul();
|
|
||||||
inline void SetExtraHaste(int Haste);
|
|
||||||
virtual int GetHaste();
|
|
||||||
int GetMonkHandToHandDamage(void);
|
|
||||||
|
|
||||||
bool CanThisClassDoubleAttack(void);
|
|
||||||
bool CanThisClassDualWield(void);
|
|
||||||
bool CanThisClassRiposte(void);
|
|
||||||
bool CanThisClassDodge(void);
|
|
||||||
bool CanThisClassParry(void);
|
|
||||||
|
|
||||||
int GetMonkHandToHandDelay(void);
|
|
||||||
int8 GetClassLevelFactor();
|
|
||||||
void Mesmerize();
|
|
||||||
inline bool IsMezzed();
|
|
||||||
inline bool IsStunned();
|
|
||||||
|
|
||||||
void StartEnrage();
|
|
||||||
bool IsEnraged();
|
|
||||||
|
|
||||||
FACTION_VALUE GetReverseFactionCon(Mob* iOther);
|
|
||||||
inline const bool& IsAIControlled();
|
|
||||||
inline const float& GetAggroRange();
|
|
||||||
inline const float& GetAssistRange();
|
|
||||||
|
|
||||||
inline void SetPetOrder(Mob::eStandingPetOrder i);
|
|
||||||
inline const Mob::eStandingPetOrder& GetPetOrder();
|
|
||||||
inline const bool& IsRoamer();
|
|
||||||
inline const bool IsRooted();
|
|
||||||
|
|
||||||
void AddToHateList(Mob* other, sint32 hate = 0, sint32 damage = 0, bool iYellForHelp = true, bool bFrenzy = false, bool iBuffTic = false);
|
|
||||||
void SetHate(Mob* other, sint32 hate = 0, sint32 damage = 0);
|
|
||||||
int32 GetHateAmount(Mob* tmob, bool is_dam = false);
|
|
||||||
int32 GetDamageAmount(Mob* tmob);
|
|
||||||
Mob* GetHateTop();
|
|
||||||
Mob* GetHateDamageTop(Mob* other);
|
|
||||||
Mob* GetHateRandom();
|
|
||||||
bool IsEngaged();
|
|
||||||
bool HateSummon();
|
|
||||||
void FaceTarget(Mob* MobToFace = 0, bool update = false);
|
|
||||||
void SetHeading(float iHeading);
|
|
||||||
void WipeHateList();
|
|
||||||
|
|
||||||
inline bool CheckAggro(Mob* other);
|
|
||||||
|
|
||||||
sint8 CalculateHeadingToTarget(float in_x, float in_y);
|
|
||||||
bool CalculateNewPosition(float x, float y, float z, float speed, bool checkZ = false);
|
|
||||||
bool CalculateNewPosition2(float x, float y, float z, float speed, bool checkZ = false);
|
|
||||||
float CalculateDistance(float x, float y, float z);
|
|
||||||
void SendTo(float new_x, float new_y, float new_z);
|
|
||||||
void SendToFixZ(float new_x, float new_y, float new_z);
|
|
||||||
void NPCSpecialAttacks(const char* parse, int permtag);
|
|
||||||
inline int32& DontHealMeBefore();
|
|
||||||
inline int32& DontBuffMeBefore();
|
|
||||||
inline int32& DontDotMeBefore();
|
|
||||||
inline int32& DontRootMeBefore();
|
|
||||||
inline int32& DontSnareMeBefore();
|
|
||||||
|
|
||||||
sint16 GetResist(int8 type);
|
|
||||||
Mob* GetShieldTarget();
|
|
||||||
void SetShieldTarget(Mob* mob);
|
|
||||||
bool Charmed();
|
|
||||||
int32 GetLevelHP(int8 tlevel);
|
|
||||||
int32 GetZoneID() const;
|
|
||||||
int16 CheckAggroAmount(int16 spellid);
|
|
||||||
int16 CheckHealAggroAmount(int16 spellid);
|
|
||||||
virtual int32 GetAA(int32 aa_id);
|
|
||||||
bool DivineAura();
|
|
||||||
|
|
||||||
void AddFeignMemory(Client* attacker);
|
|
||||||
void RemoveFromFeignMemory(Client* attacker);
|
|
||||||
void ClearFeignMemory();
|
|
||||||
|
|
||||||
//END MOB METHODS
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#include "mob.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = Mob PACKAGE = Mob
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
void SignalNPC(int _signal_id);
|
|
||||||
FACTION_VALUE CheckNPCFactionAlly(sint32 other_faction);
|
|
||||||
void AddItem(int32 itemid, int8 charges, int8 slot = 0);
|
|
||||||
void AddLootTable();
|
|
||||||
void RemoveItem(uint16 item_id, int16 quantity = 0, int16 slot = 0);
|
|
||||||
void ClearItemList();
|
|
||||||
void AddCash(int16 in_copper, int16 in_silver, int16 in_gold, int16 in_platinum);
|
|
||||||
void RemoveCash();
|
|
||||||
int32 CountLoot();
|
|
||||||
inline int32 GetLoottableID() { return loottable_id; }
|
|
||||||
inline uint32 GetCopper() { return copper; }
|
|
||||||
inline uint32 GetSilver() { return silver; }
|
|
||||||
inline uint32 GetGold() { return gold; }
|
|
||||||
inline uint32 GetPlatinum() { return platinum; }
|
|
||||||
|
|
||||||
inline void SetCopper(uint32 amt) { copper = amt; }
|
|
||||||
inline void SetSilver(uint32 amt) { silver = amt; }
|
|
||||||
inline void SetGold(uint32 amt) { gold = amt; }
|
|
||||||
inline void SetPlatinum(uint32 amt) { platinum = amt; }
|
|
||||||
void SetGrid(int16 grid_){ grid=grid_; }
|
|
||||||
void SetSp2(int32 sg2){ spawn_group=sg2; }
|
|
||||||
int16 GetWaypointMax(){ return wp_m; }
|
|
||||||
sint16 GetGrid(){ return grid; }
|
|
||||||
int32 GetSp2(){ return spawn_group; }
|
|
||||||
|
|
||||||
inline const sint32& GetNPCFactionID() { return npc_faction_id; }
|
|
||||||
inline sint32 GetPrimaryFaction() { return primary_faction; }
|
|
||||||
sint32 GetNPCHate(Mob* in_ent) {return hate_list.GetEntHate(in_ent);}
|
|
||||||
bool IsOnHatelist(Mob*p) { return hate_list.IsOnHateList(p);}
|
|
||||||
|
|
||||||
void SetNPCFactionID(sint32 in) { npc_faction_id = in; database.GetFactionIdsForNPC(npc_faction_id, &faction_list, &primary_faction); }
|
|
||||||
int16 GetMaxDMG() {return max_dmg;}
|
|
||||||
bool IsAnimal() { return(bodytype == 21); }
|
|
||||||
int16 GetPetSpellID() {return pet_spell_id;}
|
|
||||||
void SetPetSpellID(int16 amt) {pet_spell_id = amt;}
|
|
||||||
int32 GetMaxDamage(int8 tlevel);
|
|
||||||
void SetTaunting(bool tog) {taunting = tog;}
|
|
||||||
void PickPocket(Client* thief);
|
|
||||||
void StartSwarmTimer(int32 duration) { swarm_timer.Start(duration); }
|
|
||||||
void DoClassAttacks(Mob *target);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int GetMaxWp() const { return max_wp; }
|
|
||||||
void DisplayWaypointInfo(Client *to);
|
|
||||||
void CalculateNewWaypoint();
|
|
||||||
// int8 CalculateHeadingToNextWaypoint();
|
|
||||||
// float CalculateDistanceToNextWaypoint();
|
|
||||||
void AssignWaypoints(int32 grid);
|
|
||||||
void SetWaypointPause();
|
|
||||||
void UpdateWaypoint(int wp_index);
|
|
||||||
// quest wandering commands
|
|
||||||
void StopWandering();
|
|
||||||
void ResumeWandering();
|
|
||||||
void PauseWandering(int pausetime);
|
|
||||||
void MoveTo(float mtx, float mty, float mtz, float mth, bool saveguardspot);
|
|
||||||
|
|
||||||
void NextGuardPosition();
|
|
||||||
void SaveGuardSpot(bool iClearGuardSpot = false);
|
|
||||||
inline bool IsGuarding() const { return(guard_heading != 0); }
|
|
||||||
void AI_SetRoambox(float iDist, float iMaxX, float iMinX, float iMaxY, float iMinY, int32 iDelay = 2500);
|
|
||||||
const int32& GetNPCSpellsID();
|
|
||||||
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
typedef const char Const_char;
|
|
||||||
|
|
||||||
#include "npc.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
MODULE = NPC PACKAGE = NPC
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
PerlPacket *
|
|
||||||
PerlPacket::new(const char *opcode = "OP_Unknown", uint32 len = 0);
|
|
||||||
void DESTROY();
|
|
||||||
|
|
||||||
bool SetOpcode(const char *opcode);
|
|
||||||
void Resize(uint32 len);
|
|
||||||
|
|
||||||
//sending functions
|
|
||||||
void SendTo(Client *who);
|
|
||||||
void SendToAll();
|
|
||||||
|
|
||||||
//editing
|
|
||||||
void Zero();
|
|
||||||
void FromArray(int *numbers, uint32 length);
|
|
||||||
void SetByte(uint32 pos, uint8 val);
|
|
||||||
void SetShort(uint32 pos, uint16 val);
|
|
||||||
void SetLong(uint32 pos, uint32 val);
|
|
||||||
void SetFloat(uint32 pos, float val);
|
|
||||||
void SetString(uint32 pos, char *str);
|
|
||||||
|
|
||||||
void SetEQ1319(uint32 pos, float part13, float part19);
|
|
||||||
void SetEQ1913(uint32 pos, float part19, float part13);
|
|
||||||
|
|
||||||
//reading
|
|
||||||
uint8 GetByte(uint32 pos);
|
|
||||||
uint16 GetShort(uint32 pos);
|
|
||||||
uint32 GetLong(uint32 pos);
|
|
||||||
float GetFloat(uint32 pos);
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
|
|
||||||
/* EQEMu: Everquest Server Emulator
|
|
||||||
Copyright (C) 2001-2004 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 "features.h"
|
|
||||||
#ifdef EMBPERL_XS_CLASSES
|
|
||||||
#include "../common/debug.h"
|
|
||||||
#include "embperl.h"
|
|
||||||
|
|
||||||
#include "perlpacket.h"
|
|
||||||
|
|
||||||
#ifdef THIS /* this macro seems to leak out on some systems */
|
|
||||||
#undef THIS
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MODULE = PerlPacket PACKAGE = PerlPacket
|
|
||||||
|
|
||||||
PROTOTYPES: ENABLE
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
cp perl_PlayerCorpse.cpp perl_client.cpp perl_entity.cpp perl_groups.cpp \
|
|
||||||
perl_mob.cpp perl_npc.cpp perl_perlpacket.cpp \
|
|
||||||
../../zone/
|
|
||||||
|
|
||||||
cp perl_EQW.cpp perl_HTTPRequest.cpp perl_EQLConfig.cpp ../../world/
|
|
||||||
|
|
||||||
cp perl_EQDB.cpp perl_EQDBRes.cpp ../../common/
|
|
||||||
|
|
||||||
@@ -585,7 +585,8 @@ sub translate_mysql_data_type_to_c {
|
|||||||
sub get_reserved_cpp_variable_names {
|
sub get_reserved_cpp_variable_names {
|
||||||
return (
|
return (
|
||||||
"class",
|
"class",
|
||||||
"int"
|
"int",
|
||||||
|
"key"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -476,6 +476,11 @@
|
|||||||
9220|2022_12_19_player_events_tables.sql|SHOW TABLES LIKE 'player_event_logs'|empty|
|
9220|2022_12_19_player_events_tables.sql|SHOW TABLES LIKE 'player_event_logs'|empty|
|
||||||
9221|2023_02_24_npc_scaling_zone_id_instance_version.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id'|empty|
|
9221|2023_02_24_npc_scaling_zone_id_instance_version.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id'|empty|
|
||||||
9222|2023_02_28_npc_scaling_zone_list_version_list.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id_list'|empty|
|
9222|2023_02_28_npc_scaling_zone_list_version_list.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'zone_id_list'|empty|
|
||||||
|
9223|2023_03_04_npc_scale_global_base_heroic_strikethrough.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'heroic_strikethrough'|empty|
|
||||||
|
9224|2023_03_08_npc_scale_global_base_avoidance.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'hp_regen_per_second'|empty|
|
||||||
|
9225|2023_01_21_bots_raid_members.sql|SHOW COLUMNS FROM `raid_members` LIKE 'bot_id'|empty|
|
||||||
|
9226|2023_03_17_corpse_fields.sql|SHOW COLUMNS FROM `character_corpse_items` LIKE 'custom_data'|empty|
|
||||||
|
9227|2023_03_24_npc_scale_global_base_verify.sql|SHOW COLUMNS FROM `npc_scale_global_base` LIKE 'heroic_strikethrough'|not_empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
9036|2023_01_19_drop_bot_views.sql|SHOW TABLES LIKE 'vw_groups'|not_empty|
|
9036|2023_01_19_drop_bot_views.sql|SHOW TABLES LIKE 'vw_groups'|not_empty|
|
||||||
9037|2023_01_22_add_name_index.sql||show index from bot_data WHERE key_name = 'name`|empty|
|
9037|2023_01_22_add_name_index.sql||show index from bot_data WHERE key_name = 'name`|empty|
|
||||||
9038|2023_02_16_add_caster_range.sql|SHOW COLUMNS FROM `bot_data` LIKE 'caster_range'|empty|
|
9038|2023_02_16_add_caster_range.sql|SHOW COLUMNS FROM `bot_data` LIKE 'caster_range'|empty|
|
||||||
|
9039|2023_03_31_remove_bot_groups.sql|SHOW TABLES LIKE 'bot_groups'|not_empty|
|
||||||
|
|
||||||
# Upgrade conditions:
|
# Upgrade conditions:
|
||||||
# This won't be needed after this system is implemented, but it is used database that are not
|
# This won't be needed after this system is implemented, but it is used database that are not
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
SET FOREIGN_KEY_CHECKS = 0;
|
||||||
|
DROP TABLE IF EXISTS `bot_groups`;
|
||||||
|
DROP TABLE IF EXISTS `bot_group_members`;
|
||||||
|
SET FOREIGN_KEY_CHECKS = 1;
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
DROP INDEX `PRIMARY` ON `raid_members`;
|
||||||
|
CREATE UNIQUE INDEX `UNIQUE` ON `raid_members`(`name`);
|
||||||
|
ALTER TABLE `raid_members` ADD COLUMN `bot_id` int(4) NOT NULL DEFAULT 0 AFTER `charid`;
|
||||||
|
ALTER TABLE `raid_members` ADD COLUMN `id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
ALTER TABLE `npc_scale_global_base`
|
ALTER TABLE `npc_scale_global_base`
|
||||||
CHANGE COLUMN `zone_id` `zone_id_list` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 0 AFTER `level`,
|
CHANGE COLUMN `zone_id` `zone_id_list` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `level`,
|
||||||
CHANGE COLUMN `instance_version` `instance_version_list` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT 0 AFTER `zone_id_list`,
|
CHANGE COLUMN `instance_version` `instance_version_list` text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER `zone_id_list`,
|
||||||
DROP PRIMARY KEY,
|
DROP PRIMARY KEY,
|
||||||
ADD PRIMARY KEY (`type`, `level`, `zone_id_list`(255), `instance_version_list`(255)) USING BTREE;
|
ADD PRIMARY KEY (`type`, `level`, `zone_id_list`(255), `instance_version_list`(255)) USING BTREE;
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
UPDATE `npc_scale_global_base` SET ac = 0 WHERE ac IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET hp = 0 WHERE hp IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET accuracy = 0 WHERE accuracy IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET slow_mitigation = 0 WHERE slow_mitigation IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET attack = 0 WHERE attack IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET strength = 0 WHERE strength IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET stamina = 0 WHERE stamina IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET dexterity = 0 WHERE dexterity IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET agility = 0 WHERE agility IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET intelligence = 0 WHERE intelligence IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET wisdom = 0 WHERE wisdom IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET charisma = 0 WHERE charisma IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET magic_resist = 0 WHERE magic_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET cold_resist = 0 WHERE cold_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET fire_resist = 0 WHERE fire_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET poison_resist = 0 WHERE poison_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET disease_resist = 0 WHERE disease_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET corruption_resist = 0 WHERE corruption_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET physical_resist = 0 WHERE physical_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET min_dmg = 0 WHERE min_dmg IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET max_dmg = 0 WHERE max_dmg IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET hp_regen_rate = 0 WHERE hp_regen_rate IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET attack_delay = 0 WHERE attack_delay IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET physical_resist = 0 WHERE physical_resist IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET spell_scale = 100 WHERE spell_scale IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET heal_scale = 100 WHERE heal_scale IS NULL;
|
||||||
|
UPDATE `npc_scale_global_base` SET special_abilities = '' WHERE special_abilities IS NULL;
|
||||||
|
ALTER TABLE `npc_scale_global_base`
|
||||||
|
MODIFY COLUMN `ac` int(11) NOT NULL DEFAULT 0 AFTER `instance_version_list`,
|
||||||
|
MODIFY COLUMN `hp` int(11) NOT NULL DEFAULT 0 AFTER `ac`,
|
||||||
|
MODIFY COLUMN `accuracy` int(11) NOT NULL DEFAULT 0 AFTER `hp`,
|
||||||
|
MODIFY COLUMN `slow_mitigation` int(11) NOT NULL DEFAULT 0 AFTER `accuracy`,
|
||||||
|
MODIFY COLUMN `attack` int(11) NOT NULL DEFAULT 0 AFTER `slow_mitigation`,
|
||||||
|
MODIFY COLUMN `strength` int(11) NOT NULL DEFAULT 0 AFTER `attack`,
|
||||||
|
MODIFY COLUMN `stamina` int(11) NOT NULL DEFAULT 0 AFTER `strength`,
|
||||||
|
MODIFY COLUMN `dexterity` int(11) NOT NULL DEFAULT 0 AFTER `stamina`,
|
||||||
|
MODIFY COLUMN `agility` int(11) NOT NULL DEFAULT 0 AFTER `dexterity`,
|
||||||
|
MODIFY COLUMN `intelligence` int(11) NOT NULL DEFAULT 0 AFTER `agility`,
|
||||||
|
MODIFY COLUMN `wisdom` int(11) NOT NULL DEFAULT 0 AFTER `intelligence`,
|
||||||
|
MODIFY COLUMN `charisma` int(11) NOT NULL DEFAULT 0 AFTER `wisdom`,
|
||||||
|
MODIFY COLUMN `magic_resist` int(11) NOT NULL DEFAULT 0 AFTER `charisma`,
|
||||||
|
MODIFY COLUMN `cold_resist` int(11) NOT NULL DEFAULT 0 AFTER `magic_resist`,
|
||||||
|
MODIFY COLUMN `fire_resist` int(11) NOT NULL DEFAULT 0 AFTER `cold_resist`,
|
||||||
|
MODIFY COLUMN `poison_resist` int(11) NOT NULL DEFAULT 0 AFTER `fire_resist`,
|
||||||
|
MODIFY COLUMN `disease_resist` int(11) NOT NULL DEFAULT 0 AFTER `poison_resist`,
|
||||||
|
MODIFY COLUMN `corruption_resist` int(11) NOT NULL DEFAULT 0 AFTER `disease_resist`,
|
||||||
|
MODIFY COLUMN `physical_resist` int(11) NOT NULL DEFAULT 0 AFTER `corruption_resist`,
|
||||||
|
MODIFY COLUMN `min_dmg` int(11) NOT NULL DEFAULT 0 AFTER `physical_resist`,
|
||||||
|
MODIFY COLUMN `max_dmg` int(11) NOT NULL DEFAULT 0 AFTER `min_dmg`,
|
||||||
|
MODIFY COLUMN `hp_regen_rate` int(11) NOT NULL DEFAULT 0 AFTER `max_dmg`,
|
||||||
|
MODIFY COLUMN `attack_delay` int(11) NOT NULL DEFAULT 0 AFTER `hp_regen_rate`,
|
||||||
|
MODIFY COLUMN `spell_scale` int(11) NOT NULL DEFAULT 100 AFTER `attack_delay`,
|
||||||
|
MODIFY COLUMN `heal_scale` int(11) NOT NULL DEFAULT 100 AFTER `spell_scale`,
|
||||||
|
MODIFY COLUMN special_abilities text CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL AFTER heal_scale,
|
||||||
|
ADD COLUMN `heroic_strikethrough` int(11) NOT NULL DEFAULT 0 AFTER `heal_scale`;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE `npc_scale_global_base`
|
||||||
|
MODIFY COLUMN `hp` bigint(20) NOT NULL DEFAULT 0 AFTER `ac`,
|
||||||
|
MODIFY COLUMN `hp_regen_rate` bigint(20) NOT NULL DEFAULT 0 AFTER `max_dmg`,
|
||||||
|
ADD COLUMN `hp_regen_per_second` bigint(20) NOT NULL DEFAULT 0 AFTER `hp_regen_rate`,
|
||||||
|
ADD COLUMN `avoidance` int(11) unsigned NOT NULL DEFAULT 0 AFTER `heal_scale`;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
ALTER TABLE `character_corpse_items`
|
||||||
|
ADD COLUMN `custom_data` TEXT NULL AFTER `attuned`,
|
||||||
|
ADD COLUMN `ornamenticon` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `custom_data`,
|
||||||
|
ADD COLUMN `ornamentidfile` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `ornamenticon`,
|
||||||
|
ADD COLUMN `ornament_hero_model` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `ornamentidfile`;
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user