mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 09:06:46 +00:00
Merge upstream/master to incorporate EQEmu fixes
Resolve CMake style conflict in common/CMakeLists.txt by adopting the lowercase CMake command style used consistently throughout the upstream codebase.
This commit is contained in:
+279
-73
@@ -1,6 +1,6 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 3.12)
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
|
||||
SET(zone_sources
|
||||
set(zone_sources
|
||||
aa.cpp
|
||||
aa_ability.cpp
|
||||
aggro.cpp
|
||||
@@ -11,21 +11,27 @@ SET(zone_sources
|
||||
beacon.cpp
|
||||
bonuses.cpp
|
||||
bot.cpp
|
||||
bot_raid.cpp
|
||||
bot_database.cpp
|
||||
bot_raid.cpp
|
||||
botspellsai.cpp
|
||||
cheat_manager.cpp
|
||||
cli/cli_benchmark_databuckets.cpp
|
||||
cli/cli_sidecar_serve_http.cpp
|
||||
cli/tests/cli_databuckets.cpp
|
||||
cli/tests/cli_npc_handins.cpp
|
||||
cli/tests/cli_npc_handins_multiquest.cpp
|
||||
cli/tests/cli_test_util.cpp
|
||||
cli/tests/cli_zone_state.cpp
|
||||
client.cpp
|
||||
client_evolving_items.cpp
|
||||
client_bot.cpp
|
||||
client_evolving_items.cpp
|
||||
client_mods.cpp
|
||||
client_packet.cpp
|
||||
client_process.cpp
|
||||
combat_record.cpp
|
||||
corpse.cpp
|
||||
../common/data_bucket.cpp
|
||||
doors.cpp
|
||||
dialogue_window.cpp
|
||||
doors.cpp
|
||||
dynamic_zone.cpp
|
||||
effects.cpp
|
||||
embparser.cpp
|
||||
@@ -38,24 +44,12 @@ SET(zone_sources
|
||||
fastmath.cpp
|
||||
fearpath.cpp
|
||||
forage.cpp
|
||||
groups.cpp
|
||||
guild.cpp
|
||||
guild_mgr.cpp
|
||||
hate_list.cpp
|
||||
heal_rotation.cpp
|
||||
horse.cpp
|
||||
inventory.cpp
|
||||
loot.cpp
|
||||
embperl.cpp
|
||||
entity.cpp
|
||||
exp.cpp
|
||||
fearpath.cpp
|
||||
forage.cpp
|
||||
global_loot_manager.cpp
|
||||
groups.cpp
|
||||
guild.cpp
|
||||
guild_mgr.cpp
|
||||
hate_list.cpp
|
||||
heal_rotation.cpp
|
||||
horse.cpp
|
||||
inventory.cpp
|
||||
loot.cpp
|
||||
@@ -65,8 +59,8 @@ SET(zone_sources
|
||||
mob.cpp
|
||||
mob_ai.cpp
|
||||
mob_appearance.cpp
|
||||
mob_movement_manager.cpp
|
||||
mob_info.cpp
|
||||
mob_movement_manager.cpp
|
||||
npc.cpp
|
||||
npc_scale_manager.cpp
|
||||
object.cpp
|
||||
@@ -81,16 +75,15 @@ SET(zone_sources
|
||||
position.cpp
|
||||
qglobals.cpp
|
||||
queryserv.cpp
|
||||
questmgr.cpp
|
||||
quest_db.cpp
|
||||
quest_parser_collection.cpp
|
||||
questmgr.cpp
|
||||
raids.cpp
|
||||
raycast_mesh.cpp
|
||||
sidecar_api/sidecar_api.cpp
|
||||
sidecar_api/loot_simulator_controller.cpp
|
||||
shared_task_zone_messaging.cpp
|
||||
sidecar_api/loot_simulator_controller.cpp
|
||||
sidecar_api/sidecar_api.cpp
|
||||
spawn2.cpp
|
||||
spawn2.h
|
||||
spawngroup.cpp
|
||||
special_attacks.cpp
|
||||
spell_effects.cpp
|
||||
@@ -111,17 +104,19 @@ SET(zone_sources
|
||||
worldserver.cpp
|
||||
xtargetautohaters.cpp
|
||||
zone.cpp
|
||||
zone_config.cpp
|
||||
zonedb.cpp
|
||||
zone_base_data.cpp
|
||||
zone_cli.cpp
|
||||
zone_config.cpp
|
||||
zone_event_scheduler.cpp
|
||||
zone_loot.cpp
|
||||
zone_npc_factions.cpp
|
||||
zone_reload.cpp
|
||||
zone_save_state.cpp
|
||||
zonedb.cpp
|
||||
zoning.cpp
|
||||
)
|
||||
|
||||
SET(zone_headers
|
||||
set(zone_headers
|
||||
aa.h
|
||||
aa_ability.h
|
||||
aggromanager.h
|
||||
@@ -139,9 +134,8 @@ SET(zone_headers
|
||||
command.h
|
||||
common.h
|
||||
corpse.h
|
||||
../common/data_bucket.h
|
||||
doors.h
|
||||
dialogue_window.h
|
||||
doors.h
|
||||
dynamic_zone.h
|
||||
embparser.h
|
||||
embperl.h
|
||||
@@ -157,8 +151,8 @@ SET(zone_headers
|
||||
hate_list.h
|
||||
heal_rotation.h
|
||||
horse.h
|
||||
lua_bot.h
|
||||
lua_bit.h
|
||||
lua_bot.h
|
||||
lua_buff.h
|
||||
lua_client.h
|
||||
lua_corpse.h
|
||||
@@ -206,17 +200,15 @@ SET(zone_headers
|
||||
pets.h
|
||||
position.h
|
||||
qglobals.h
|
||||
quest_interface.h
|
||||
queryserv.h
|
||||
quest_interface.h
|
||||
questmgr.h
|
||||
quest_db.h
|
||||
quest_interface.h
|
||||
quest_parser_collection.h
|
||||
questmgr.h
|
||||
raids.h
|
||||
raycast_mesh.h
|
||||
sidecar_api/sidecar_api.h
|
||||
shared_task_zone_messaging.h
|
||||
spawn2.cpp
|
||||
sidecar_api/sidecar_api.h
|
||||
spawn2.h
|
||||
spawngroup.h
|
||||
string_ids.h
|
||||
@@ -231,22 +223,21 @@ SET(zone_headers
|
||||
worldserver.h
|
||||
xtargetautohaters.h
|
||||
zone.h
|
||||
zone_event_scheduler.h
|
||||
zone_config.h
|
||||
zonedb.h
|
||||
zonedump.h
|
||||
zone_cli.h
|
||||
zone_config.h
|
||||
zone_event_scheduler.h
|
||||
zone_reload.h
|
||||
zone_save_state.h
|
||||
zone_cli.cpp)
|
||||
zonedb.h
|
||||
zonedump.h
|
||||
)
|
||||
|
||||
# lua unity build
|
||||
set(lua_sources
|
||||
lua_bot.cpp
|
||||
lua_bit.cpp
|
||||
lua_bot.cpp
|
||||
lua_buff.cpp
|
||||
lua_corpse.cpp
|
||||
lua_client.cpp
|
||||
lua_corpse.cpp
|
||||
lua_database.cpp
|
||||
lua_door.cpp
|
||||
lua_encounter.cpp
|
||||
@@ -275,9 +266,11 @@ set(lua_sources
|
||||
)
|
||||
|
||||
add_library(lua_zone STATIC ${lua_sources})
|
||||
set_target_properties(lua_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
||||
|
||||
# perl unity build
|
||||
set_property(TARGET lua_zone PROPERTY FOLDER libraries)
|
||||
set_target_properties(lua_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
||||
target_include_directories(lua_zone PRIVATE ..)
|
||||
|
||||
set(perl_sources
|
||||
perl_bot.cpp
|
||||
perl_buff.cpp
|
||||
@@ -306,12 +299,75 @@ set(perl_sources
|
||||
)
|
||||
|
||||
add_library(perl_zone STATIC ${perl_sources})
|
||||
set_property(TARGET perl_zone PROPERTY FOLDER libraries)
|
||||
set_target_properties(perl_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 8)
|
||||
target_link_libraries(perl_zone PUBLIC cereal::cereal fmt::fmt unofficial::libmariadb)
|
||||
target_include_directories(perl_zone PRIVATE ..)
|
||||
|
||||
# gm commands
|
||||
set(gm_command_sources
|
||||
command.cpp
|
||||
bot_command.cpp
|
||||
bot_commands/bot_actionable.cpp
|
||||
bot_commands/bot_appearance.cpp
|
||||
bot_commands/bot_apply_poison.cpp
|
||||
bot_commands/bot_apply_potion.cpp
|
||||
bot_commands/bot_attack.cpp
|
||||
bot_commands/bot_behind_mob.cpp
|
||||
bot_commands/bot_blocked_buffs.cpp
|
||||
bot_commands/bot_bot.cpp
|
||||
bot_commands/bot_bot_settings.cpp
|
||||
bot_commands/bot_cast.cpp
|
||||
bot_commands/bot_class_race_list.cpp
|
||||
bot_commands/bot_click_item.cpp
|
||||
bot_commands/bot_copy_settings.cpp
|
||||
bot_commands/bot_default_settings.cpp
|
||||
bot_commands/bot_depart.cpp
|
||||
bot_commands/bot_discipline.cpp
|
||||
bot_commands/bot_distance_ranged.cpp
|
||||
bot_commands/bot_find_aliases.cpp
|
||||
bot_commands/bot_follow.cpp
|
||||
bot_commands/bot_guard.cpp
|
||||
bot_commands/bot_heal_rotation.cpp
|
||||
bot_commands/bot_help.cpp
|
||||
bot_commands/bot_hold.cpp
|
||||
bot_commands/bot_illusion_block.cpp
|
||||
bot_commands/bot_inventory.cpp
|
||||
bot_commands/bot_item_use.cpp
|
||||
bot_commands/bot_max_melee_range.cpp
|
||||
bot_commands/bot_name.cpp
|
||||
bot_commands/bot_owner_option.cpp
|
||||
bot_commands/bot_pet.cpp
|
||||
bot_commands/bot_pick_lock.cpp
|
||||
bot_commands/bot_pickpocket.cpp
|
||||
bot_commands/bot_precombat.cpp
|
||||
bot_commands/bot_pull.cpp
|
||||
bot_commands/bot_release.cpp
|
||||
bot_commands/bot_set_assistee.cpp
|
||||
bot_commands/bot_sit_hp_percent.cpp
|
||||
bot_commands/bot_sit_in_combat.cpp
|
||||
bot_commands/bot_sit_mana_percent.cpp
|
||||
bot_commands/bot_spell.cpp
|
||||
bot_commands/bot_spell_aggro_checks.cpp
|
||||
bot_commands/bot_spell_announce_cast.cpp
|
||||
bot_commands/bot_spell_delays.cpp
|
||||
bot_commands/bot_spell_engaged_priority.cpp
|
||||
bot_commands/bot_spell_holds.cpp
|
||||
bot_commands/bot_spell_idle_priority.cpp
|
||||
bot_commands/bot_spell_max_hp_pct.cpp
|
||||
bot_commands/bot_spell_max_mana_pct.cpp
|
||||
bot_commands/bot_spell_max_thresholds.cpp
|
||||
bot_commands/bot_spell_min_hp_pct.cpp
|
||||
bot_commands/bot_spell_min_mana_pct.cpp
|
||||
bot_commands/bot_spell_min_thresholds.cpp
|
||||
bot_commands/bot_spell_pursue_priority.cpp
|
||||
bot_commands/bot_spell_resist_limits.cpp
|
||||
bot_commands/bot_spell_target_count.cpp
|
||||
bot_commands/bot_spelltypes.cpp
|
||||
bot_commands/bot_suspend.cpp
|
||||
bot_commands/bot_taunt.cpp
|
||||
bot_commands/bot_timer.cpp
|
||||
bot_commands/bot_track.cpp
|
||||
bot_commands/bot_view_combos.cpp
|
||||
command.cpp
|
||||
gm_commands/acceptrules.cpp
|
||||
gm_commands/advnpcspawn.cpp
|
||||
gm_commands/aggrozone.cpp
|
||||
@@ -351,11 +407,37 @@ set(gm_command_sources
|
||||
gm_commands/emptyinventory.cpp
|
||||
gm_commands/enablerecipe.cpp
|
||||
gm_commands/entityvariable.cpp
|
||||
gm_commands/evolving_items.cpp
|
||||
gm_commands/exptoggle.cpp
|
||||
gm_commands/faction.cpp
|
||||
gm_commands/evolving_items.cpp
|
||||
gm_commands/faction_association.cpp
|
||||
gm_commands/feature.cpp
|
||||
gm_commands/find.cpp
|
||||
gm_commands/find/find_aa.cpp
|
||||
gm_commands/find/find_account.cpp
|
||||
gm_commands/find/find_body_type.cpp
|
||||
gm_commands/find/find_bot.cpp
|
||||
gm_commands/find/find_bug_category.cpp
|
||||
gm_commands/find/find_character.cpp
|
||||
gm_commands/find/find_class.cpp
|
||||
gm_commands/find/find_comparison_type.cpp
|
||||
gm_commands/find/find_currency.cpp
|
||||
gm_commands/find/find_deity.cpp
|
||||
gm_commands/find/find_emote.cpp
|
||||
gm_commands/find/find_faction.cpp
|
||||
gm_commands/find/find_item.cpp
|
||||
gm_commands/find/find_language.cpp
|
||||
gm_commands/find/find_ldon_theme.cpp
|
||||
gm_commands/find/find_npctype.cpp
|
||||
gm_commands/find/find_object_type.cpp
|
||||
gm_commands/find/find_race.cpp
|
||||
gm_commands/find/find_recipe.cpp
|
||||
gm_commands/find/find_skill.cpp
|
||||
gm_commands/find/find_special_ability.cpp
|
||||
gm_commands/find/find_spell.cpp
|
||||
gm_commands/find/find_stance.cpp
|
||||
gm_commands/find/find_task.cpp
|
||||
gm_commands/find/find_zone.cpp
|
||||
gm_commands/fish.cpp
|
||||
gm_commands/fixmob.cpp
|
||||
gm_commands/flagedit.cpp
|
||||
@@ -380,9 +462,9 @@ set(gm_command_sources
|
||||
gm_commands/kill.cpp
|
||||
gm_commands/killallnpcs.cpp
|
||||
gm_commands/list.cpp
|
||||
gm_commands/lootsim.cpp
|
||||
gm_commands/loc.cpp
|
||||
gm_commands/logs.cpp
|
||||
gm_commands/lootsim.cpp
|
||||
gm_commands/makepet.cpp
|
||||
gm_commands/memspell.cpp
|
||||
gm_commands/merchantshop.cpp
|
||||
@@ -434,12 +516,119 @@ set(gm_command_sources
|
||||
gm_commands/sensetrap.cpp
|
||||
gm_commands/serverrules.cpp
|
||||
gm_commands/set.cpp
|
||||
gm_commands/set/set_aa_exp.cpp
|
||||
gm_commands/set/set_aa_points.cpp
|
||||
gm_commands/set/set_adventure_points.cpp
|
||||
gm_commands/set/set_alternate_currency.cpp
|
||||
gm_commands/set/set_animation.cpp
|
||||
gm_commands/set/set_anon.cpp
|
||||
gm_commands/set/set_auto_login.cpp
|
||||
gm_commands/set/set_bind_point.cpp
|
||||
gm_commands/set/set_checksum.cpp
|
||||
gm_commands/set/set_class_permanent.cpp
|
||||
gm_commands/set/set_crystals.cpp
|
||||
gm_commands/set/set_date.cpp
|
||||
gm_commands/set/set_endurance.cpp
|
||||
gm_commands/set/set_endurance_full.cpp
|
||||
gm_commands/set/set_exp.cpp
|
||||
gm_commands/set/set_flymode.cpp
|
||||
gm_commands/set/set_frozen.cpp
|
||||
gm_commands/set/set_gender.cpp
|
||||
gm_commands/set/set_gender_permanent.cpp
|
||||
gm_commands/set/set_gm.cpp
|
||||
gm_commands/set/set_gm_speed.cpp
|
||||
gm_commands/set/set_gm_status.cpp
|
||||
gm_commands/set/set_god_mode.cpp
|
||||
gm_commands/set/set_haste.cpp
|
||||
gm_commands/set/set_hero_model.cpp
|
||||
gm_commands/set/set_hide_me.cpp
|
||||
gm_commands/set/set_hp.cpp
|
||||
gm_commands/set/set_hp_full.cpp
|
||||
gm_commands/set/set_invulnerable.cpp
|
||||
gm_commands/set/set_language.cpp
|
||||
gm_commands/set/set_last_name.cpp
|
||||
gm_commands/set/set_level.cpp
|
||||
gm_commands/set/set_loginserver_info.cpp
|
||||
gm_commands/set/set_mana.cpp
|
||||
gm_commands/set/set_mana_full.cpp
|
||||
gm_commands/set/set_motd.cpp
|
||||
gm_commands/set/set_name.cpp
|
||||
gm_commands/set/set_ooc_mute.cpp
|
||||
gm_commands/set/set_password.cpp
|
||||
gm_commands/set/set_pvp.cpp
|
||||
gm_commands/set/set_pvp_points.cpp
|
||||
gm_commands/set/set_race.cpp
|
||||
gm_commands/set/set_race_permanent.cpp
|
||||
gm_commands/set/set_server_locked.cpp
|
||||
gm_commands/set/set_skill.cpp
|
||||
gm_commands/set/set_skill_all.cpp
|
||||
gm_commands/set/set_skill_all_max.cpp
|
||||
gm_commands/set/set_start_zone.cpp
|
||||
gm_commands/set/set_temporary_name.cpp
|
||||
gm_commands/set/set_texture.cpp
|
||||
gm_commands/set/set_time.cpp
|
||||
gm_commands/set/set_time_zone.cpp
|
||||
gm_commands/set/set_title.cpp
|
||||
gm_commands/set/set_title_suffix.cpp
|
||||
gm_commands/set/set_weather.cpp
|
||||
gm_commands/set/set_zone.cpp
|
||||
gm_commands/show.cpp
|
||||
gm_commands/show/show_aa_points.cpp
|
||||
gm_commands/show/show_aas.cpp
|
||||
gm_commands/show/show_aggro.cpp
|
||||
gm_commands/show/show_auto_login.cpp
|
||||
gm_commands/show/show_buffs.cpp
|
||||
gm_commands/show/show_buried_corpse_count.cpp
|
||||
gm_commands/show/show_client_version_summary.cpp
|
||||
gm_commands/show/show_content_flags.cpp
|
||||
gm_commands/show/show_currencies.cpp
|
||||
gm_commands/show/show_distance.cpp
|
||||
gm_commands/show/show_emotes.cpp
|
||||
gm_commands/show/show_field_of_view.cpp
|
||||
gm_commands/show/show_flags.cpp
|
||||
gm_commands/show/show_group_info.cpp
|
||||
gm_commands/show/show_hatelist.cpp
|
||||
gm_commands/show/show_inventory.cpp
|
||||
gm_commands/show/show_ip_lookup.cpp
|
||||
gm_commands/show/show_keyring.cpp
|
||||
gm_commands/show/show_line_of_sight.cpp
|
||||
gm_commands/show/show_network.cpp
|
||||
gm_commands/show/show_network_stats.cpp
|
||||
gm_commands/show/show_npc_global_loot.cpp
|
||||
gm_commands/show/show_npc_stats.cpp
|
||||
gm_commands/show/show_npc_type.cpp
|
||||
gm_commands/show/show_peqzone_flags.cpp
|
||||
gm_commands/show/show_petition.cpp
|
||||
gm_commands/show/show_petition_info.cpp
|
||||
gm_commands/show/show_proximity.cpp
|
||||
gm_commands/show/show_quest_errors.cpp
|
||||
gm_commands/show/show_quest_globals.cpp
|
||||
gm_commands/show/show_recipe.cpp
|
||||
gm_commands/show/show_server_info.cpp
|
||||
gm_commands/show/show_skills.cpp
|
||||
gm_commands/show/show_spawn_status.cpp
|
||||
gm_commands/show/show_special_abilities.cpp
|
||||
gm_commands/show/show_spells.cpp
|
||||
gm_commands/show/show_spells_list.cpp
|
||||
gm_commands/show/show_stats.cpp
|
||||
gm_commands/show/show_timers.cpp
|
||||
gm_commands/show/show_traps.cpp
|
||||
gm_commands/show/show_uptime.cpp
|
||||
gm_commands/show/show_variable.cpp
|
||||
gm_commands/show/show_version.cpp
|
||||
gm_commands/show/show_waypoints.cpp
|
||||
gm_commands/show/show_who.cpp
|
||||
gm_commands/show/show_xtargets.cpp
|
||||
gm_commands/show/show_zone_data.cpp
|
||||
gm_commands/show/show_zone_global_loot.cpp
|
||||
gm_commands/show/show_zone_loot.cpp
|
||||
gm_commands/show/show_zone_points.cpp
|
||||
gm_commands/show/show_zone_status.cpp
|
||||
gm_commands/show/show_zone_variables.cpp
|
||||
gm_commands/shutdown.cpp
|
||||
gm_commands/spawn.cpp
|
||||
gm_commands/spawneditmass.cpp
|
||||
gm_commands/spawnfix.cpp
|
||||
gm_commands/faction_association.cpp
|
||||
gm_commands/stun.cpp
|
||||
gm_commands/summon.cpp
|
||||
gm_commands/summonburiedplayercorpse.cpp
|
||||
@@ -463,46 +652,63 @@ set(gm_command_sources
|
||||
gm_commands/wp.cpp
|
||||
gm_commands/wpadd.cpp
|
||||
gm_commands/zone.cpp
|
||||
gm_commands/zone_instance.cpp
|
||||
gm_commands/zone_shard.cpp
|
||||
gm_commands/zonebootup.cpp
|
||||
gm_commands/zoneshutdown.cpp
|
||||
gm_commands/zonevariable.cpp
|
||||
gm_commands/zone_instance.cpp
|
||||
gm_commands/zone_shard.cpp
|
||||
gm_commands/zsave.cpp
|
||||
)
|
||||
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${zone_sources})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Header Files" FILES ${zone_headers})
|
||||
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "Source Files" FILES ${gm_command_sources})
|
||||
|
||||
add_library(gm_commands_zone STATIC ${gm_command_sources})
|
||||
target_link_libraries(gm_commands_zone PRIVATE common)
|
||||
target_include_directories(gm_commands_zone PRIVATE ..)
|
||||
|
||||
set_target_properties(gm_commands_zone PROPERTIES UNITY_BUILD ON UNITY_BUILD_BATCH_SIZE 32)
|
||||
set_property(TARGET gm_commands_zone PROPERTY FOLDER libraries)
|
||||
|
||||
# zone combine sources and headers
|
||||
ADD_EXECUTABLE(zone ${zone_sources} ${zone_headers})
|
||||
add_executable(zone ${zone_sources} ${zone_headers})
|
||||
|
||||
# binary output directory
|
||||
INSTALL(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
install(TARGETS zone RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
|
||||
|
||||
# precompiled headers
|
||||
IF (EQEMU_BUILD_PCH)
|
||||
if(EQEMU_BUILD_PCH)
|
||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/app-pch.h)
|
||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ../common/pch/std-pch.h)
|
||||
TARGET_PRECOMPILE_HEADERS(zone PRIVATE ./pch/pch.h)
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-DZONE)
|
||||
|
||||
# link lua_zone unity build against luabind
|
||||
target_link_libraries(lua_zone PRIVATE luabind)
|
||||
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
|
||||
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
|
||||
endif()
|
||||
|
||||
# perl unity build links against perl_zone
|
||||
target_link_libraries(perl_zone PRIVATE perlbind)
|
||||
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
|
||||
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
|
||||
add_definitions(-DZONE)
|
||||
|
||||
if(EQEMU_BUILD_LUA)
|
||||
target_compile_definitions(lua_zone PUBLIC LUA_EQEMU)
|
||||
target_link_libraries(lua_zone PUBLIC luabind Boost::dynamic_bitset Boost::tuple Boost::foreach common)
|
||||
if (EQEMU_BUILD_STATIC AND LUA_LIBRARY)
|
||||
target_link_libraries(zone PRIVATE ${LUA_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# link zone against common libraries
|
||||
target_link_libraries(zone PRIVATE lua_zone perl_zone gm_commands_zone ${ZONE_LIBS})
|
||||
if(EQEMU_BUILD_PERL)
|
||||
target_compile_definitions(perl_zone PUBLIC EMBPERL EMBPERL_PLUGIN PERLBIND_NO_STRICT_SCALAR_TYPES)
|
||||
target_link_libraries(perl_zone PUBLIC perlbind common ${PERL_LIBRARY})
|
||||
if (EQEMU_BUILD_STATIC AND PERL_LIBRARY)
|
||||
target_link_libraries(zone PRIVATE ${PERL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_link_libraries(zone PRIVATE gm_commands_zone common RecastNavigation::Detour)
|
||||
target_include_directories(zone PRIVATE ..)
|
||||
|
||||
if(EQEMU_BUILD_LUA)
|
||||
target_link_libraries(zone PRIVATE lua_zone)
|
||||
endif()
|
||||
|
||||
if(EQEMU_BUILD_PERL)
|
||||
target_link_libraries(zone PRIVATE perl_zone)
|
||||
endif()
|
||||
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
|
||||
|
||||
set_property(TARGET zone PROPERTY FOLDER executables/servers)
|
||||
|
||||
+24
-26
@@ -16,34 +16,32 @@ Copyright (C) 2001-2016 EQEMu Development Team (http://eqemulator.net)
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/classes.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/eq_packet_structs.h"
|
||||
#include "../common/races.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/events/player_event_logs.h"
|
||||
#include "aa.h"
|
||||
#include "client.h"
|
||||
#include "corpse.h"
|
||||
#include "groups.h"
|
||||
#include "mob.h"
|
||||
#include "queryserv.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "raids.h"
|
||||
#include "string_ids.h"
|
||||
#include "titles.h"
|
||||
#include "zonedb.h"
|
||||
#include "worldserver.h"
|
||||
|
||||
#include "bot.h"
|
||||
|
||||
#include "../common/repositories/character_alternate_abilities_repository.h"
|
||||
#include "../common/repositories/aa_ability_repository.h"
|
||||
#include "../common/repositories/aa_ranks_repository.h"
|
||||
#include "../common/repositories/aa_rank_effects_repository.h"
|
||||
#include "../common/repositories/aa_rank_prereqs_repository.h"
|
||||
#include "common/classes.h"
|
||||
#include "common/eq_packet_structs.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/events/player_event_logs.h"
|
||||
#include "common/races.h"
|
||||
#include "common/repositories/aa_ability_repository.h"
|
||||
#include "common/repositories/aa_rank_effects_repository.h"
|
||||
#include "common/repositories/aa_rank_prereqs_repository.h"
|
||||
#include "common/repositories/aa_ranks_repository.h"
|
||||
#include "common/repositories/character_alternate_abilities_repository.h"
|
||||
#include "common/spdat.h"
|
||||
#include "common/strings.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/corpse.h"
|
||||
#include "zone/groups.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/queryserv.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/raids.h"
|
||||
#include "zone/string_ids.h"
|
||||
#include "zone/titles.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
extern WorldServer worldserver;
|
||||
extern QueryServ* QServ;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#ifndef AA_H
|
||||
#define AA_H
|
||||
#pragma once
|
||||
|
||||
#define MAX_SWARM_PETS 12 //this can change as long as you make more coords (swarm_pet_x/swarm_pet_y)
|
||||
#define WAKE_THE_DEAD_NPCTYPEID 500 //We use first pet in pets table as a template
|
||||
@@ -1556,5 +1555,3 @@ enum AATimers
|
||||
aaTimerWarcry,
|
||||
aaTimerMax
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+3
-4
@@ -16,10 +16,9 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/types.h"
|
||||
#include "masterentity.h"
|
||||
#include "aa_ability.h"
|
||||
#include "common/types.h"
|
||||
#include "zone/masterentity.h"
|
||||
#include "zone/aa_ability.h"
|
||||
|
||||
AA::Rank *AA::Ability::GetRankByPointsSpent(int current_level) {
|
||||
if(current_level == 0)
|
||||
|
||||
+7
-11
@@ -16,20 +16,18 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_ZONE_AA_ABILITY_H
|
||||
#define EQEMU_ZONE_AA_ABILITY_H
|
||||
#pragma once
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "zone/aa_rank_effects.h"
|
||||
#include "zone/aa_rank.h"
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include "aa_rank_effects.h"
|
||||
#include "aa_rank.h"
|
||||
|
||||
class Mob;
|
||||
|
||||
namespace AA
|
||||
{
|
||||
namespace AA {
|
||||
|
||||
class Ability
|
||||
{
|
||||
@@ -57,6 +55,4 @@ public:
|
||||
Rank *first;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
} // namespace AA
|
||||
|
||||
+8
-7
@@ -16,11 +16,14 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_ZONE_AA_RANK_H
|
||||
#define EQEMU_ZONE_AA_RANK_H
|
||||
#pragma once
|
||||
|
||||
namespace AA
|
||||
{
|
||||
#include "common/types.h"
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
namespace AA {
|
||||
|
||||
class Ability;
|
||||
class Rank
|
||||
@@ -51,6 +54,4 @@ public:
|
||||
std::map<int, int> prereqs;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
} // namespace AA
|
||||
|
||||
@@ -16,14 +16,11 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef EQEMU_ZONE_AA_RANK_EFFECTS_H
|
||||
#define EQEMU_ZONE_AA_RANK_EFFECTS_H
|
||||
#pragma once
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include <string>
|
||||
#include "common/types.h"
|
||||
|
||||
namespace AA
|
||||
{
|
||||
namespace AA {
|
||||
|
||||
struct RankEffect
|
||||
{
|
||||
@@ -33,6 +30,4 @@ struct RankEffect
|
||||
int limit_value;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
} // namespace AA
|
||||
|
||||
+10
-14
@@ -16,20 +16,16 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/faction.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/spdat.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "entity.h"
|
||||
#include "mob.h"
|
||||
|
||||
#include "bot.h"
|
||||
|
||||
#include "map.h"
|
||||
#include "water_map.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/faction.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/spdat.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/entity.h"
|
||||
#include "zone/map.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/water_map.h"
|
||||
|
||||
extern Zone* zone;
|
||||
//#define LOSDEBUG 6
|
||||
|
||||
@@ -7,5 +7,3 @@ AggroMeter::AggroMeter() : lock_id(0), target_id(0), secondary_id(0), lock_chang
|
||||
data[i].pct = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-7
@@ -1,8 +1,8 @@
|
||||
#ifndef AGGROMANAGER_H
|
||||
#define AGGROMANAGER_H
|
||||
#pragma once
|
||||
|
||||
#include "../common/types.h"
|
||||
#include <assert.h>
|
||||
#include "common/types.h"
|
||||
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
|
||||
class AggroMeter
|
||||
@@ -75,6 +75,3 @@ public:
|
||||
// fuck it, lets just use a buffer the size of the largest to work with
|
||||
const inline size_t max_packet_size() const { return sizeof(uint8) + sizeof(uint32) + sizeof(uint8) + (sizeof(uint8) + sizeof(uint16)) * AT_Max; }
|
||||
};
|
||||
|
||||
|
||||
#endif /* !AGGROMANAGER_H */
|
||||
|
||||
+12
-11
@@ -18,18 +18,19 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include "../common/net/websocket_server.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "zonedb.h"
|
||||
#include "client.h"
|
||||
#include "entity.h"
|
||||
#include "corpse.h"
|
||||
#include "api_service.h"
|
||||
#include "object.h"
|
||||
#include "zone.h"
|
||||
#include "doors.h"
|
||||
#include <iostream>
|
||||
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/net/websocket_server.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/corpse.h"
|
||||
#include "zone/doors.h"
|
||||
#include "zone/entity.h"
|
||||
#include "zone/object.h"
|
||||
#include "zone/zone.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
extern Zone *zone;
|
||||
|
||||
|
||||
+2
-1
@@ -20,7 +20,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/net/websocket_server.h"
|
||||
|
||||
#include <memory>
|
||||
#include "../common/net/websocket_server.h"
|
||||
|
||||
void RegisterApiService(std::unique_ptr<EQ::Net::WebsocketServer> &server);
|
||||
|
||||
+19
-28
@@ -16,38 +16,29 @@ along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eq_constants.h"
|
||||
#include "../common/eq_packet_structs.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/events/player_event_logs.h"
|
||||
#include "queryserv.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "string_ids.h"
|
||||
#include "water_map.h"
|
||||
#include "worldserver.h"
|
||||
#include "zone.h"
|
||||
#include "lua_parser.h"
|
||||
#include "fastmath.h"
|
||||
#include "mob.h"
|
||||
#include "npc.h"
|
||||
|
||||
#include "bot.h"
|
||||
#include "common/data_verification.h"
|
||||
#include "common/eq_constants.h"
|
||||
#include "common/eq_packet_structs.h"
|
||||
#include "common/events/player_event_logs.h"
|
||||
#include "common/misc_functions.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/spdat.h"
|
||||
#include "common/strings.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/fastmath.h"
|
||||
#include "zone/lua_parser.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/npc.h"
|
||||
#include "zone/queryserv.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/string_ids.h"
|
||||
#include "zone/water_map.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zone.h"
|
||||
|
||||
extern QueryServ* QServ;
|
||||
extern WorldServer worldserver;
|
||||
extern FastMath g_Math;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define snprintf _snprintf
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
extern EntityList entity_list;
|
||||
extern Zone* zone;
|
||||
|
||||
|
||||
+6
-7
@@ -1,10 +1,9 @@
|
||||
#include "../common/strings.h"
|
||||
#include "../common/repositories/auras_repository.h"
|
||||
|
||||
#include "aura.h"
|
||||
#include "client.h"
|
||||
#include "string_ids.h"
|
||||
#include "raids.h"
|
||||
#include "common/repositories/auras_repository.h"
|
||||
#include "common/strings.h"
|
||||
#include "zone/aura.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/raids.h"
|
||||
#include "zone/string_ids.h"
|
||||
|
||||
Aura::Aura(NPCType *type_data, Mob *owner, AuraRecord &record)
|
||||
: NPC(type_data, 0, owner->GetPosition(), GravityBehavior::Flying), spell_id(record.spell_id),
|
||||
|
||||
+7
-10
@@ -1,14 +1,14 @@
|
||||
#ifndef AURA_H
|
||||
#define AURA_H
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common/timer.h"
|
||||
#include "common/types.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/npc.h"
|
||||
|
||||
#include <functional>
|
||||
#include <set>
|
||||
|
||||
#include "mob.h"
|
||||
#include "npc.h"
|
||||
#include "../common/types.h"
|
||||
#include "../common/timer.h"
|
||||
|
||||
class Group;
|
||||
class Raid;
|
||||
class Mob;
|
||||
@@ -86,6 +86,3 @@ private:
|
||||
std::set<int> casted_on; // we keep track of the other entities we've casted on
|
||||
std::set<int> spawned_for;
|
||||
};
|
||||
|
||||
#endif /* !AURA_H */
|
||||
|
||||
|
||||
+6
-19
@@ -17,31 +17,20 @@
|
||||
*/
|
||||
|
||||
/*
|
||||
|
||||
Beacon class, extends Mob. Used for AE rain spells to have a mob
|
||||
target to center around.
|
||||
|
||||
*/
|
||||
|
||||
class Zone;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#if (!defined(_MSC_VER) || (defined(_MSC_VER) && _MSC_VER < 1900))
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define strncasecmp _strnicmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
#include "../common/races.h"
|
||||
#include "beacon.h"
|
||||
#include "entity.h"
|
||||
#include "mob.h"
|
||||
#include "common/races.h"
|
||||
#include "zone/beacon.h"
|
||||
#include "zone/entity.h"
|
||||
#include "zone/mob.h"
|
||||
|
||||
extern EntityList entity_list;
|
||||
extern Zone* zone;
|
||||
|
||||
class Zone;
|
||||
|
||||
// if lifetime is 0 this is a permanent beacon.. not sure if that'll be
|
||||
// useful for anything
|
||||
Beacon::Beacon(const glm::vec4 &in_pos, int lifetime) : Mob(
|
||||
@@ -179,5 +168,3 @@ void Beacon::AELocationSpell(Mob *caster, uint16 cast_spell_id, int16 in_resist_
|
||||
spell_timer.Start(2500);
|
||||
spell_timer.Trigger();
|
||||
}
|
||||
|
||||
|
||||
|
||||
+4
-8
@@ -16,12 +16,11 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef BEACON_H
|
||||
#define BEACON_H
|
||||
#pragma once
|
||||
|
||||
#include "mob.h"
|
||||
#include "../common/types.h"
|
||||
#include "../common/timer.h"
|
||||
#include "common/timer.h"
|
||||
#include "common/types.h"
|
||||
#include "zone/mob.h"
|
||||
|
||||
class Group;
|
||||
class Raid;
|
||||
@@ -59,7 +58,4 @@ protected:
|
||||
int max_targets;
|
||||
|
||||
uint16 caster_id;
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+12
-20
@@ -15,27 +15,19 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/classes.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/item_instance.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/spdat.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "entity.h"
|
||||
#include "mob.h"
|
||||
|
||||
#include "bot.h"
|
||||
|
||||
#include "quest_parser_collection.h"
|
||||
|
||||
|
||||
#ifndef WIN32
|
||||
#include <stdlib.h>
|
||||
#include "../common/unix.h"
|
||||
#endif
|
||||
#include "common/classes.h"
|
||||
#include "common/data_verification.h"
|
||||
#include "common/item_instance.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/spdat.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/entity.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
|
||||
#include <cstdlib>
|
||||
|
||||
void Mob::CalcBonuses()
|
||||
{
|
||||
@@ -5901,7 +5893,7 @@ float Mob::CheckHeroicBonusesDataBuckets(std::string bucket_name)
|
||||
DataBucketKey k = GetScopedBucketKeys();
|
||||
k.key = bucket_name;
|
||||
if (IsOfClientBot()) {
|
||||
bucket_value = DataBucket::GetData(k).value;
|
||||
bucket_value = DataBucket::GetData(&database, k).value;
|
||||
}
|
||||
|
||||
if (bucket_value.empty() || !Strings::IsNumber(bucket_value)) {
|
||||
|
||||
+16
-13
@@ -17,17 +17,18 @@
|
||||
*/
|
||||
|
||||
#include "bot.h"
|
||||
#include "object.h"
|
||||
#include "raids.h"
|
||||
#include "doors.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "lua_parser.h"
|
||||
#include "../common/repositories/bot_inventories_repository.h"
|
||||
#include "../common/repositories/bot_spell_settings_repository.h"
|
||||
#include "../common/repositories/bot_starting_items_repository.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/repositories/criteria/content_filter_criteria.h"
|
||||
#include "../common/skill_caps.h"
|
||||
|
||||
#include "common/data_verification.h"
|
||||
#include "common/repositories/bot_inventories_repository.h"
|
||||
#include "common/repositories/bot_spell_settings_repository.h"
|
||||
#include "common/repositories/bot_starting_items_repository.h"
|
||||
#include "common/repositories/criteria/content_filter_criteria.h"
|
||||
#include "common/skill_caps.h"
|
||||
#include "zone/doors.h"
|
||||
#include "zone/lua_parser.h"
|
||||
#include "zone/object.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/raids.h"
|
||||
|
||||
/*
|
||||
TODO bot rewrite:
|
||||
@@ -2601,6 +2602,8 @@ void Bot::DoOutOfCombatChecks(Client* bot_owner, Mob* follow_mob, float leash_di
|
||||
if (GetClass() == Class::Bard && AI_HasSpells() && TryBardMovementCasts()) {
|
||||
return;
|
||||
}
|
||||
|
||||
TryMeditate();
|
||||
}
|
||||
|
||||
// This is as close as I could get without modifying the aggro mechanics and making it an expensive process...
|
||||
@@ -8224,13 +8227,13 @@ bool Bot::CheckDataBucket(std::string bucket_name, const std::string& bucket_val
|
||||
DataBucketKey k = GetScopedBucketKeys();
|
||||
k.key = bucket_name;
|
||||
|
||||
auto b = DataBucket::GetData(k);
|
||||
auto b = DataBucket::GetData(&database, k);
|
||||
if (b.value.empty() && GetBotOwner()) {
|
||||
// fetch from owner
|
||||
k = GetBotOwner()->GetScopedBucketKeys();
|
||||
k.key = bucket_name;
|
||||
|
||||
b = DataBucket::GetData(k);
|
||||
b = DataBucket::GetData(&database, k);
|
||||
if (b.value.empty()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
+15
-21
@@ -16,26 +16,22 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef BOT_H
|
||||
#define BOT_H
|
||||
#pragma once
|
||||
|
||||
#include "bot_structs.h"
|
||||
#include "mob.h"
|
||||
#include "client.h"
|
||||
#include "pets.h"
|
||||
#include "heal_rotation.h"
|
||||
#include "groups.h"
|
||||
#include "corpse.h"
|
||||
#include "zonedb.h"
|
||||
#include "../common/zone_store.h"
|
||||
#include "string_ids.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "worldserver.h"
|
||||
#include "raids.h"
|
||||
|
||||
#include <sstream>
|
||||
#include "common/misc_functions.h"
|
||||
#include "common/zone_store.h"
|
||||
#include "zone/bot_structs.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/corpse.h"
|
||||
#include "zone/groups.h"
|
||||
#include "zone/guild_mgr.h"
|
||||
#include "zone/heal_rotation.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/pets.h"
|
||||
#include "zone/raids.h"
|
||||
#include "zone/string_ids.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
constexpr uint32 BOT_KEEP_ALIVE_INTERVAL = 5000; // 5 seconds
|
||||
|
||||
@@ -1266,5 +1262,3 @@ private:
|
||||
};
|
||||
|
||||
bool IsSpellInBotList(DBbotspells_Struct* spell_list, uint16 spell_id);
|
||||
|
||||
#endif // BOT_H
|
||||
|
||||
+20
-88
@@ -32,34 +32,28 @@
|
||||
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _WINDOWS
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/eq_packet.h"
|
||||
#include "../common/features.h"
|
||||
#include "../common/ptimer.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/serverinfo.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/say_link.h"
|
||||
|
||||
#include "bot_command.h"
|
||||
#include "zonedb.h"
|
||||
#include "qglobals.h"
|
||||
#include "queryserv.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "titles.h"
|
||||
#include "water_map.h"
|
||||
#include "worldserver.h"
|
||||
#include "mob.h"
|
||||
#include "bot_database.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "common/data_verification.h"
|
||||
#include "common/eq_packet.h"
|
||||
#include "common/features.h"
|
||||
#include "common/ptimer.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/say_link.h"
|
||||
#include "common/serverinfo.h"
|
||||
#include "common/strings.h"
|
||||
#include "zone/bot_database.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/qglobals.h"
|
||||
#include "zone/queryserv.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/titles.h"
|
||||
#include "zone/water_map.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
#include "fmt/format.h"
|
||||
#include <cstring>
|
||||
|
||||
extern QueryServ* QServ;
|
||||
extern WorldServer worldserver;
|
||||
@@ -863,65 +857,3 @@ void SendSpellTypeWindow(Client* c, const Seperator* sep) {
|
||||
c->SendPopupToClient("Spell Types", popup_text.c_str());
|
||||
}
|
||||
|
||||
#include "bot_commands/actionable.cpp"
|
||||
#include "bot_commands/appearance.cpp"
|
||||
#include "bot_commands/apply_poison.cpp"
|
||||
#include "bot_commands/apply_potion.cpp"
|
||||
#include "bot_commands/attack.cpp"
|
||||
#include "bot_commands/behind_mob.cpp"
|
||||
#include "bot_commands/blocked_buffs.cpp"
|
||||
#include "bot_commands/bot.cpp"
|
||||
#include "bot_commands/bot_settings.cpp"
|
||||
#include "bot_commands/cast.cpp"
|
||||
#include "bot_commands/class_race_list.cpp"
|
||||
#include "bot_commands/click_item.cpp"
|
||||
#include "bot_commands/copy_settings.cpp"
|
||||
#include "bot_commands/default_settings.cpp"
|
||||
#include "bot_commands/depart.cpp"
|
||||
#include "bot_commands/discipline.cpp"
|
||||
#include "bot_commands/distance_ranged.cpp"
|
||||
#include "bot_commands/find_aliases.cpp"
|
||||
#include "bot_commands/follow.cpp"
|
||||
#include "bot_commands/guard.cpp"
|
||||
#include "bot_commands/heal_rotation.cpp"
|
||||
#include "bot_commands/help.cpp"
|
||||
#include "bot_commands/hold.cpp"
|
||||
#include "bot_commands/illusion_block.cpp"
|
||||
#include "bot_commands/inventory.cpp"
|
||||
#include "bot_commands/item_use.cpp"
|
||||
#include "bot_commands/max_melee_range.cpp"
|
||||
#include "bot_commands/name.cpp"
|
||||
#include "bot_commands/owner_option.cpp"
|
||||
#include "bot_commands/pet.cpp"
|
||||
#include "bot_commands/pick_lock.cpp"
|
||||
#include "bot_commands/pickpocket.cpp"
|
||||
#include "bot_commands/precombat.cpp"
|
||||
#include "bot_commands/pull.cpp"
|
||||
#include "bot_commands/release.cpp"
|
||||
#include "bot_commands/set_assistee.cpp"
|
||||
#include "bot_commands/sit_hp_percent.cpp"
|
||||
#include "bot_commands/sit_in_combat.cpp"
|
||||
#include "bot_commands/sit_mana_percent.cpp"
|
||||
#include "bot_commands/spell.cpp"
|
||||
#include "bot_commands/spell_aggro_checks.cpp"
|
||||
#include "bot_commands/spell_announce_cast.cpp"
|
||||
#include "bot_commands/spell_delays.cpp"
|
||||
#include "bot_commands/spell_engaged_priority.cpp"
|
||||
#include "bot_commands/spell_holds.cpp"
|
||||
#include "bot_commands/spell_idle_priority.cpp"
|
||||
#include "bot_commands/spell_max_hp_pct.cpp"
|
||||
#include "bot_commands/spell_max_mana_pct.cpp"
|
||||
#include "bot_commands/spell_max_thresholds.cpp"
|
||||
#include "bot_commands/spell_min_hp_pct.cpp"
|
||||
#include "bot_commands/spell_min_mana_pct.cpp"
|
||||
#include "bot_commands/spell_min_thresholds.cpp"
|
||||
#include "bot_commands/spell_pursue_priority.cpp"
|
||||
#include "bot_commands/spell_resist_limits.cpp"
|
||||
#include "bot_commands/spell_target_count.cpp"
|
||||
#include "bot_commands/spelltypes.cpp"
|
||||
#include "bot_commands/summon.cpp"
|
||||
#include "bot_commands/suspend.cpp"
|
||||
#include "bot_commands/taunt.cpp"
|
||||
#include "bot_commands/timer.cpp"
|
||||
#include "bot_commands/track.cpp"
|
||||
#include "bot_commands/view_combos.cpp"
|
||||
|
||||
+4
-7
@@ -16,16 +16,15 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef BOT_COMMAND_H
|
||||
#define BOT_COMMAND_H
|
||||
#include "common/types.h"
|
||||
#include "bot.h"
|
||||
#include "dialogue_window.h"
|
||||
|
||||
class Client;
|
||||
class Seperator;
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "bot.h"
|
||||
#include "dialogue_window.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -1189,5 +1188,3 @@ bool helper_no_available_bots(Client *bot_owner, Bot *my_bot = nullptr);
|
||||
void helper_send_available_subcommands(Client *bot_owner, const char* command_simile, std::vector<const char*> subcommand_list);
|
||||
void helper_send_usage_required_bots(Client *bot_owner, uint16 spell_type);
|
||||
void SendSpellTypeWindow(Client* c, const Seperator* sep);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_actionable(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_appearance(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_apply_poison(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_apply_potion(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_attack(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_behind_mob(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_blocked_buffs(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_bot(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_bot_settings(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_cast(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_class_race_list(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_click_item(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_copy_settings(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_default_settings(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_depart(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_discipline(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_distance_ranged(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_find_aliases(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_follow(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_guard(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_heal_rotation(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_help(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_hold(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_illusion_block(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_inventory(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_item_use(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_max_melee_range(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_surname(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_owner_option(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "../bot_command.h"
|
||||
#include "../bot.h"
|
||||
#include "zone/bot_command.h"
|
||||
#include "zone/bot.h"
|
||||
|
||||
void bot_command_pet(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
#include "zone/doors.h"
|
||||
|
||||
void bot_command_pick_lock(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_pickpocket(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_precombat(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_pull(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_release(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_set_assistee(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_sit_hp_percent(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_sit_in_combat(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_sit_mana_percent(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_list(Client* c, const Seperator *sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_aggro_checks(Client* c, const Seperator* sep)
|
||||
{
|
||||
+24
-5
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
if (helper_command_alias_fail(c, "bot_command_spell_announce_cast", sep->arg[0], "spellannouncecasts")) {
|
||||
@@ -11,6 +11,7 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
BotCommandHelpParams p;
|
||||
|
||||
p.description = { "Allows you to enable or disable cast announcements for bots by spell type." };
|
||||
p.notes = { fmt::format("- You can use the 'all' argument to change all spell types at once. IE '{} all 0' or '{} all 0 spawned' to disable for the targeted bot or all bots.", sep->arg[0], sep->arg[0]) };
|
||||
p.example_format =
|
||||
{
|
||||
fmt::format("{} [Type Shortname] [value] [actionable]", sep->arg[0]),
|
||||
@@ -88,6 +89,7 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
bool current_check = false;
|
||||
uint16 spell_type = 0;
|
||||
uint32 type_value = 0;
|
||||
bool all_types = false;
|
||||
|
||||
// String/Int type checks
|
||||
if (sep->IsNumber(1)) {
|
||||
@@ -99,6 +101,9 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (!arg1.compare("all")) {
|
||||
all_types = true;
|
||||
}
|
||||
else {
|
||||
if (Bot::GetSpellTypeIDByShortName(arg1) != UINT16_MAX) {
|
||||
spell_type = Bot::GetSpellTypeIDByShortName(arg1);
|
||||
@@ -129,6 +134,11 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
}
|
||||
}
|
||||
else if (!arg2.compare("current")) {
|
||||
if (all_types) {
|
||||
c->Message(Chat::Yellow, "You must specify a single type to check the current state of.");
|
||||
|
||||
return;
|
||||
}
|
||||
++ab_arg;
|
||||
current_check = true;
|
||||
}
|
||||
@@ -183,8 +193,17 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
);
|
||||
}
|
||||
else {
|
||||
my_bot->SetSpellTypeAnnounceCast(spell_type, type_value);
|
||||
++success_count;
|
||||
if (all_types) {
|
||||
for (uint16 i = BotSpellTypes::START; i <= BotSpellTypes::END; ++i) {
|
||||
my_bot->SetSpellTypeAnnounceCast(i, type_value);
|
||||
}
|
||||
|
||||
++success_count;
|
||||
}
|
||||
else {
|
||||
my_bot->SetSpellTypeAnnounceCast(spell_type, type_value);
|
||||
++success_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!current_check) {
|
||||
@@ -194,8 +213,8 @@ void bot_command_spell_announce_cast(Client* c, const Seperator* sep) {
|
||||
fmt::format(
|
||||
"{} says, 'I will {} announce [{}] casts.'",
|
||||
first_found->GetCleanName(),
|
||||
(first_found->GetSpellTypeAnnounceCast(spell_type) ? "now" : "no longer"),
|
||||
Bot::GetSpellTypeNameByID(spell_type)
|
||||
(type_value ? "now" : "no longer"),
|
||||
(all_types ? "all" : Bot::GetSpellTypeNameByID(spell_type))
|
||||
).c_str()
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_delays(Client* c, const Seperator* sep) {
|
||||
if (helper_command_alias_fail(c, "bot_command_spell_delays", sep->arg[0], "spelldelays")) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_engaged_priority(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_holds(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_idle_priority(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_max_hp_pct(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_max_mana_pct(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_max_thresholds(Client* c, const Seperator* sep) {
|
||||
if (helper_command_alias_fail(c, "bot_command_spell_max_thresholds", sep->arg[0], "spellmaxthresholds")) {
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_min_hp_pct(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_min_mana_pct(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_min_thresholds(Client* c, const Seperator* sep) {
|
||||
if (helper_command_alias_fail(c, "bot_command_spell_min_thresholds", sep->arg[0], "spellminthresholds")) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_pursue_priority(Client* c, const Seperator* sep)
|
||||
{
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_resist_limits(Client* c, const Seperator* sep) {
|
||||
if (helper_command_alias_fail(c, "bot_command_spell_resist_limits", sep->arg[0], "spellresistlimits")) {
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spell_target_count(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,3 +1,5 @@
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_spelltype_ids(Client* c, const Seperator* sep)
|
||||
{
|
||||
SendSpellTypeWindow(c, sep);
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_suspend(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_taunt(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_timer(Client* c, const Seperator* sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_track(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "../bot_command.h"
|
||||
#include "zone/bot_command.h"
|
||||
|
||||
void bot_command_view_combos(Client *c, const Seperator *sep)
|
||||
{
|
||||
@@ -1 +0,0 @@
|
||||
#include "../bot_command.h"
|
||||
+29
-30
@@ -16,38 +16,37 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "bot_database.h"
|
||||
|
||||
#include "../common/repositories/bot_blocked_buffs_repository.h"
|
||||
#include "../common/repositories/bot_buffs_repository.h"
|
||||
#include "../common/repositories/bot_create_combinations_repository.h"
|
||||
#include "../common/repositories/bot_data_repository.h"
|
||||
#include "../common/repositories/bot_heal_rotations_repository.h"
|
||||
#include "../common/repositories/bot_heal_rotation_members_repository.h"
|
||||
#include "../common/repositories/bot_heal_rotation_targets_repository.h"
|
||||
#include "../common/repositories/bot_inspect_messages_repository.h"
|
||||
#include "../common/repositories/bot_inventories_repository.h"
|
||||
#include "../common/repositories/bot_owner_options_repository.h"
|
||||
#include "../common/repositories/bot_pets_repository.h"
|
||||
#include "../common/repositories/bot_pet_buffs_repository.h"
|
||||
#include "../common/repositories/bot_pet_inventories_repository.h"
|
||||
#include "../common/repositories/bot_spell_casting_chances_repository.h"
|
||||
#include "../common/repositories/bot_spells_entries_repository.h"
|
||||
#include "../common/repositories/bot_settings_repository.h"
|
||||
#include "../common/repositories/bot_stances_repository.h"
|
||||
#include "../common/repositories/bot_timers_repository.h"
|
||||
#include "../common/repositories/character_data_repository.h"
|
||||
#include "../common/repositories/group_id_repository.h"
|
||||
#include "common/data_verification.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/repositories/bot_blocked_buffs_repository.h"
|
||||
#include "common/repositories/bot_buffs_repository.h"
|
||||
#include "common/repositories/bot_create_combinations_repository.h"
|
||||
#include "common/repositories/bot_data_repository.h"
|
||||
#include "common/repositories/bot_heal_rotation_members_repository.h"
|
||||
#include "common/repositories/bot_heal_rotation_targets_repository.h"
|
||||
#include "common/repositories/bot_heal_rotations_repository.h"
|
||||
#include "common/repositories/bot_inspect_messages_repository.h"
|
||||
#include "common/repositories/bot_inventories_repository.h"
|
||||
#include "common/repositories/bot_owner_options_repository.h"
|
||||
#include "common/repositories/bot_pet_buffs_repository.h"
|
||||
#include "common/repositories/bot_pet_inventories_repository.h"
|
||||
#include "common/repositories/bot_pets_repository.h"
|
||||
#include "common/repositories/bot_settings_repository.h"
|
||||
#include "common/repositories/bot_spell_casting_chances_repository.h"
|
||||
#include "common/repositories/bot_spells_entries_repository.h"
|
||||
#include "common/repositories/bot_stances_repository.h"
|
||||
#include "common/repositories/bot_timers_repository.h"
|
||||
#include "common/repositories/character_data_repository.h"
|
||||
#include "common/repositories/group_id_repository.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/strings.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
#include "zonedb.h"
|
||||
#include "bot.h"
|
||||
#include "client.h"
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include "fmt/format.h"
|
||||
|
||||
|
||||
bool BotDatabase::LoadBotCommandSettings(std::map<std::string, std::pair<uint8, std::vector<std::string>>> &bot_command_settings)
|
||||
|
||||
+2
-6
@@ -16,15 +16,13 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef BOT_DATABASE_H
|
||||
#define BOT_DATABASE_H
|
||||
|
||||
#include "zone/bot_structs.h"
|
||||
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include "bot_structs.h"
|
||||
|
||||
class Bot;
|
||||
class Client;
|
||||
@@ -220,5 +218,3 @@ public:
|
||||
std::map<int32_t, std::map<int32_t, BotSpellTypesByClass>> commanded_spell_type_min_levels;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
+8
-8
@@ -16,14 +16,14 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#include "bot.h"
|
||||
#include "bot_command.h"
|
||||
#include "client.h"
|
||||
#include "object.h"
|
||||
#include "raids.h"
|
||||
#include "doors.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "common/data_verification.h"
|
||||
#include "zone/bot_command.h"
|
||||
#include "zone/bot.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/doors.h"
|
||||
#include "zone/object.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/raids.h"
|
||||
|
||||
std::vector<RaidMember> Raid::GetRaidGroupMembers(uint32 gid)
|
||||
{
|
||||
|
||||
+15
-22
@@ -16,26 +16,19 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef BOT_RAID_H
|
||||
#define BOT_RAID_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "bot_structs.h"
|
||||
#include "mob.h"
|
||||
#include "client.h"
|
||||
#include "pets.h"
|
||||
#include "heal_rotation.h"
|
||||
#include "groups.h"
|
||||
#include "corpse.h"
|
||||
#include "zonedb.h"
|
||||
#include "../common/zone_store.h"
|
||||
#include "string_ids.h"
|
||||
#include "../common/misc_functions.h"
|
||||
#include "../common/global_define.h"
|
||||
#include "guild_mgr.h"
|
||||
#include "worldserver.h"
|
||||
#include "raids.h"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#endif // BOT_RAID_H
|
||||
#include "common/misc_functions.h"
|
||||
#include "common/zone_store.h"
|
||||
#include "zone/bot_structs.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/corpse.h"
|
||||
#include "zone/groups.h"
|
||||
#include "zone/guild_mgr.h"
|
||||
#include "zone/heal_rotation.h"
|
||||
#include "zone/mob.h"
|
||||
#include "zone/pets.h"
|
||||
#include "zone/raids.h"
|
||||
#include "zone/string_ids.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
+4
-9
@@ -16,14 +16,11 @@
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
|
||||
#ifndef BOT_STRUCTS
|
||||
#define BOT_STRUCTS
|
||||
#pragma once
|
||||
|
||||
#include "../common/types.h"
|
||||
#include "../common/timer.h"
|
||||
#include "mob.h"
|
||||
|
||||
#include <sstream>
|
||||
#include "common/types.h"
|
||||
#include "common/timer.h"
|
||||
#include "zone/mob.h"
|
||||
|
||||
struct BotsAvailableList {
|
||||
uint32 bot_id;
|
||||
@@ -186,5 +183,3 @@ struct FindPositionInput {
|
||||
bool front_only;
|
||||
bool bypass_los;
|
||||
};
|
||||
|
||||
#endif // BOT_STRUCTS
|
||||
|
||||
@@ -17,9 +17,10 @@
|
||||
*/
|
||||
|
||||
#include "bot.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/repositories/bot_spells_entries_repository.h"
|
||||
#include "../common/repositories/npc_spells_repository.h"
|
||||
|
||||
#include "common/data_verification.h"
|
||||
#include "common/repositories/bot_spells_entries_repository.h"
|
||||
#include "common/repositories/npc_spells_repository.h"
|
||||
|
||||
bool Bot::AICastSpell(Mob* tar, uint8 chance, uint16 spell_type, uint16 sub_target_type, uint16 sub_type) {
|
||||
if (!tar) {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#include "cheat_manager.h"
|
||||
#include "client.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "../common/events/player_event_logs.h"
|
||||
#include "worldserver.h"
|
||||
#include "queryserv.h"
|
||||
|
||||
#include "common/events/player_event_logs.h"
|
||||
#include "zone/client.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/queryserv.h"
|
||||
|
||||
extern WorldServer worldserver;
|
||||
extern QueryServ *QServ;
|
||||
|
||||
+9
-10
@@ -1,14 +1,15 @@
|
||||
#ifndef ANTICHEAT_H
|
||||
#define ANTICHEAT_H
|
||||
#pragma once
|
||||
|
||||
#include "common/eq_packet_structs.h"
|
||||
#include "common/eq_packet.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/timer.h"
|
||||
|
||||
#include "glm/vec3.hpp"
|
||||
|
||||
class CheatManager;
|
||||
class Client;
|
||||
|
||||
#include "../common/timer.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include <glm/ext/vector_float3.hpp>
|
||||
#include "../common/eq_packet_structs.h"
|
||||
#include "../common/eq_packet.h"
|
||||
|
||||
typedef enum {
|
||||
Collision = 1,
|
||||
TeleportB,
|
||||
@@ -85,5 +86,3 @@ private:
|
||||
Timer m_time_since_last_movement_history;
|
||||
uint32 m_warp_counter;
|
||||
};
|
||||
|
||||
#endif //ANTICHEAT_H
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
|
||||
#include "zone/zone_cli.h"
|
||||
#include "zone/sidecar_api/sidecar_api.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/platform.h"
|
||||
#include "common/data_bucket.h"
|
||||
#include "common/repositories/data_buckets_repository.h"
|
||||
|
||||
#include <chrono>
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
#include "../../common/http/httplib.h"
|
||||
#include "../../common/eqemu_logsys.h"
|
||||
#include "../sidecar_api/sidecar_api.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../common/data_bucket.h"
|
||||
#include "../zonedb.h"
|
||||
#include "../../common/repositories/data_buckets_repository.h"
|
||||
|
||||
void RunBenchmarkCycle(uint64_t target_rows)
|
||||
{
|
||||
@@ -116,7 +121,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
break;
|
||||
}
|
||||
|
||||
DataBucket::SetData(e);
|
||||
DataBucket::SetData(&database, e);
|
||||
|
||||
inserted_keys.emplace_back(e);
|
||||
}
|
||||
@@ -129,7 +134,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
auto update_start = std::chrono::high_resolution_clock::now();
|
||||
for (auto &key: inserted_keys) {
|
||||
// 🔍 Retrieve existing bucket using scoped `GetData`
|
||||
auto e = DataBucket::GetData(key);
|
||||
auto e = DataBucket::GetData(&database, key);
|
||||
if (e.id > 0) {
|
||||
// create a new key object with the updated values
|
||||
DataBucketKey bucket_entry_key{
|
||||
@@ -145,7 +150,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
};
|
||||
|
||||
// 🔄 Update using DataBucket class
|
||||
DataBucket::SetData(bucket_entry_key);
|
||||
DataBucket::SetData(&database, bucket_entry_key);
|
||||
}
|
||||
}
|
||||
auto update_end = std::chrono::high_resolution_clock::now();
|
||||
@@ -188,7 +193,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
k.instance_id = entity_choice;
|
||||
}
|
||||
|
||||
DataBucket::GetData(key);
|
||||
DataBucket::GetData(&database, key);
|
||||
}
|
||||
auto read_cached_end = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double> read_cached_time = read_cached_end - read_cached_start;
|
||||
@@ -206,7 +211,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
.character_id = 999999999, // use scoped value
|
||||
};
|
||||
|
||||
DataBucket::GetData(k);
|
||||
DataBucket::GetData(&database, k);
|
||||
}
|
||||
auto read_client_cache_miss_end = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double> read_client_cache_miss_time = read_client_cache_miss_end - read_client_cache_miss_start;
|
||||
@@ -260,7 +265,7 @@ void RunBenchmarkCycle(uint64_t target_rows)
|
||||
k.instance_id = entity_choice;
|
||||
}
|
||||
|
||||
DataBucket::DeleteData(k);
|
||||
DataBucket::DeleteData(&database, k);
|
||||
}
|
||||
auto delete_end = std::chrono::high_resolution_clock::now();
|
||||
std::chrono::duration<double> delete_time = delete_end - delete_start;
|
||||
@@ -1,7 +1,11 @@
|
||||
#include "../../common/http/httplib.h"
|
||||
#include "../../common/eqemu_logsys.h"
|
||||
#include "../sidecar_api/sidecar_api.h"
|
||||
#include "../../common/platform.h"
|
||||
|
||||
#include "zone/zone_cli.h"
|
||||
|
||||
#include "zone/sidecar_api/sidecar_api.h"
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/platform.h"
|
||||
|
||||
void ZoneCLI::SidecarServeHttp(int argc, char **argv, argh::parser &cmd, std::string &description)
|
||||
{
|
||||
@@ -1,12 +1,20 @@
|
||||
#include "../../common/http/httplib.h"
|
||||
#include "../../common/eqemu_logsys.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../zone.h"
|
||||
#include "../../client.h"
|
||||
#include "../../common/net/eqstream.h"
|
||||
|
||||
#include "zone/zone_cli.h"
|
||||
|
||||
#include "zone/client.h"
|
||||
#include "zone/zone.h"
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/net/eqstream.h"
|
||||
#include "common/platform.h"
|
||||
|
||||
extern Zone* zone;
|
||||
|
||||
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
|
||||
void RunTest(const std::string& test_name, bool expected, bool actual);
|
||||
void RunTest(const std::string& test_name, int expected, int actual);
|
||||
|
||||
void ZoneCLI::TestDataBuckets(int argc, char** argv, argh::parser& cmd, std::string& description)
|
||||
{
|
||||
if (cmd[{"-h", "--help"}]) {
|
||||
@@ -1,14 +1,22 @@
|
||||
#include "../../common/http/httplib.h"
|
||||
#include "../../common/eqemu_logsys.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../zone.h"
|
||||
#include "../../client.h"
|
||||
#include "../../common/net/eqstream.h"
|
||||
#include "../../common/json/json.hpp"
|
||||
|
||||
#include "zone/zone_cli.h"
|
||||
|
||||
#include "zone/client.h"
|
||||
#include "zone/zone.h"
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/http/httplib.h"
|
||||
#include "common/json/json.hpp"
|
||||
#include "common/net/eqstream.h"
|
||||
#include "common/platform.h"
|
||||
|
||||
extern Zone *zone;
|
||||
using json = nlohmann::json;
|
||||
|
||||
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
|
||||
void RunTest(const std::string& test_name, bool expected, bool actual);
|
||||
void RunTest(const std::string& test_name, int expected, int actual);
|
||||
|
||||
struct HandinEntry {
|
||||
std::string item_id = "0";
|
||||
uint32 count = 0;
|
||||
+13
-5
@@ -1,11 +1,19 @@
|
||||
#include "../../common/eqemu_logsys.h"
|
||||
#include "../../common/platform.h"
|
||||
#include "../../zone.h"
|
||||
#include "../../client.h"
|
||||
#include "../../common/net/eqstream.h"
|
||||
|
||||
#include "zone/zone_cli.h"
|
||||
|
||||
#include "zone/client.h"
|
||||
#include "zone/zone.h"
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/net/eqstream.h"
|
||||
#include "common/platform.h"
|
||||
|
||||
extern Zone *zone;
|
||||
|
||||
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
|
||||
void RunTest(const std::string& test_name, bool expected, bool actual);
|
||||
void RunTest(const std::string& test_name, int expected, int actual);
|
||||
|
||||
void ZoneCLI::TestNpcHandinsMultiQuest(int argc, char **argv, argh::parser &cmd, std::string &description)
|
||||
{
|
||||
if (cmd[{"-h", "--help"}]) {
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "../../zone.h"
|
||||
#include "zone/zone.h"
|
||||
|
||||
inline void RunTest(const std::string &test_name, const std::string &expected, const std::string &actual)
|
||||
void RunTest(const std::string &test_name, const std::string &expected, const std::string &actual)
|
||||
{
|
||||
if (expected == actual) {
|
||||
std::cout << "[✅] " << test_name << " PASSED\n";
|
||||
@@ -12,7 +12,7 @@ inline void RunTest(const std::string &test_name, const std::string &expected, c
|
||||
}
|
||||
}
|
||||
|
||||
inline void RunTest(const std::string &test_name, bool expected, bool actual)
|
||||
void RunTest(const std::string &test_name, bool expected, bool actual)
|
||||
{
|
||||
if (expected == actual) {
|
||||
std::cout << "[✅] " << test_name << " PASSED\n";
|
||||
@@ -25,7 +25,7 @@ inline void RunTest(const std::string &test_name, bool expected, bool actual)
|
||||
}
|
||||
}
|
||||
|
||||
inline void RunTest(const std::string &test_name, int expected, int actual)
|
||||
void RunTest(const std::string &test_name, int expected, int actual)
|
||||
{
|
||||
if (expected == actual) {
|
||||
std::cout << "[✅] " << test_name << " PASSED\n";
|
||||
@@ -40,7 +40,7 @@ inline void RunTest(const std::string &test_name, int expected, int actual)
|
||||
|
||||
extern Zone *zone;
|
||||
|
||||
inline void SetupZone(std::string zone_short_name, uint32 instance_id = 0) {
|
||||
void SetupZone(std::string zone_short_name, uint32 instance_id = 0) {
|
||||
EQEmuLogSys::Instance()->SilenceConsoleLogging();
|
||||
|
||||
EQEmuLogSys::Instance()->log_settings[Logs::ZoneState].log_to_console = std::getenv("DEBUG") ? 3 : 0;
|
||||
@@ -1,10 +1,19 @@
|
||||
extern Zone *zone;
|
||||
#include "zone/zone_cli.h"
|
||||
#include "zone/corpse.h"
|
||||
|
||||
#include <cereal/archives/json.hpp>
|
||||
#include <cereal/types/map.hpp>
|
||||
#include "../../common/repositories/npc_types_repository.h"
|
||||
#include "../../corpse.h"
|
||||
#include "../../../common/repositories/respawn_times_repository.h"
|
||||
#include "common/cli/eqemu_command_handler.h"
|
||||
#include "common/repositories/npc_types_repository.h"
|
||||
#include "common/repositories/respawn_times_repository.h"
|
||||
|
||||
#include "cereal/archives/json.hpp"
|
||||
#include "cereal/types/map.hpp"
|
||||
|
||||
extern Zone* zone;
|
||||
|
||||
void RunTest(const std::string& test_name, const std::string& expected, const std::string& actual);
|
||||
void RunTest(const std::string& test_name, bool expected, bool actual);
|
||||
void RunTest(const std::string& test_name, int expected, int actual);
|
||||
void SetupZone(std::string zone_short_name, uint32 instance_id = 0);
|
||||
|
||||
inline void ClearState()
|
||||
{
|
||||
+66
-77
@@ -15,70 +15,57 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
*/
|
||||
#include "../common/global_define.h"
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// for windows compile
|
||||
#ifndef _WINDOWS
|
||||
#include <stdarg.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include "../common/unix.h"
|
||||
#endif
|
||||
#include "client.h"
|
||||
|
||||
extern volatile bool RunLoops;
|
||||
|
||||
#include "../common/eqemu_logsys.h"
|
||||
#include "../common/features.h"
|
||||
#include "../common/spdat.h"
|
||||
#include "../common/guilds.h"
|
||||
#include "../common/rulesys.h"
|
||||
#include "../common/strings.h"
|
||||
#include "../common/data_verification.h"
|
||||
#include "../common/profanity_manager.h"
|
||||
#include "../common/data_bucket.h"
|
||||
#include "dynamic_zone.h"
|
||||
#include "expedition_request.h"
|
||||
#include "position.h"
|
||||
#include "worldserver.h"
|
||||
#include "zonedb.h"
|
||||
#include "petitions.h"
|
||||
#include "command.h"
|
||||
#include "water_map.h"
|
||||
#include "bot_command.h"
|
||||
#include "string_ids.h"
|
||||
#include "dialogue_window.h"
|
||||
|
||||
#include "guild_mgr.h"
|
||||
#include "quest_parser_collection.h"
|
||||
#include "queryserv.h"
|
||||
#include "mob_movement_manager.h"
|
||||
#include "cheat_manager.h"
|
||||
#include "lua_parser.h"
|
||||
|
||||
#include "../common/repositories/character_alternate_abilities_repository.h"
|
||||
#include "../common/repositories/character_expedition_lockouts_repository.h"
|
||||
#include "../common/repositories/account_flags_repository.h"
|
||||
#include "../common/repositories/bug_reports_repository.h"
|
||||
#include "../common/repositories/char_recipe_list_repository.h"
|
||||
#include "../common/repositories/character_spells_repository.h"
|
||||
#include "../common/repositories/character_disciplines_repository.h"
|
||||
#include "../common/repositories/character_data_repository.h"
|
||||
#include "../common/repositories/character_pet_name_repository.h"
|
||||
#include "../common/repositories/completed_tasks_repository.h"
|
||||
#include "../common/repositories/discovered_items_repository.h"
|
||||
#include "../common/repositories/inventory_repository.h"
|
||||
#include "../common/repositories/keyring_repository.h"
|
||||
#include "../common/repositories/tradeskill_recipe_repository.h"
|
||||
#include "../common/events/player_events.h"
|
||||
#include "../common/events/player_event_logs.h"
|
||||
#include "dialogue_window.h"
|
||||
#include "../common/zone_store.h"
|
||||
#include "../common/skill_caps.h"
|
||||
#include "common/data_bucket.h"
|
||||
#include "common/data_verification.h"
|
||||
#include "common/eqemu_logsys.h"
|
||||
#include "common/events/player_event_logs.h"
|
||||
#include "common/events/player_events.h"
|
||||
#include "common/features.h"
|
||||
#include "common/guilds.h"
|
||||
#include "common/profanity_manager.h"
|
||||
#include "common/repositories/account_flags_repository.h"
|
||||
#include "common/repositories/bug_reports_repository.h"
|
||||
#include "common/repositories/char_recipe_list_repository.h"
|
||||
#include "common/repositories/character_alternate_abilities_repository.h"
|
||||
#include "common/repositories/character_data_repository.h"
|
||||
#include "common/repositories/character_disciplines_repository.h"
|
||||
#include "common/repositories/character_expedition_lockouts_repository.h"
|
||||
#include "common/repositories/character_pet_name_repository.h"
|
||||
#include "common/repositories/character_spells_repository.h"
|
||||
#include "common/repositories/completed_tasks_repository.h"
|
||||
#include "common/repositories/discovered_items_repository.h"
|
||||
#include "common/repositories/inventory_repository.h"
|
||||
#include "common/repositories/keyring_repository.h"
|
||||
#include "common/repositories/tradeskill_recipe_repository.h"
|
||||
#include "common/rulesys.h"
|
||||
#include "common/skill_caps.h"
|
||||
#include "common/spdat.h"
|
||||
#include "common/strings.h"
|
||||
#include "common/zone_store.h"
|
||||
#include "zone/bot_command.h"
|
||||
#include "zone/cheat_manager.h"
|
||||
#include "zone/command.h"
|
||||
#include "zone/dialogue_window.h"
|
||||
#include "zone/dynamic_zone.h"
|
||||
#include "zone/expedition_request.h"
|
||||
#include "zone/guild_mgr.h"
|
||||
#include "zone/lua_parser.h"
|
||||
#include "zone/mob_movement_manager.h"
|
||||
#include "zone/petitions.h"
|
||||
#include "zone/position.h"
|
||||
#include "zone/queryserv.h"
|
||||
#include "zone/quest_parser_collection.h"
|
||||
#include "zone/string_ids.h"
|
||||
#include "zone/water_map.h"
|
||||
#include "zone/worldserver.h"
|
||||
#include "zone/zonedb.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
|
||||
extern QueryServ* QServ;
|
||||
extern EntityList entity_list;
|
||||
@@ -86,6 +73,7 @@ extern Zone* zone;
|
||||
extern volatile bool is_zone_loaded;
|
||||
extern WorldServer worldserver;
|
||||
extern uint32 numclients;
|
||||
extern volatile bool RunLoops;
|
||||
|
||||
void UpdateWindowTitle(char* iNewTitle);
|
||||
|
||||
@@ -4840,7 +4828,7 @@ bool Client::IsNameChangeAllowed() {
|
||||
auto k = GetScopedBucketKeys();
|
||||
k.key = "name_change_allowed";
|
||||
|
||||
auto b = DataBucket::GetData(k);
|
||||
auto b = DataBucket::GetData(&database, k);
|
||||
if (!b.value.empty()) {
|
||||
return true;
|
||||
}
|
||||
@@ -4856,7 +4844,7 @@ bool Client::ClearNameChange() {
|
||||
auto k = GetScopedBucketKeys();
|
||||
k.key = "name_change_allowed";
|
||||
|
||||
DataBucket::DeleteData(k);
|
||||
DataBucket::DeleteData(&database, k);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -4878,7 +4866,7 @@ void Client::GrantNameChange() {
|
||||
auto k = GetScopedBucketKeys();
|
||||
k.key = "name_change_allowed";
|
||||
k.value = "allowed"; // potentially put a timestamp here
|
||||
DataBucket::SetData(k);
|
||||
DataBucket::SetData(&database, k);
|
||||
|
||||
InvokeChangeNameWindow(true);
|
||||
}
|
||||
@@ -4891,7 +4879,7 @@ bool Client::IsPetNameChangeAllowed() {
|
||||
DataBucketKey k = GetScopedBucketKeys();
|
||||
k.key = "PetNameChangesAllowed";
|
||||
|
||||
auto b = DataBucket::GetData(k);
|
||||
auto b = DataBucket::GetData(&database, k);
|
||||
if (!b.value.empty()) {
|
||||
return true;
|
||||
}
|
||||
@@ -4915,7 +4903,7 @@ void Client::GrantPetNameChange() {
|
||||
DataBucketKey k = GetScopedBucketKeys();
|
||||
k.key = "PetNameChangesAllowed";
|
||||
k.value = "true";
|
||||
DataBucket::SetData(k);
|
||||
DataBucket::SetData(&database, k);
|
||||
|
||||
InvokeChangePetName(true);
|
||||
}
|
||||
@@ -4924,7 +4912,7 @@ void Client::ClearPetNameChange() {
|
||||
DataBucketKey k = GetScopedBucketKeys();
|
||||
k.key = "PetNameChangesAllowed";
|
||||
|
||||
DataBucket::DeleteData(k);
|
||||
DataBucket::DeleteData(&database, k);
|
||||
}
|
||||
|
||||
bool Client::ChangePetName(std::string new_name)
|
||||
@@ -9671,9 +9659,9 @@ void Client::SetDevToolsEnabled(bool in_dev_tools_enabled)
|
||||
const auto dev_tools_key = fmt::format("{}-dev-tools-disabled", AccountID());
|
||||
|
||||
if (in_dev_tools_enabled) {
|
||||
DataBucket::DeleteData(dev_tools_key);
|
||||
DataBucket::DeleteData(&database, dev_tools_key);
|
||||
} else {
|
||||
DataBucket::SetData(dev_tools_key, "true");
|
||||
DataBucket::SetData(&database, dev_tools_key, "true");
|
||||
}
|
||||
|
||||
Client::dev_tools_enabled = in_dev_tools_enabled;
|
||||
@@ -9846,7 +9834,7 @@ void Client::SendToGuildHall()
|
||||
uint32 expiration_time = (RuleI(Instances, GuildHallExpirationDays) * 86400);
|
||||
uint16 instance_id = 0;
|
||||
std::string guild_hall_instance_key = fmt::format("guild-hall-instance-{}", GuildID());
|
||||
std::string instance_data = DataBucket::GetData(guild_hall_instance_key);
|
||||
std::string instance_data = DataBucket::GetData(&database, guild_hall_instance_key);
|
||||
if (!instance_data.empty() && Strings::ToInt(instance_data) > 0) {
|
||||
instance_id = Strings::ToInt(instance_data);
|
||||
}
|
||||
@@ -9863,6 +9851,7 @@ void Client::SendToGuildHall()
|
||||
}
|
||||
|
||||
DataBucket::SetData(
|
||||
&database,
|
||||
guild_hall_instance_key,
|
||||
std::to_string(instance_id),
|
||||
std::to_string(expiration_time)
|
||||
@@ -10915,7 +10904,7 @@ void Client::SendToInstance(std::string instance_type, std::string zone_short_na
|
||||
instance_identifier,
|
||||
zone_short_name
|
||||
);
|
||||
std::string current_bucket_value = DataBucket::GetData(full_bucket_name);
|
||||
std::string current_bucket_value = DataBucket::GetData(&database, full_bucket_name);
|
||||
uint16 instance_id = 0;
|
||||
|
||||
if (current_bucket_value.length() > 0) {
|
||||
@@ -10931,7 +10920,7 @@ void Client::SendToInstance(std::string instance_type, std::string zone_short_na
|
||||
return;
|
||||
}
|
||||
|
||||
DataBucket::SetData(full_bucket_name, itoa(instance_id), itoa(duration));
|
||||
DataBucket::SetData(&database, full_bucket_name, itoa(instance_id), itoa(duration));
|
||||
}
|
||||
|
||||
AssignToInstance(instance_id);
|
||||
@@ -13149,7 +13138,7 @@ std::string Client::GetAccountBucket(std::string bucket_name)
|
||||
k.account_id = AccountID();
|
||||
k.key = bucket_name;
|
||||
|
||||
return DataBucket::GetData(k).value;
|
||||
return DataBucket::GetData(&database, k).value;
|
||||
}
|
||||
|
||||
void Client::SetAccountBucket(std::string bucket_name, std::string bucket_value, std::string expiration)
|
||||
@@ -13160,7 +13149,7 @@ void Client::SetAccountBucket(std::string bucket_name, std::string bucket_value,
|
||||
k.expires = expiration;
|
||||
k.value = bucket_value;
|
||||
|
||||
DataBucket::SetData(k);
|
||||
DataBucket::SetData(&database, k);
|
||||
}
|
||||
|
||||
void Client::DeleteAccountBucket(std::string bucket_name)
|
||||
@@ -13169,7 +13158,7 @@ void Client::DeleteAccountBucket(std::string bucket_name)
|
||||
k.account_id = AccountID();
|
||||
k.key = bucket_name;
|
||||
|
||||
DataBucket::DeleteData(k);
|
||||
DataBucket::DeleteData(&database, k);
|
||||
}
|
||||
|
||||
std::string Client::GetAccountBucketExpires(std::string bucket_name)
|
||||
@@ -13178,7 +13167,7 @@ std::string Client::GetAccountBucketExpires(std::string bucket_name)
|
||||
k.account_id = AccountID();
|
||||
k.key = bucket_name;
|
||||
|
||||
return DataBucket::GetDataExpires(k);
|
||||
return DataBucket::GetDataExpires(&database, k);
|
||||
}
|
||||
|
||||
std::string Client::GetAccountBucketRemaining(std::string bucket_name)
|
||||
@@ -13187,7 +13176,7 @@ std::string Client::GetAccountBucketRemaining(std::string bucket_name)
|
||||
k.account_id = AccountID();
|
||||
k.key = bucket_name;
|
||||
|
||||
return DataBucket::GetDataRemaining(k);
|
||||
return DataBucket::GetDataRemaining(&database, k);
|
||||
}
|
||||
|
||||
std::string Client::GetBandolierName(uint8 bandolier_slot)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user