From 658b6ba5703e3366350f307b5214470e4243a9bf Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sat, 3 Oct 2015 20:23:39 -0500 Subject: [PATCH 01/13] Adjustments to eqemu_update.pl menu (V11) --- common/database_conversions.cpp | 2 +- utils/scripts/eqemu_update.pl | 38 +++++++++++++++++---------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/common/database_conversions.cpp b/common/database_conversions.cpp index c3c54cde5..510d98f76 100644 --- a/common/database_conversions.cpp +++ b/common/database_conversions.cpp @@ -494,7 +494,7 @@ bool Database::CheckDatabaseConversions() { /* Check for a new version of this script, the arg passed would have to be higher than the copy they have downloaded locally and they will re fetch */ - system("perl eqemu_update.pl V 10"); + system("perl eqemu_update.pl V 11"); /* Run Automatic Database Upgrade Script */ system("perl eqemu_update.pl ran_from_world"); diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index 00d506630..eb3e49f53 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -22,7 +22,7 @@ if($Config{osname}=~/linux/i){ $OS = "Linux"; } if($Config{osname}=~/Win|MS/i){ $OS = "Windows"; } #::: If current version is less than what world is reporting, then download a new one... -$current_version = 10; +$current_version = 11; if($ARGV[0] eq "V"){ if($ARGV[1] > $current_version){ @@ -241,31 +241,33 @@ sub menu_options { $bots_management = "Install bots database pre-requisites (Requires bots server binaries)"; } else{ - $bots_management = "Check for Bot pending REQUIRED database updates..."; + $bots_management = "Check for Bot pending REQUIRED database updates... (Must have bots enabled)"; } } } else{ $option[3] = "Check and stage pending REQUIRED Database updates"; - $bots_management = "Check for Bot REQUIRED database updates..."; + $bots_management = "Check for Bot REQUIRED database updates... (Must have bots enabled)"; } return < Date: Sat, 3 Oct 2015 22:13:16 -0500 Subject: [PATCH 02/13] Fix menu links [skip ci] --- utils/scripts/eqemu_update.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index eb3e49f53..48a3f28c3 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -184,13 +184,13 @@ sub show_menu_prompt { 1 => \&database_dump, 2 => \&database_dump_compress, 3 => \&main_db_management, - 4 => \&aa_fetch, + 10 => \&aa_fetch, 5 => \&opcodes_fetch, 6 => \&map_files_fetch, 7 => \&plugins_fetch, 8 => \&quest_files_fetch, 9 => \&lua_modules_fetch, - 10 => \&bots_db_management, + 4 => \&bots_db_management, 20 => \&do_update_self, 0 => \&script_exit, ); From aaae583dabdaddd455c6ae50fb3f89b8da0f24ee Mon Sep 17 00:00:00 2001 From: Akkadius Date: Sun, 4 Oct 2015 20:48:11 -0500 Subject: [PATCH 03/13] Fix hash order [skip ci] --- utils/scripts/eqemu_update.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index 48a3f28c3..f34d5b9af 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -184,13 +184,13 @@ sub show_menu_prompt { 1 => \&database_dump, 2 => \&database_dump_compress, 3 => \&main_db_management, - 10 => \&aa_fetch, + 4 => \&bots_db_management, 5 => \&opcodes_fetch, 6 => \&map_files_fetch, 7 => \&plugins_fetch, 8 => \&quest_files_fetch, 9 => \&lua_modules_fetch, - 4 => \&bots_db_management, + 10 => \&aa_fetch, 20 => \&do_update_self, 0 => \&script_exit, ); From 2680fc1a8379d59e1466945cb699e493e566fc8d Mon Sep 17 00:00:00 2001 From: Akkadius Date: Mon, 5 Oct 2015 01:07:59 -0500 Subject: [PATCH 04/13] Preliminary routines for modular installer efforts [skip ci] --- utils/scripts/eqemu_update.pl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index f34d5b9af..2c9393162 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -66,6 +66,16 @@ while() { elsif(/(.*)<\/db>/i) { $db = $1; } } +if($ARGV[0] eq "installer"){ + print "Running EQEmu Server installer routines...\n"; + map_files_fetch_bulk(); + opcodes_fetch(); + plugins_fetch(); + quest_files_fetch(); + lua_modules_fetch(); + exit; +} + $console_output = "============================================================ EQEmu: Automatic Upgrade Check @@ -463,6 +473,28 @@ sub copy_file{ copy $l_source_file, $l_dest_file; } +sub map_files_fetch_bulk{ + print "\n --- Fetching Latest Maps... (This could take a few minutes...) --- \n"; + get_remote_file("http://github.com/Akkadius/EQEmuMaps/archive/master.zip", "maps/maps.zip", 1); + unzip('maps/maps.zip', 'maps/'); + my @files; + my $start_dir = "maps\\EQEmuMaps-master\\maps"; + find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir + ); + for my $file (@files) { + $dest_file = $file; + $dest_file =~s/maps\\EQEmuMaps-master\\maps\///g; + print "Installing :: " . $dest_file . "\n"; + copy_file($file, "maps/" . $new_file); + } + print "\n --- Fetched Latest Maps... --- \n"; + + rmtree('maps/EQEmuMaps-master'); + unlink('maps/maps.zip'); +} + sub map_files_fetch{ print "\n --- Fetching Latest Maps --- \n"; @@ -551,6 +583,8 @@ sub quest_files_fetch{ } } + rmtree('updates_staged'); + if($fc == 0){ print "\nNo Quest Updates found... \n\n"; } From ffe1bede52ebf59d75d9328790d517397772a5d1 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Tue, 6 Oct 2015 14:26:53 -0500 Subject: [PATCH 05/13] eqemu_update.pl additions for EQEmu Installer to come [skip ci] --- utils/scripts/eqemu_update.pl | 173 +++++++++++++++++++++++++--------- 1 file changed, 128 insertions(+), 45 deletions(-) diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index 2c9393162..c7c7e94b2 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -14,6 +14,7 @@ use POSIX qw(strftime); use File::Path; use File::Find; use URI::Escape; +use Time::HiRes qw(usleep); $time_stamp = strftime('%m-%d-%Y', gmtime()); @@ -49,9 +50,6 @@ no warnings; ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(); -#::: Cleanup staged folder... -rmtree("updates_staged/"); - my $confile = "eqemu_config.xml"; #default open(F, "<$confile"); my $indb = 0; @@ -66,16 +64,6 @@ while() { elsif(/(.*)<\/db>/i) { $db = $1; } } -if($ARGV[0] eq "installer"){ - print "Running EQEmu Server installer routines...\n"; - map_files_fetch_bulk(); - opcodes_fetch(); - plugins_fetch(); - quest_files_fetch(); - lua_modules_fetch(); - exit; -} - $console_output = "============================================================ EQEmu: Automatic Upgrade Check @@ -113,12 +101,40 @@ if($OS eq "Linux"){ } #::: Path not found, error and exit -if($path eq ""){ +if($path eq ""){ print "MySQL path not found, please add the path for automatic database upgrading to continue... \n\n"; print "script_exiting...\n"; exit; } +if($ARGV[0] eq "installer"){ + print "Running EQEmu Server installer routines...\n"; + mkdir('logs'); + mkdir('updates_staged'); + fetch_latest_windows_binaries(); + map_files_fetch_bulk(); + opcodes_fetch(); + plugins_fetch(); + quest_files_fetch(); + lua_modules_fetch(); + get_remote_file("https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/lua51.dll", "lua51.dll", 1); + + #::: Database Routines + print "MariaDB :: Creating Database 'peq'\n"; + print `"$path" --host $host --user $user --password="$pass" -N -B -e "DROP DATABASE peq;CREATE DATABASE peq"`; + if($OS eq "Windows"){ @db_version = split(': ', `world db_version`); } + if($OS eq "Linux"){ @db_version = split(': ', `./world db_version`); } + $bin_db_ver = trim($db_version[1]); + check_db_version_table(); + $local_db_ver = trim(get_mysql_result("SELECT version FROM db_version LIMIT 1")); + fetch_peq_db_full(); + print "\nFetching Latest Database Updates...\n"; + main_db_management(); + print "\nApplying Latest Database Updates...\n"; + main_db_management(); + exit; +} + #::: Create db_update working directory if not created mkdir('db_update'); @@ -128,15 +144,19 @@ if(trim(get_mysql_result("SHOW COLUMNS FROM db_version LIKE 'Revision'")) ne "" print "Old db_version table present, dropping...\n\n"; } -if(get_mysql_result("SHOW TABLES LIKE 'db_version'") eq "" && $db){ - print get_mysql_result(" - CREATE TABLE db_version ( - version int(11) DEFAULT '0' - ) ENGINE=InnoDB DEFAULT CHARSET=latin1; - INSERT INTO db_version (version) VALUES ('1000');"); - print "Table 'db_version' does not exists.... Creating...\n\n"; +sub check_db_version_table{ + if(get_mysql_result("SHOW TABLES LIKE 'db_version'") eq "" && $db){ + print get_mysql_result(" + CREATE TABLE db_version ( + version int(11) DEFAULT '0' + ) ENGINE=InnoDB DEFAULT CHARSET=latin1; + INSERT INTO db_version (version) VALUES ('1000');"); + print "Table 'db_version' does not exists.... Creating...\n\n"; + } } +check_db_version_table(); + if($OS eq "Windows"){ @db_version = split(': ', `world db_version`); } if($OS eq "Linux"){ @db_version = split(': ', `./world db_version`); } @@ -307,7 +327,10 @@ sub database_dump_compress { print `perl db_dumper.pl database="$db" loc="backups" compress`; } -sub script_exit{ } +sub script_exit{ + #::: Cleanup staged folder... + rmtree("updates_staged/"); +} #::: Returns Tab Delimited MySQL Result from Command Line sub get_mysql_result{ @@ -357,35 +380,48 @@ sub get_remote_file{ if($OS eq "Windows"){ #::: For non-text type requests... if($content_type == 1){ - use LWP::Simple qw(getstore); - if(!getstore($URL, $Dest_File)){ - print "Error, no connection or failed request...\n\n"; - } - else{ - print " o URL: (" . $URL . ")\n"; - print " o Saved: (" . $Dest_File . ") \n"; + $break = 0; + while($break == 0) { + use LWP::Simple qw(getstore); + if(!getstore($URL, $Dest_File)){ + # print "Error, no connection or failed request...\n\n"; + } + # sleep(1); + #::: Make sure the file exists before continuing... + if(-e $Dest_File) { + $break = 1; + print " [URL] :: " . $URL . "\n"; + print " [Saved] :: " . $Dest_File . "\n"; + } else { $break = 0; } + usleep(500); } } else{ - require LWP::UserAgent; - my $ua = LWP::UserAgent->new; - $ua->timeout(10); - $ua->env_proxy; - my $response = $ua->get($URL); - - if ($response->is_success){ - open (FILE, '> ' . $Dest_File . ''); - print FILE $response->decoded_content; - close (FILE); - print " o URL: (" . $URL . ")\n"; - print " o Saved: (" . $Dest_File . ") \n"; - } - else { - print "Error, no connection or failed request...\n\n"; + $break = 0; + while($break == 0) { + require LWP::UserAgent; + my $ua = LWP::UserAgent->new; + $ua->timeout(10); + $ua->env_proxy; + my $response = $ua->get($URL); + if ($response->is_success){ + open (FILE, '> ' . $Dest_File . ''); + print FILE $response->decoded_content; + close (FILE); + } + else { + # print "Error, no connection or failed request...\n\n"; + } + if(-e $Dest_File) { + $break = 1; + print " [URL] :: " . $URL . "\n"; + print " [Saved] :: " . $Dest_File . "\n"; + } else { $break = 0; } + usleep(500); } } } - if($OS eq "Linux"){ + if($OS eq "Linux"){ #::: wget -O db_update/db_update_manifest.txt https://raw.githubusercontent.com/EQEmu/Server/master/utils/sql/db_update_manifest.txt $wget = `wget --no-check-certificate --quiet -O $Dest_File $URL`; print " o URL: (" . $URL . ")\n"; @@ -473,6 +509,53 @@ sub copy_file{ copy $l_source_file, $l_dest_file; } +sub fetch_latest_windows_binaries{ + print "\n --- Fetching Latest Windows Binaries... --- \n"; + get_remote_file("https://raw.githubusercontent.com/Akkadius/EQEmuInstall/master/master_windows_build.zip", "updates_staged/master_windows_build.zip", 1); + print "\n --- Fetched Latest Windows Binaries... --- \n"; + print "\n --- Extracting... --- \n"; + unzip('updates_staged/master_windows_build.zip', 'updates_staged/binaries/'); + my @files; + my $start_dir = "updates_staged/binaries"; + find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir + ); + for my $file (@files) { + $dest_file = $file; + $dest_file =~s/updates_staged\/binaries\///g; + print "Installing :: " . $dest_file . "\n"; + copy_file($file, $dest_file); + } + print "\n --- Done... --- \n"; + + rmtree('updates_staged'); +} + +sub fetch_peq_db_full{ + print "Downloading latest PEQ Database... Please wait...\n"; + get_remote_file("http://edit.peqtgc.com/weekly/peq_beta.zip", "updates_staged/peq_beta.zip", 1); + print "Downloaded latest PEQ Database... Extracting...\n"; + unzip('updates_staged/peq_beta.zip', 'updates_staged/peq_db/'); + my $start_dir = "updates_staged\\peq_db"; + find( + sub { push @files, $File::Find::name unless -d; }, + $start_dir + ); + for my $file (@files) { + $dest_file = $file; + $dest_file =~s/updates_staged\\peq_db\///g; + if($file=~/peqbeta|player_tables/i){ + print "MariaDB :: Installing :: " . $dest_file . "\n"; + get_mysql_result_from_file($file); + } + if($file=~/eqtime/i){ + print "Installing eqtime.cfg\n"; + copy_file($file, "eqtime.cfg"); + } + } +} + sub map_files_fetch_bulk{ print "\n --- Fetching Latest Maps... (This could take a few minutes...) --- \n"; get_remote_file("http://github.com/Akkadius/EQEmuMaps/archive/master.zip", "maps/maps.zip", 1); From 893f7525207651d901551c1c1f78f5ae6f5cd451 Mon Sep 17 00:00:00 2001 From: Akkadius Date: Thu, 8 Oct 2015 09:41:47 -0500 Subject: [PATCH 06/13] Fix for proper script exit eqemu_update.pl [skip ci] --- utils/scripts/eqemu_update.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/scripts/eqemu_update.pl b/utils/scripts/eqemu_update.pl index c7c7e94b2..9c1556d21 100644 --- a/utils/scripts/eqemu_update.pl +++ b/utils/scripts/eqemu_update.pl @@ -330,6 +330,7 @@ sub database_dump_compress { sub script_exit{ #::: Cleanup staged folder... rmtree("updates_staged/"); + exit; } #::: Returns Tab Delimited MySQL Result from Command Line From c35eacbc99caa73dab35d580b3f29fd540fff8bd Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 8 Oct 2015 11:49:21 -0400 Subject: [PATCH 07/13] Update/Implementation of various fields in spells_new 219 not_extendable - > not_focusable - No focus are applied to these spells 217 maxtargets -> no_heal_damage_item_mod - Not applied to these spells. 232 -> no_remove -> Can not click off these spells even if beneficial 209 powerful_flag -> no_resist -> Unresistable spell --- common/ruletypesx.h | 562 +++++++++++++++++++++++++++++++++++++++++ common/shareddb.cpp | 7 +- common/spdat.h | 11 +- zone/aggro.cpp | 2 +- zone/client_packet.cpp | 2 +- zone/effects.cpp | 9 +- zone/lua_spell.cpp | 4 +- zone/mob.cpp | 6 +- zone/spell_effects.cpp | 8 +- zone/spells.cpp | 2 +- 10 files changed, 590 insertions(+), 23 deletions(-) create mode 100644 common/ruletypesx.h diff --git a/common/ruletypesx.h b/common/ruletypesx.h new file mode 100644 index 000000000..de0dbb587 --- /dev/null +++ b/common/ruletypesx.h @@ -0,0 +1,562 @@ + + + +#ifndef RULE_CATEGORY +#define RULE_CATEGORY(name) +#endif +#ifndef RULE_INT +#define RULE_INT(cat, rule, default_value) +#endif +#ifndef RULE_REAL +#define RULE_REAL(cat, rule, default_value) +#endif +#ifndef RULE_BOOL +#define RULE_BOOL(cat, rule, default_value) +#endif +#ifndef RULE_CATEGORY_END +#define RULE_CATEGORY_END() +#endif + + + + +RULE_CATEGORY( Character ) +RULE_INT ( Character, MaxLevel, 65 ) +RULE_BOOL ( Character, PerCharacterQglobalMaxLevel, false) // This will check for qglobal 'CharMaxLevel' character qglobal (Type 5), if player tries to level beyond that point, it will not go beyond that level +RULE_INT ( Character, MaxExpLevel, 0 ) //Sets the Max Level attainable via Experience +RULE_INT ( Character, DeathExpLossLevel, 10 ) // Any level greater than this will lose exp on death +RULE_INT ( Character, DeathExpLossMaxLevel, 255 ) // Any level greater than this will no longer lose exp on death +RULE_INT ( Character, DeathItemLossLevel, 10 ) +RULE_INT ( Character, DeathExpLossMultiplier, 3) //Adjust how much exp is lost +RULE_BOOL( Character, UseDeathExpLossMult, false ) //Adjust to use the above multiplier or to use code default. +RULE_INT ( Character, CorpseDecayTimeMS, 10800000 ) +RULE_INT ( Character, CorpseResTimeMS, 10800000 ) // time before cant res corpse(3 hours) +RULE_BOOL( Character, LeaveCorpses, true ) +RULE_BOOL( Character, LeaveNakedCorpses, false ) +RULE_INT ( Character, MaxDraggedCorpses, 2 ) +RULE_REAL( Character, DragCorpseDistance, 400) // If the corpse is <= this distance from the player, it won't move +RULE_REAL( Character, ExpMultiplier, 0.5 ) +RULE_REAL( Character, AAExpMultiplier, 0.5 ) +RULE_REAL( Character, GroupExpMultiplier, 0.5 ) +RULE_REAL( Character, RaidExpMultiplier, 0.2 ) +RULE_BOOL( Character, UseXPConScaling, true ) +RULE_INT ( Character, LightBlueModifier, 40 ) +RULE_INT ( Character, BlueModifier, 90 ) +RULE_INT ( Character, WhiteModifier, 100 ) +RULE_INT ( Character, YellowModifier, 125 ) +RULE_INT ( Character, RedModifier, 150 ) +RULE_INT ( Character, AutosaveIntervalS, 300 ) //0=disabled +RULE_INT ( Character, HPRegenMultiplier, 100) +RULE_INT ( Character, ManaRegenMultiplier, 100) +RULE_INT ( Character, EnduranceRegenMultiplier, 100) +RULE_INT ( Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow +RULE_BOOL( Character, HealOnLevel, false) +RULE_BOOL( Character, FeignKillsPet, false) +RULE_INT ( Character, ItemManaRegenCap, 15) +RULE_INT ( Character, ItemHealthRegenCap, 35) +RULE_INT ( Character, ItemDamageShieldCap, 30) +RULE_INT ( Character, ItemAccuracyCap, 150) +RULE_INT ( Character, ItemAvoidanceCap, 100) +RULE_INT ( Character, ItemCombatEffectsCap, 100) +RULE_INT ( Character, ItemShieldingCap, 35) +RULE_INT ( Character, ItemSpellShieldingCap, 35) +RULE_INT ( Character, ItemDoTShieldingCap, 35) +RULE_INT ( Character, ItemStunResistCap, 35) +RULE_INT ( Character, ItemStrikethroughCap, 35) +RULE_INT ( Character, ItemATKCap, 250) +RULE_INT ( Character, ItemHealAmtCap, 250) +RULE_INT ( Character, ItemSpellDmgCap, 250) +RULE_INT ( Character, ItemClairvoyanceCap, 250) +RULE_INT ( Character, ItemDSMitigationCap, 50) +RULE_INT ( Character, ItemEnduranceRegenCap, 15) +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(overhaste) haste. +RULE_INT ( Character, SkillUpModifier, 100) //skill ups are at 100% +RULE_BOOL ( Character, SharedBankPlat, false) //off by default to prevent duping for now +RULE_BOOL ( Character, BindAnywhere, false) +RULE_INT ( Character, RestRegenPercent, 0) // Set to >0 to enable rest state bonus HP and mana regen. +RULE_INT ( Character, RestRegenTimeToActivate, 30) // Time in seconds for rest state regen to kick in. +RULE_BOOL ( Character, RestRegenEndurance, false) // Whether rest regen will work for endurance or not. +RULE_INT ( Character, KillsPerGroupLeadershipAA, 250) // Number of dark blues or above per Group Leadership AA +RULE_INT ( Character, KillsPerRaidLeadershipAA, 250) // Number of dark blues or above per Raid Leadership AA +RULE_INT ( Character, MaxFearDurationForPlayerCharacter, 4) //4 tics, each tic calculates every 6 seconds. +RULE_INT ( Character, MaxCharmDurationForPlayerCharacter, 15) +RULE_INT ( Character, BaseHPRegenBonusRaces, 4352) //a bitmask of race(s) that receive the regen bonus. Iksar (4096) & Troll (256) = 4352. see common/races.h for the bitmask values +RULE_BOOL ( Character, SoDClientUseSoDHPManaEnd, false) // Setting this to true will allow SoD clients to use the SoD HP/Mana/End formulas and previous clients will use the old formulas +RULE_BOOL ( Character, UseRaceClassExpBonuses, true) // Setting this to true will enable Class and Racial experience rate bonuses +RULE_BOOL ( Character, RespawnFromHover, false) // Use Respawn window, or not. +RULE_INT ( Character, RespawnFromHoverTimer, 300) // Respawn Window countdown timer, in SECONDS +RULE_BOOL ( Character, UseNewStatsWindow, true) // New stats window shows everything +RULE_BOOL ( Character, ItemCastsUseFocus, false) // If true, this allows item clickies to use focuses that have limited max levels on them +RULE_INT ( Character, MinStatusForNoDropExemptions, 80) // This allows status x and higher to trade no drop items. +RULE_INT ( Character, SkillCapMaxLevel, 75 ) // Sets the Max Level used for Skill Caps (from skill_caps table). -1 makes it use MaxLevel rule value. It is set to 75 because PEQ only has skillcaps up to that level, and grabbing the players' skill past 75 will return 0, breaking all skills past that level. This helps servers with obsurd level caps (75+ level cap) function without any modifications. +RULE_INT ( Character, StatCap, 0 ) +RULE_BOOL ( Character, CheckCursorEmptyWhenLooting, true ) // If true, a player cannot loot a corpse (player or NPC) with an item on their cursor +RULE_BOOL ( Character, MaintainIntoxicationAcrossZones, true ) // If true, alcohol effects are maintained across zoning and logging out/in. +RULE_BOOL ( Character, EnableDiscoveredItems, true ) // If enabled, it enables EVENT_DISCOVER_ITEM and also saves character names and timestamps for the first time an item is discovered. +RULE_BOOL ( Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients. +RULE_BOOL ( Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap +RULE_INT ( Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update +RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well. +RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225. +RULE_CATEGORY_END() + +RULE_CATEGORY( Mercs ) +RULE_INT (Mercs, SuspendIntervalMS, 10000) +RULE_INT (Mercs, UpkeepIntervalMS, 180000) +RULE_INT (Mercs, SuspendIntervalS, 10) +RULE_INT (Mercs, UpkeepIntervalS, 180) +RULE_BOOL (Mercs, AllowMercs, false) +RULE_BOOL (Mercs, ChargeMercPurchaseCost, false) +RULE_BOOL (Mercs, ChargeMercUpkeepCost, false) +RULE_INT (Mercs, AggroRadius, 100) // Determines the distance from which a merc will aggro group member's target(also used to determine the distance at which a healer merc will begin healing a group member) +RULE_INT (Mercs, AggroRadiusPuller, 25) // Determines the distance from which a merc will aggro group member's target, if they have the group role of puller (also used to determine the distance at which a healer merc will begin healing a group member, if they have the group role of puller) +RULE_INT (Mercs, ResurrectRadius, 50) // Determines the distance from which a healer merc will attempt to resurrect a group member's corpse +RULE_INT (Mercs, ScaleRate, 100) +RULE_CATEGORY_END() + +RULE_CATEGORY( Guild ) +RULE_INT ( Guild, MaxMembers, 2048 ) +RULE_BOOL ( Guild, PlayerCreationAllowed, false) // Allow players to create a guild using the window in Underfoot+ +RULE_INT ( Guild, PlayerCreationLimit, 1) // Only allow use of the UF+ window if the account has < than this number of guild leaders on it +RULE_INT ( Guild, PlayerCreationRequiredStatus, 0) // Required admin status. +RULE_INT ( Guild, PlayerCreationRequiredLevel, 0) // Required Level of the player attempting to create the guild. +RULE_INT ( Guild, PlayerCreationRequiredTime, 0) // Required Time Entitled On Account (in Minutes) to create the guild. + +RULE_CATEGORY_END() + +RULE_CATEGORY( Skills ) +RULE_INT ( Skills, MaxTrainTradeskills, 21 ) +RULE_BOOL ( Skills, UseLimitTradeskillSearchSkillDiff, true ) +RULE_INT ( Skills, MaxTradeskillSearchSkillDiff, 50 ) +RULE_INT ( Skills, MaxTrainSpecializations, 50 ) // Max level a GM trainer will train casting specializations +RULE_CATEGORY_END() + +RULE_CATEGORY( Pets ) +RULE_REAL( Pets, AttackCommandRange, 150 ) +RULE_BOOL( Pets, UnTargetableSwarmPet, false ) +RULE_BOOL( Pets, SwarmPetNotTargetableWithHotKey, false ) //On SOF+ clients this a semi-hack to make swarm pets not F8 targetable. +RULE_CATEGORY_END() + +RULE_CATEGORY( GM ) +RULE_INT ( GM, MinStatusToSummonItem, 250) +RULE_INT ( GM, MinStatusToZoneAnywhere, 250 ) +RULE_CATEGORY_END() + +RULE_CATEGORY( World ) +RULE_INT ( World, ZoneAutobootTimeoutMS, 60000 ) +RULE_INT ( World, ClientKeepaliveTimeoutMS, 65000 ) +RULE_BOOL ( World, UseBannedIPsTable, false ) // Toggle whether or not to check incoming client connections against the Banned_IPs table. Set this value to false to disable this feature. +RULE_BOOL ( World, EnableTutorialButton, true) +RULE_BOOL ( World, EnableReturnHomeButton, true) +RULE_INT ( World, MaxLevelForTutorial, 10) +RULE_INT ( World, TutorialZoneID, 189) +RULE_INT ( World, GuildBankZoneID, 345) +RULE_INT ( World, MinOfflineTimeToReturnHome, 21600) // 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, ExemptMaxClientsStatus, -1 ) // Exempt accounts from the MaxClientsPerIP and AddMaxClientsStatus rules, if their status is >= this value. Default value: -1 (feature disabled) +RULE_INT ( World, AddMaxClientsPerIP, -1 ) // Maximum number of clients allowed to connect per IP address if account status is < ExemptMaxClientsStatus. Default value: -1 (feature disabled) +RULE_INT ( World, AddMaxClientsStatus, -1 ) // Accounts with status >= this rule will be allowed to use the amount of accounts defined in the AddMaxClientsPerIP. Default value: -1 (feature disabled) +RULE_BOOL ( World, MaxClientsSetByStatus, false) // If True, IP Limiting will be set to the status on the account as long as the status is > MaxClientsPerIP +RULE_BOOL ( World, ClearTempMerchantlist, true) // Clears temp merchant items when world boots. +RULE_BOOL ( World, DeleteStaleCorpeBackups, true) // Deletes stale corpse backups older than 2 weeks. +RULE_INT ( World, AccountSessionLimit, -1 ) //Max number of characters allowed on at once from a single account (-1 is disabled) +RULE_INT ( World, ExemptAccountLimitStatus, -1 ) //Min status required to be exempt from multi-session per account limiting (-1 is disabled) +RULE_BOOL ( World, GMAccountIPList, false) // Check ip list against GM Accounts, AntiHack GM Accounts. +RULE_INT ( World, MinGMAntiHackStatus, 1 ) //Minimum GM status to check against AntiHack list +RULE_INT ( World, SoFStartZoneID, -1 ) //Sets the Starting Zone for SoF Clients separate from Titanium Clients (-1 is disabled) +RULE_INT ( World, ExpansionSettings, 16383) // Sets the expansion settings for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS. +RULE_INT ( World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Rallos Zek RuleSet, 2 = Tallon/Vallon Zek Ruleset, 4 = Sullon Zek Ruleset, 6 = Discord Ruleset, anything above 6 is the Discord Ruleset without the no-drop restrictions removed. TODO: Edit IsAttackAllowed in Zone to accomodate for these rules. +RULE_BOOL (World, IsGMPetitionWindowEnabled, false) +RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items. +RULE_BOOL (World, IPLimitDisconnectAll, false) +RULE_CATEGORY_END() + +RULE_CATEGORY( Zone ) +RULE_INT ( Zone, NPCPositonUpdateTicCount, 32 ) //ms between intervals of sending a position update to the entire zone. +RULE_INT ( Zone, ClientLinkdeadMS, 180000) //the time a client remains link dead on the server after a sudden disconnection +RULE_INT ( Zone, GraveyardTimeMS, 1200000) //ms time until a player corpse is moved to a zone's graveyard, if one is specified for the zone +RULE_BOOL ( Zone, EnableShadowrest, 1 ) // enables or disables the shadowrest zone feature for player corpses. Default is turned on. +RULE_BOOL ( Zone, UsePlayerCorpseBackups, true) // Keeps backups of player corpses. +RULE_INT ( Zone, MQWarpExemptStatus, -1 ) // Required status level to exempt the MQWarpDetector. Set to -1 to disable this feature. +RULE_INT ( Zone, MQZoneExemptStatus, -1 ) // Required status level to exempt the MQZoneDetector. Set to -1 to disable this feature. +RULE_INT ( Zone, MQGateExemptStatus, -1 ) // Required status level to exempt the MQGateDetector. Set to -1 to disable this feature. +RULE_INT ( Zone, MQGhostExemptStatus, -1 ) // Required status level to exempt the MGhostDetector. Set to -1 to disable this feature. +RULE_BOOL ( Zone, EnableMQWarpDetector, true ) // Enable the MQWarp Detector. Set to False to disable this feature. +RULE_BOOL ( Zone, EnableMQZoneDetector, true ) // Enable the MQZone Detector. Set to False to disable this feature. +RULE_BOOL ( Zone, EnableMQGateDetector, true ) // Enable the MQGate Detector. Set to False to disable this feature. +RULE_BOOL ( Zone, EnableMQGhostDetector, true ) // Enable the MQGhost Detector. Set to False to disable this feature. +RULE_REAL ( Zone, MQWarpDetectionDistanceFactor, 9.0) //clients move at 4.4 about if in a straight line but with movement and to acct for lag we raise it a bit +RULE_BOOL ( Zone, MarkMQWarpLT, false ) +RULE_INT ( Zone, AutoShutdownDelay, 5000 ) //How long a dynamic zone stays loaded while empty +RULE_INT ( Zone, PEQZoneReuseTime, 900 ) //How long, in seconds, until you can reuse the #peqzone command. +RULE_INT ( Zone, PEQZoneDebuff1, 4454 ) //First debuff casted by #peqzone Default is Cursed Keeper's Blight. +RULE_INT ( Zone, PEQZoneDebuff2, 2209 ) //Second debuff casted by #peqzone Default is Tendrils of Apathy. +RULE_BOOL ( Zone, UsePEQZoneDebuffs, true ) //Will determine if #peqzone will debuff players or not when used. +RULE_REAL ( Zone, HotZoneBonus, 0.75 ) +RULE_INT ( Zone, ReservedInstances, 30 ) //Will reserve this many instance ids for globals... probably not a good idea to change this while a server is running. +RULE_INT ( Zone, EbonCrystalItemID, 40902) +RULE_INT ( Zone, RadiantCrystalItemID, 40903) +RULE_BOOL ( Zone, LevelBasedEXPMods, false) // Allows you to use the level_exp_mods table in consideration to your players EXP hits +RULE_INT ( Zone, WeatherTimer, 600) // Weather timer when no duration is available +RULE_CATEGORY_END() + +RULE_CATEGORY( Map ) +//enable these to help prevent mob hopping when they are pathing +RULE_BOOL ( Map, FixPathingZWhenLoading, true ) //increases zone boot times a bit to reduce hopping. +RULE_BOOL ( Map, FixPathingZAtWaypoints, false ) //alternative to `WhenLoading`, accomplishes the same thing but does it at each waypoint instead of once at boot time. +RULE_BOOL ( Map, FixPathingZWhenMoving, false ) //very CPU intensive, but helps hopping with widely spaced waypoints. +RULE_BOOL ( Map, FixPathingZOnSendTo, false ) //try to repair Z coords in the SendTo routine as well. +RULE_REAL ( Map, FixPathingZMaxDeltaMoving, 20 ) //at runtime while pathing: max change in Z to allow the BestZ code to apply. +RULE_REAL ( Map, FixPathingZMaxDeltaWaypoint, 20 ) //at runtime at each waypoint: max change in Z to allow the BestZ code to apply. +RULE_REAL ( Map, FixPathingZMaxDeltaSendTo, 20 ) //at runtime in SendTo: max change in Z to allow the BestZ code to apply. +RULE_REAL ( Map, FixPathingZMaxDeltaLoading, 45 ) //while loading each waypoint: max change in Z to allow the BestZ code to apply. +RULE_BOOL ( Map, UseClosestZ, false) // Move mobs to the nearest Z above or below, rather than just the nearest below. + // Only set UseClosestZ true if all your .map files generated from EQGs were created + // with azone2. + // +RULE_INT ( Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position +RULE_CATEGORY_END() + +RULE_CATEGORY( Pathing ) +// Some of these rules may benefit by being made into columns in the zone table, +// for instance, in dungeons, the min LOS distances could be substantially lowered. +RULE_BOOL ( Pathing, Aggro, true ) // Enable pathing for aggroed mobs. +RULE_BOOL ( Pathing, AggroReturnToGrid, true ) // Enable pathing for aggroed roaming mobs returning to their previous waypoint. +RULE_BOOL ( Pathing, Guard, true ) // Enable pathing for mobs moving to their guard point. +RULE_BOOL ( Pathing, Find, true ) // Enable pathing for FindPerson requests from the client. +RULE_BOOL ( Pathing, Fear, true ) // Enable pathing for fear +RULE_REAL ( Pathing, ZDiffThreshold, 10) // If a mob las LOS to it's target, it will run to it if the Z difference is < this. +RULE_INT ( Pathing, LOSCheckFrequency, 1000) // A mob will check for LOS to it's target this often (milliseconds). +RULE_INT ( Pathing, RouteUpdateFrequencyShort, 1000) // How often a new route will be calculated if the target has moved. +RULE_INT ( Pathing, RouteUpdateFrequencyLong, 5000) // How often a new route will be calculated if the target has moved. +// When a path has a path node route and it's target changes position, if it has RouteUpdateFrequencyNodeCount or less nodes to go on it's +// current path, it will recalculate it's path based on the RouteUpdateFrequencyShort timer, otherwise it will use the +// RouteUpdateFrequencyLong timer. +RULE_INT ( Pathing, RouteUpdateFrequencyNodeCount, 5) +RULE_REAL ( Pathing, MinDistanceForLOSCheckShort, 40000) // (NoRoot). While following a path, only check for LOS to target within this distance. +RULE_REAL ( Pathing, MinDistanceForLOSCheckLong, 1000000) // (NoRoot). Min distance when initially attempting to acquire the target. +RULE_INT ( Pathing, MinNodesLeftForLOSCheck, 4) // Only check for LOS when we are down to this many path nodes left to run. +// This next rule was put in for situations where the mob and it's target may be on different sides of a 'hazard', e.g. a pit +// If the mob has LOS to it's target, even though there is a hazard in it's way, it may break off from the node path and run at +// the target, only to later detect the hazard and re-acquire a node path. Depending upon the placement of the path nodes, this +// can lead to the mob looping. The rule is intended to allow the mob to at least get closer to it's target each time before +// checking LOS and trying to head straight for it. +RULE_INT ( Pathing, MinNodesTraversedForLOSCheck, 3) // Only check for LOS after we have traversed this many path nodes. +RULE_INT ( Pathing, CullNodesFromStart, 1) // Checks LOS from Start point to second node for this many nodes and removes first node if there is LOS +RULE_INT ( Pathing, CullNodesFromEnd, 1) // Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS +RULE_REAL ( Pathing, CandidateNodeRangeXY, 400) // When searching for path start/end nodes, only nodes within this range will be considered. +RULE_REAL ( Pathing, CandidateNodeRangeZ, 10) // When searching for path start/end nodes, only nodes within this range will be considered. + +RULE_CATEGORY_END() + +RULE_CATEGORY( Watermap ) +// enable these to use the water detection code. Requires Water Maps generated by awater utility +RULE_BOOL ( Watermap, CheckWaypointsInWaterWhenLoading, false ) // Does not apply BestZ as waypoints are loaded if they are in water +RULE_BOOL ( Watermap, CheckForWaterAtWaypoints, false) // Check if a mob has moved into/out of water when at waypoints and sets flymode +RULE_BOOL ( Watermap, CheckForWaterWhenMoving, false) // Checks if a mob has moved into/out of water each time it's loc is recalculated +RULE_BOOL ( Watermap, CheckForWaterOnSendTo, false) // Checks if a mob has moved into/out of water on SendTo +RULE_BOOL ( Watermap, CheckForWaterWhenFishing, false) // Only lets a player fish near water (if a water map exists for the zone) +RULE_REAL ( Watermap, FishingRodLength, 30) // How far in front of player water must be for fishing to work +RULE_REAL ( Watermap, FishingLineLength, 40) // If water is more than this far below the player, it is considered too far to fish +RULE_CATEGORY_END() + +RULE_CATEGORY( Spells ) +RULE_INT ( Spells, AutoResistDiff, 15) +RULE_REAL ( Spells, ResistChance, 2.0) //chance to resist given no resists and same level +RULE_REAL ( Spells, ResistMod, 0.40) //multiplier, chance to resist = this * ResistAmount +RULE_REAL ( Spells, PartialHitChance, 0.7) //The chance when a spell is resisted that it will partial hit. +RULE_REAL ( Spells, PartialHitChanceFear, 0.25) //The chance when a fear spell is resisted that it will partial hit. +RULE_INT ( Spells, BaseCritChance, 0) //base % chance that everyone has to crit a spell +RULE_INT ( Spells, BaseCritRatio, 100) //base % bonus to damage on a successful spell crit. 100 = 2x damage +RULE_INT ( Spells, WizCritLevel, 12) //level wizards first get spell crits +RULE_INT ( Spells, WizCritChance, 7) //wiz's crit chance, on top of BaseCritChance +RULE_INT ( Spells, WizCritRatio, 0) //wiz's crit bonus, on top of BaseCritRatio (should be 0 for Live-like) +RULE_INT ( Spells, ResistPerLevelDiff, 85) //8.5 resist per level difference. +RULE_INT ( Spells, TranslocateTimeLimit, 0) // If not zero, time in seconds to accept a Translocate. +RULE_INT ( Spells, SacrificeMinLevel, 46) //first level Sacrifice will work on +RULE_INT ( Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on +RULE_INT ( Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE) +RULE_BOOL ( Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells +RULE_INT ( Spells, MaxBuffSlotsNPC, 25) +RULE_INT ( Spells, MaxSongSlotsNPC, 10) +RULE_INT ( Spells, MaxDiscSlotsNPC, 1) +RULE_INT ( Spells, MaxTotalSlotsNPC, 36) +RULE_INT ( Spells, MaxTotalSlotsPET, 25) // do not set this higher than 25 until the player profile is removed from the blob +RULE_BOOL (Spells, EnableBlockedBuffs, true) +RULE_INT ( Spells, ReflectType, 1) //0 = disabled, 1 = single target player spells only, 2 = all player spells, 3 = all single target spells, 4 = all spells +RULE_INT ( Spells, VirusSpreadDistance, 30) // The distance a viral spell will jump to its next victim +RULE_BOOL( Spells, LiveLikeFocusEffects, true) // Determines whether specific healing, dmg and mana reduction focuses are randomized +RULE_INT ( Spells, BaseImmunityLevel, 55) // The level that targets start to be immune to stun, fear and mez spells with a max level of 0. +RULE_BOOL ( Spells, NPCIgnoreBaseImmunity, true) // Whether or not NPCs get to ignore the BaseImmunityLevel for their spells. +RULE_REAL ( Spells, AvgSpellProcsPerMinute, 6.0) //Adjust rate for sympathetic spell procs +RULE_INT ( Spells, ResistFalloff, 67) //Max that level that will adjust our resist chance based on level modifiers +RULE_INT ( Spells, CharismaEffectiveness, 10) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod. +RULE_INT ( Spells, CharismaEffectivenessCap, 255) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod. +RULE_BOOL ( Spells, CharismaCharmDuration, false) // Allow CHA resist mod to extend charm duration. +RULE_INT ( Spells, CharmBreakCheckChance, 25) //Determines chance for a charm break check to occur each buff tick. +RULE_INT ( Spells, MaxCastTimeReduction, 50) //Max percent your spell cast time can be reduced by spell haste +RULE_INT ( Spells, RootBreakFromSpells, 55) //Chance for root to break when cast on. +RULE_INT ( Spells, DeathSaveCharismaMod, 3) //Determines how much charisma effects chance of death save firing. +RULE_INT ( Spells, DivineInterventionHeal, 8000) //Divine intervention heal amount. +RULE_BOOL ( Spells, AdditiveBonusValues, false) //Allow certain bonuses to be calculated by adding together the value from each item, instead of taking the highest value. (ie Add together all Cleave Effects) +RULE_BOOL ( Spells, UseCHAScribeHack, false) //ScribeSpells and TrainDiscs quest functions will ignore entries where field 12 is CHA. What's the best way to do this? +RULE_BOOL ( Spells, BuffLevelRestrictions, true) //Buffs will not land on low level toons like live +RULE_INT ( Spells, RootBreakCheckChance, 70) //Determines chance for a root break check to occur each buff tick. +RULE_INT ( Spells, FearBreakCheckChance, 70) //Determines chance for a fear break check to occur each buff tick. +RULE_INT ( Spells, SuccorFailChance, 2) //Determines chance for a succor spell not to teleport an invidual player +RULE_INT ( Spells, FRProjectileItem_Titanium, 1113) // Item id for Titanium clients for Fire 'spell projectile'. +RULE_INT ( Spells, FRProjectileItem_SOF, 80684) // Item id for SOF clients for Fire 'spell projectile'. +RULE_INT ( Spells, FRProjectileItem_NPC, 80684) // Item id for NPC Fire 'spell projectile'. +RULE_BOOL ( Spells, UseLiveSpellProjectileGFX, false) // Use spell projectile graphics set in the spells_new table (player_1). Server must be using UF+ spell file. +RULE_BOOL ( Spells, FocusCombatProcs, false) //Allow all combat procs to receive focus effects. +RULE_CATEGORY_END() + +RULE_CATEGORY( Combat ) +RULE_INT ( Combat, MeleeBaseCritChance, 0 ) //The base crit chance for non warriors, NOTE: This will apply to NPCs as well +RULE_INT ( Combat, WarBerBaseCritChance, 3 ) //The base crit chance for warriors and berserkers, only applies to clients +RULE_INT ( Combat, BerserkBaseCritChance, 6 ) //The bonus base crit chance you get when you're berserk +RULE_INT ( Combat, NPCBashKickLevel, 6 ) //The level that npcs can KICK/BASH +RULE_INT ( Combat, NPCBashKickStunChance, 15 ) //Percent chance that a bash/kick will stun +RULE_INT ( Combat, RogueCritThrowingChance, 25) //Rogue throwing crit bonus +RULE_INT ( Combat, RogueDeadlyStrikeChance, 80) //Rogue chance throwing from behind crit becomes a deadly strike +RULE_INT ( Combat, RogueDeadlyStrikeMod, 2) //Deadly strike modifier to crit damage +RULE_INT ( Combat, ClientBaseCritChance, 0 ) //The base crit chance for all clients, this will stack with warrior's/zerker's crit chance. +RULE_BOOL ( Combat, UseIntervalAC, true) +RULE_INT ( Combat, PetAttackMagicLevel, 30) +RULE_BOOL ( Combat, EnableFearPathing, true) +RULE_REAL ( Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker. +RULE_INT ( Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee. +RULE_BOOL ( Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it. +RULE_BOOL ( Combat, AdjustProcPerMinute, true) +RULE_REAL ( Combat, AvgProcsPerMinute, 2.0) +RULE_REAL ( Combat, ProcPerMinDexContrib, 0.075) +RULE_REAL ( Combat, BaseProcChance, 0.035) +RULE_REAL ( Combat, ProcDexDivideBy, 11000) +RULE_REAL ( Combat, BaseHitChance, 69.0) +RULE_REAL ( Combat, NPCBonusHitChance, 26.0) +RULE_REAL ( Combat, HitFalloffMinor, 5.0) //hit will fall off up to 5% over the initial level range +RULE_REAL ( Combat, HitFalloffModerate, 7.0) //hit will fall off up to 7% over the three levels after the initial level range +RULE_REAL ( Combat, HitFalloffMajor, 50.0) //hit will fall off sharply if we're outside the minor and moderate range +RULE_REAL ( Combat, HitBonusPerLevel, 1.2) //You gain this % of hit for every level you are above your target +RULE_REAL ( Combat, WeaponSkillFalloff, 0.33) //For every weapon skill point that's not maxed you lose this % of hit +RULE_REAL ( Combat, ArcheryHitPenalty, 0.25) //Archery has a hit penalty to try to help balance it with the plethora of long term +hit modifiers for it +RULE_REAL ( Combat, AgiHitFactor, 0.01) +RULE_INT ( Combat, MinRangedAttackDist, 25) //Minimum Distance to use Ranged Attacks +RULE_BOOL ( Combat, ArcheryBonusRequiresStationary, true) //does the 2x archery bonus chance require a stationary npc +RULE_REAL ( Combat, ArcheryBaseDamageBonus, 1) // % Modifier to Base Archery Damage (.5 = 50% base damage, 1 = 100%, 2 = 200%) +RULE_REAL ( Combat, ArcheryNPCMultiplier, 1.0) // this is multiplied by the regular dmg to get the archery dmg +RULE_BOOL ( Combat, AssistNoTargetSelf, true) //when assisting a target that does not have a target: true = target self, false = leave target as was before assist (false = live like) +RULE_INT ( Combat, MaxRampageTargets, 3) //max number of people hit with rampage +RULE_INT ( Combat, DefaultRampageTargets, 1) // default number of people to hit with rampage +RULE_BOOL ( Combat, RampageHitsTarget, false) // rampage will hit the target if it still has targets left +RULE_INT ( Combat, MaxFlurryHits, 2) //max number of extra hits from flurry +RULE_INT ( Combat, MonkDamageTableBonus, 5) //% bonus monks get to their damage table calcs +RULE_INT ( Combat, FlyingKickBonus, 25) //% Modifier that this skill gets to str and skill bonuses +RULE_INT ( Combat, DragonPunchBonus, 20) //% Modifier that this skill gets to str and skill bonuses +RULE_INT ( Combat, EagleStrikeBonus, 15) //% Modifier that this skill gets to str and skill bonuses +RULE_INT ( Combat, TigerClawBonus, 10) //% Modifier that this skill gets to str and skill bonuses +RULE_INT ( Combat, RoundKickBonus, 5) //% Modifier that this skill gets to str and skill bonuses +RULE_INT ( Combat, FrenzyBonus, 0) //% Modifier to damage +RULE_BOOL ( Combat, ProcTargetOnly, true) //true = procs will only affect our target, false = procs will affect all of our targets +RULE_REAL ( Combat, NPCACFactor, 2.25) +RULE_INT ( Combat, ClothACSoftcap, 75) +RULE_INT ( Combat, LeatherACSoftcap, 100) +RULE_INT ( Combat, MonkACSoftcap, 120) +RULE_INT ( Combat, ChainACSoftcap, 200) +RULE_INT ( Combat, PlateACSoftcap, 300) +RULE_REAL ( Combat, AAMitigationACFactor, 3.0) +RULE_REAL ( Combat, WarriorACSoftcapReturn, 0.45) +RULE_REAL ( Combat, KnightACSoftcapReturn, 0.33) +RULE_REAL ( Combat, LowPlateChainACSoftcapReturn, 0.23) +RULE_REAL ( Combat, LowChainLeatherACSoftcapReturn, 0.17) +RULE_REAL ( Combat, CasterACSoftcapReturn, 0.06) +RULE_REAL ( Combat, MiscACSoftcapReturn, 0.3) +RULE_BOOL ( Combat, OldACSoftcapRules, false) // use old softcaps +RULE_BOOL ( Combat, UseOldDamageIntervalRules, false) // use old damage formulas for everything +RULE_REAL ( Combat, WarACSoftcapReturn, 0.3448) // new AC returns +RULE_REAL ( Combat, ClrRngMnkBrdACSoftcapReturn, 0.3030) +RULE_REAL ( Combat, PalShdACSoftcapReturn, 0.3226) +RULE_REAL ( Combat, DruNecWizEncMagACSoftcapReturn, 0.2000) +RULE_REAL ( Combat, RogShmBstBerACSoftcapReturn, 0.2500) +RULE_REAL ( Combat, SoftcapFactor, 1.88) +RULE_REAL ( Combat, ACthac0Factor, 0.55) +RULE_REAL ( Combat, ACthac20Factor, 0.55) +RULE_INT ( Combat, HitCapPre20, 40) // live has it capped at 40 for whatever dumb reason... this is mainly for custom servers +RULE_INT ( Combat, HitCapPre10, 20) // live has it capped at 20, see above :p +RULE_INT ( Combat, MinHastedDelay, 400) // how fast we can get with haste. +RULE_REAL ( Combat, AvgDefProcsPerMinute, 2.0) +RULE_REAL ( Combat, DefProcPerMinAgiContrib, 0.075) //How much agility contributes to defensive proc rate +RULE_INT ( Combat, SpecialAttackACBonus, 15) //Percent amount of damage per AC gained for certain special attacks (damage = AC*SpecialAttackACBonus/100). +RULE_INT ( Combat, NPCFlurryChance, 20) // Chance for NPC to flurry. +RULE_BOOL (Combat,TauntOverLevel, 1) //Allows you to taunt NPC's over warriors level. +RULE_REAL (Combat,TauntSkillFalloff, 0.33)//For every taunt skill point that's not maxed you lose this % chance to taunt. +RULE_BOOL (Combat,EXPFromDmgShield, false) //Determine if damage from a damage shield counts for EXP gain. +RULE_INT ( Combat, MonkACBonusWeight, 15) +RULE_INT ( Combat, ClientStunLevel, 55) //This is the level where client kicks and bashes can stun the target +RULE_INT ( Combat, QuiverWRHasteDiv, 3) //Weight Reduction is divided by this to get haste contribution for quivers +RULE_BOOL ( Combat, UseArcheryBonusRoll, false) //Make the 51+ archery bonus require an actual roll +RULE_INT ( Combat, ArcheryBonusChance, 50) +RULE_INT ( Combat, BerserkerFrenzyStart, 35) +RULE_INT ( Combat, BerserkerFrenzyEnd, 45) +RULE_BOOL ( Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per round +RULE_CATEGORY_END() + +RULE_CATEGORY( NPC ) +RULE_INT ( NPC, MinorNPCCorpseDecayTimeMS, 450000 ) //level<55 +RULE_INT ( NPC, MajorNPCCorpseDecayTimeMS, 1500000 ) //level>=55 +RULE_INT ( NPC, CorpseUnlockTimer, 150000 ) +RULE_INT ( NPC, EmptyNPCCorpseDecayTimeMS, 0 ) +RULE_BOOL (NPC, UseItemBonusesForNonPets, true) +RULE_INT ( NPC, SayPauseTimeInSec, 5) +RULE_INT ( NPC, OOCRegen, 0) +RULE_BOOL ( NPC, BuffFriends, false ) +RULE_BOOL ( NPC, EnableNPCQuestJournal, false) +RULE_INT ( NPC, LastFightingDelayMovingMin, 10000) +RULE_INT ( NPC, LastFightingDelayMovingMax, 20000) +RULE_BOOL ( NPC, SmartLastFightingDelayMoving, true) +RULE_BOOL ( NPC, ReturnNonQuestNoDropItems, false) // Returns NO DROP items on NPCs that don't have an EVENT_TRADE sub in their script +RULE_INT ( NPC, StartEnrageValue, 9) // % HP that an NPC will begin to enrage +RULE_BOOL ( NPC, LiveLikeEnrage, false) // If set to true then only player controlled pets will enrage +RULE_CATEGORY_END() + +RULE_CATEGORY ( Aggro ) +RULE_BOOL ( Aggro, SmartAggroList, true ) +RULE_INT ( Aggro, SittingAggroMod, 35 ) //35% +RULE_INT ( Aggro, MeleeRangeAggroMod, 10 ) //10% +RULE_INT ( Aggro, CurrentTargetAggroMod, 0 ) //0% -- will prefer our current target to any other; makes it harder for our npcs to switch targets. +RULE_INT ( Aggro, CriticallyWoundedAggroMod, 100 ) //100% +RULE_INT ( Aggro, SpellAggroMod, 100 ) +RULE_INT ( Aggro, SongAggroMod, 33 ) +RULE_INT ( Aggro, PetSpellAggroMod, 10 ) +RULE_REAL ( Aggro, TunnelVisionAggroMod, 0.75 ) //people not currently the top hate generate this much hate on a Tunnel Vision mob +RULE_INT ( Aggro, MaxStunProcAggro, 400 ) // Set to -1 for no limit. Maxmimum amount of aggro that a stun based proc will add. +RULE_INT ( Aggro, IntAggroThreshold, 75 ) // Int <= this will aggro regardless of level difference. +RULE_CATEGORY_END() + +RULE_CATEGORY ( TaskSystem) +RULE_BOOL ( TaskSystem, EnableTaskSystem, true) // Globally enable or disable the Task system +RULE_INT ( TaskSystem, PeriodicCheckTimer, 5) // Seconds between checks for failed tasks. Also used by the 'Touch' activity +RULE_BOOL ( TaskSystem, RecordCompletedTasks, true) +RULE_BOOL ( TaskSystem, RecordCompletedOptionalActivities, false) +RULE_BOOL ( TaskSystem, KeepOneRecordPerCompletedTask, true) +RULE_BOOL ( TaskSystem, EnableTaskProximity, true) +RULE_CATEGORY_END() + +#ifdef BOTS +RULE_CATEGORY ( Bots ) +RULE_REAL ( Bots, BotManaRegen, 2.0 ) // Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players. +RULE_BOOL ( Bots, BotFinishBuffing, false ) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat. +RULE_INT ( Bots, CreateBotCount, 150 ) // Number of bots that each account can create +RULE_INT ( Bots, SpawnBotCount, 71 ) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid +RULE_BOOL ( Bots, BotQuest, false ) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl +RULE_BOOL ( Bots, BotGroupBuffing, false ) // Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB. +RULE_BOOL ( Bots, BotSpellQuest, false ) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests. +RULE_INT ( Bots, BotAAExpansion, 8 ) // Bots get AAs through this expansion +RULE_BOOL ( Bots, BotGroupXP, false ) // Determines whether client gets xp for bots outside their group. +RULE_BOOL ( Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs. +RULE_BOOL ( Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior) +RULE_CATEGORY_END() +#endif + +RULE_CATEGORY ( Chat ) +RULE_BOOL ( Chat, ServerWideOOC, true) +RULE_BOOL ( Chat, ServerWideAuction, true) +RULE_BOOL ( Chat, EnableVoiceMacros, true) +RULE_BOOL ( Chat, EnableMailKeyIPVerification, true) +RULE_BOOL ( Chat, EnableAntiSpam, true) +RULE_INT ( Chat, MinStatusToBypassAntiSpam, 100) +RULE_INT ( Chat, MinimumMessagesPerInterval, 4) +RULE_INT ( Chat, MaximumMessagesPerInterval, 12) +RULE_INT ( Chat, MaxMessagesBeforeKick, 20) +RULE_INT ( Chat, IntervalDurationMS, 60000) +RULE_INT ( Chat, KarmaUpdateIntervalMS, 1200000) +RULE_INT ( Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able to talk in ooc/auction/chat below the level limit +RULE_INT ( Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low. +RULE_CATEGORY_END() + +RULE_CATEGORY ( Merchant ) +RULE_BOOL ( Merchant, UsePriceMod, true) // Use faction/charisma price modifiers. +RULE_REAL ( Merchant, SellCostMod, 1.05) // Modifier for NPC sell price. +RULE_REAL ( Merchant, BuyCostMod, 0.95) // Modifier for NPC buy price. +RULE_INT ( Merchant, PriceBonusPct, 4) // Determines maximum price bonus from having good faction/CHA. Value is a percent. +RULE_INT ( Merchant, PricePenaltyPct, 4) // Determines maximum price penalty from having bad faction/CHA. Value is a percent. +RULE_REAL( Merchant, ChaBonusMod, 3.45) // Determines CHA cap, from 104 CHA. 3.45 is 132 CHA at apprehensive. 0.34 is 400 CHA at apprehensive. +RULE_REAL ( Merchant, ChaPenaltyMod, 1.52) // Determines CHA bottom, up to 102 CHA. 1.52 is 37 CHA at apprehensive. 0.98 is 0 CHA at apprehensive. +RULE_BOOL ( Merchant, EnableAltCurrencySell, true) // Enables the ability to resell items to alternate currency merchants + +RULE_CATEGORY_END() + +RULE_CATEGORY ( Bazaar ) +RULE_BOOL ( Bazaar, AuditTrail, false) +RULE_INT ( Bazaar, MaxSearchResults, 50) +RULE_BOOL ( Bazaar, EnableWarpToTrader, true) +RULE_INT ( Bazaar, MaxBarterSearchResults, 200) // The max results returned in the /barter search +RULE_CATEGORY_END() + +RULE_CATEGORY ( Mail ) +RULE_BOOL ( Mail, EnableMailSystem, true) // If false, client won't bring up the Mail window. +RULE_INT ( Mail, ExpireTrash, 0) // Time in seconds. 0 will delete all messages in the trash when the mailserver starts +RULE_INT ( Mail, ExpireRead, 31536000 ) // 1 Year. Set to -1 for never +RULE_INT ( Mail, ExpireUnread, 31536000 ) // 1 Year. Set to -1 for never +RULE_CATEGORY_END() + +RULE_CATEGORY ( Channels ) +RULE_INT ( Channels, RequiredStatusAdmin, 251) // Required status to administer chat channels +RULE_INT ( Channels, RequiredStatusListAll, 251) // Required status to list all chat channels +RULE_INT ( Channels, DeleteTimer, 1440) // Empty password protected channels will be deleted after this many minutes +RULE_CATEGORY_END() + +RULE_CATEGORY ( EventLog ) +RULE_BOOL ( EventLog, RecordSellToMerchant, false ) // Record sales from a player to an NPC merchant in eventlog table +RULE_BOOL ( EventLog, RecordBuyFromMerchant, false ) // Record purchases by a player from an NPC merchant in eventlog table +RULE_CATEGORY_END() + +RULE_CATEGORY ( Adventure ) +RULE_INT ( Adventure, MinNumberForGroup, 2 ) +RULE_INT ( Adventure, MaxNumberForGroup, 6 ) +RULE_INT ( Adventure, MinNumberForRaid, 18 ) +RULE_INT ( Adventure, MaxNumberForRaid, 36 ) +RULE_INT ( Adventure, MaxLevelRange, 9 ) +RULE_INT ( Adventure, NumberKillsForBossSpawn, 45) +RULE_REAL ( Adventure, DistanceForRescueAccept, 10000.0) +RULE_REAL ( Adventure, DistanceForRescueComplete, 2500.0) +RULE_INT ( Adventure, ItemIDToEnablePorts, 41000 ) //0 to disable, otherwise using a LDoN portal will require the user to have this item. +RULE_INT ( Adventure, LDoNTrapDistanceUse, 625 ) +RULE_REAL ( Adventure, LDoNBaseTrapDifficulty, 15.0 ) +RULE_REAL ( Adventure, LDoNCriticalFailTrapThreshold, 10.0 ) +RULE_INT ( Adventure, LDoNAdventureExpireTime, 1800) //30 minutes to expire +RULE_CATEGORY_END() + +RULE_CATEGORY ( AA ) +RULE_INT ( AA, ExpPerPoint, 23976503) //Amount of exp per AA. Is the same as the amount of exp to go from level 51 to level 52. +RULE_BOOL ( AA, Stacking, true) //Allow AA that belong to the same group to stack on SOF+ clients. +RULE_CATEGORY_END() + +RULE_CATEGORY( Console ) +RULE_INT ( Console, SessionTimeOut, 600000 ) // Amount of time in ms for the console session to time out +RULE_CATEGORY_END() + +RULE_CATEGORY( QueryServ ) +RULE_BOOL( QueryServ, PlayerChatLogging, false) // Logs Player Chat +RULE_BOOL( QueryServ, PlayerLogTrades, false) // Logs Player Trades +RULE_BOOL( QueryServ, PlayerLogHandins, false) // Logs Player Handins +RULE_BOOL( QueryServ, PlayerLogNPCKills, false) // Logs Player NPC Kills +RULE_BOOL( QueryServ, PlayerLogDeletes, false) // Logs Player Deletes +RULE_BOOL( QueryServ, PlayerLogMoves, false) // Logs Player Moves +RULE_BOOL( QueryServ, MerchantLogTransactions, false) // Logs Merchant Transactions +RULE_BOOL( QueryServ, PlayerLogPCCoordinates, false) // Logs Player Coordinates with certain events +RULE_CATEGORY_END() + +RULE_CATEGORY( Inventory ) +RULE_BOOL ( Inventory, EnforceAugmentRestriction, true) // Forces augment slot restrictions +RULE_BOOL ( Inventory, EnforceAugmentUsability, true) // Forces augmented item usability +RULE_BOOL ( Inventory, EnforceAugmentWear, true) // Forces augment wear slot validation +RULE_CATEGORY_END() + +#undef RULE_CATEGORY +#undef RULE_INT +#undef RULE_REAL +#undef RULE_BOOL +#undef RULE_CATEGORY_END + diff --git a/common/shareddb.cpp b/common/shareddb.cpp index d5d42a174..9ace76873 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -1659,27 +1659,28 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) { sp[tempid].directional_start = static_cast(atoi(row[194])); sp[tempid].directional_end = static_cast(atoi(row[195])); sp[tempid].sneak = atoi(row[196]) != 0; - sp[tempid].not_extendable = atoi(row[197]) != 0; + sp[tempid].not_focusable = atoi(row[197]) != 0; sp[tempid].suspendable = atoi(row[200]) != 0; sp[tempid].viral_range = atoi(row[201]); sp[tempid].songcap = atoi(row[202]); sp[tempid].no_block = atoi(row[205]); sp[tempid].spellgroup=atoi(row[207]); sp[tempid].rank = atoi(row[208]); - sp[tempid].powerful_flag=atoi(row[209]); + sp[tempid].no_resist=atoi(row[209]); sp[tempid].CastRestriction = atoi(row[211]); sp[tempid].AllowRest = atoi(row[212]) != 0; sp[tempid].InCombat = atoi(row[213]) != 0; sp[tempid].OutofCombat = atoi(row[214]) != 0; sp[tempid].override_crit_chance = atoi(row[217]); sp[tempid].aemaxtargets = atoi(row[218]); - sp[tempid].maxtargets = atoi(row[219]); + sp[tempid].no_heal_damage_item_mod = atoi(row[219]); sp[tempid].persistdeath = atoi(row[224]) != 0; sp[tempid].min_dist = atof(row[227]); sp[tempid].min_dist_mod = atof(row[228]); sp[tempid].max_dist = atof(row[229]); sp[tempid].max_dist_mod = atof(row[230]); sp[tempid].min_range = static_cast(atoi(row[231])); + sp[tempid].no_remove = atoi(row[232]) != 0; sp[tempid].DamageShieldType = 0; } diff --git a/common/spdat.h b/common/spdat.h index c49628d01..76515ae42 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -486,7 +486,7 @@ typedef enum { #define SE_CriticalDamageMob 330 // implemented #define SE_Salvage 331 // implemented - chance to recover items that would be destroyed in failed tradeskill combine //#define SE_SummonToCorpse 332 // *not implemented AA - Call of the Wild (Druid/Shaman Res spell with no exp) -#define SE_CastOnRuneFadeEffect 333 // implemented +#define SE_CastOnRuneFadeEffect 333 // implemented #define SE_BardAEDot 334 // implemented #define SE_BlockNextSpellFocus 335 // implemented - base1 chance to block next spell ie Puratus (8494) //#define SE_IllusionaryTarget 336 // not used @@ -744,7 +744,7 @@ struct SPDat_Spell_Struct /* 194 */ float directional_start; //Cone Start Angle: /* 195 */ float directional_end; // Cone End Angle: /* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect) -/* 197 */ bool not_extendable; +/* 197 */ bool not_focusable; //prevents focus effects from being applied to spell /* 198- 199 */ /* 200 */ bool suspendable; // buff is suspended in suspended buff zones /* 201 */ int viral_range; @@ -755,7 +755,7 @@ struct SPDat_Spell_Struct /* 206 */ /* 207 */ int spellgroup; /* 208 */ int rank; //increments AA effects with same name -/* 209 */ int powerful_flag; // Need more investigation to figure out what to call this, for now we know -1 makes charm spells not break before their duration is complete, it does alot more though +/* 209 */ int no_resist; //makes spells unresistable, which makes charms unbreakable as well. /* 210 */ // bool DurationFrozen; ??? /* 211 */ int CastRestriction; //Various restriction categories for spells most seem targetable race related but have also seen others for instance only castable if target hp 20% or lower or only if target out of combat /* 212 */ bool AllowRest; @@ -764,7 +764,7 @@ struct SPDat_Spell_Struct /* 215 - 216 */ /* 217 */ int override_crit_chance; //Places a cap on the max chance to critical /* 218 */ int aemaxtargets; //Is used for various AE effects -/* 219 */ int maxtargets; //Is used for beam and ring spells for target # limits (not implemented) +/* 219 */ int no_heal_damage_item_mod; //Is used for beam and ring spells for target # limits (not implemented) /* 220 - 223 */ /* 224 */ bool persistdeath; // buff doesn't get stripped on death /* 225 - 226 */ @@ -773,7 +773,8 @@ struct SPDat_Spell_Struct /* 229 */ float max_dist; //spell power modified by distance from caster (Max Distance) /* 230 */ float max_dist_mod; //spell power modified by distance from caster (Modifier at Max Distance) /* 231 */ float min_range; //Min casting range -/* 232 - 236 */ +/* 232 */ bool no_remove; //prevents buff from being removed by click +/* 233 - 236 */ uint8 DamageShieldType; // This field does not exist in spells_us.txt }; diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 06716b3df..09f173ac5 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -1240,7 +1240,7 @@ bool Mob::PassCharismaCheck(Mob* caster, uint16 spell_id) { if(IsCharmSpell(spell_id)) { - if (spells[spell_id].powerful_flag == -1) //If charm spell has this set(-1), it can not break till end of duration. + if (spells[spell_id].no_resist) //If charm spell has this set(-1), it can not break till end of duration. return true; //1: The mob has a default 25% chance of being allowed a resistance check against the charm. diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index f1ec8e8ec..51ad0f3e8 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3734,7 +3734,7 @@ void Client::Handle_OP_BuffRemoveRequest(const EQApplicationPacket *app) uint16 SpellID = m->GetSpellIDFromSlot(brrs->SlotID); - if (SpellID && IsBeneficialSpell(SpellID)) + if (SpellID && IsBeneficialSpell(SpellID) && !spells[SpellID].no_remove) m->BuffFadeBySlot(brrs->SlotID, true); } diff --git a/zone/effects.cpp b/zone/effects.cpp index 2e43ad8f5..f2706cae1 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -112,7 +112,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value -= GetFocusEffect(focusFcDamageAmt, spell_id); value -= GetFocusEffect(focusFcDamageAmt2, spell_id); - if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) + if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value)*ratio/100; else if (IsNPC() && CastToNPC()->GetSpellScale()) @@ -145,7 +145,7 @@ int32 Mob::GetActSpellDamage(uint16 spell_id, int32 value, Mob* target) { value -= GetFocusEffect(focusFcDamageAmt, spell_id); value -= GetFocusEffect(focusFcDamageAmt2, spell_id); - if(itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) + if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.SpellDmg && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) value -= GetExtraSpellAmt(spell_id, itembonuses.SpellDmg, value); if (IsNPC() && CastToNPC()->GetSpellScale()) @@ -287,7 +287,7 @@ int32 Mob::GetActSpellHealing(uint16 spell_id, int32 value, Mob* target) { value += GetFocusEffect(focusFcHealAmt, spell_id); value += target->GetFocusIncoming(focusFcHealAmtIncoming, SE_FcHealAmtIncoming, this, spell_id); - if(itembonuses.HealAmt && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) + if(!spells[spell_id].no_heal_damage_item_mod && itembonuses.HealAmt && spells[spell_id].classes[(GetClass()%16) - 1] >= GetLevel() - 5) value += GetExtraSpellAmt(spell_id, itembonuses.HealAmt, value) * modifier; value += value*target->GetHealRate(spell_id, this)/100; @@ -430,9 +430,6 @@ int32 Client::GetActSpellCost(uint16 spell_id, int32 cost) int32 Mob::GetActSpellDuration(uint16 spell_id, int32 duration) { - if (spells[spell_id].not_extendable) - return duration; - int increase = 100; increase += GetFocusEffect(focusSpellDuration, spell_id); int tic_inc = 0; diff --git a/zone/lua_spell.cpp b/zone/lua_spell.cpp index e99b9ba84..18353efaa 100644 --- a/zone/lua_spell.cpp +++ b/zone/lua_spell.cpp @@ -406,7 +406,7 @@ int Lua_Spell::GetSpellGroup() { int Lua_Spell::GetPowerfulFlag() { Lua_Safe_Call_Int(); - return self->powerful_flag; + return self->no_resist; } int Lua_Spell::GetCastRestriction() { @@ -436,7 +436,7 @@ int Lua_Spell::GetAEMaxTargets() { int Lua_Spell::GetMaxTargets() { Lua_Safe_Call_Int(); - return self->maxtargets; + return self->no_heal_damage_item_mod; } bool Lua_Spell::GetPersistDeath() { diff --git a/zone/mob.cpp b/zone/mob.cpp index 24f17a531..fc46aac75 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -5598,18 +5598,18 @@ int32 Mob::GetSpellStat(uint32 spell_id, const char *identifier, uint8 slot) else if (id == "NimbusEffect") {return spells[spell_id].NimbusEffect; } else if (id == "directional_start") {return static_cast(spells[spell_id].directional_start); } else if (id == "directional_end") {return static_cast(spells[spell_id].directional_end); } - else if (id == "not_extendable") {return spells[spell_id].not_extendable; } + else if (id == "not_focusable") {return spells[spell_id].not_focusable; } else if (id == "suspendable") {return spells[spell_id].suspendable; } else if (id == "viral_range") {return spells[spell_id].viral_range; } else if (id == "spellgroup") {return spells[spell_id].spellgroup; } else if (id == "rank") {return spells[spell_id].rank; } - else if (id == "powerful_flag") {return spells[spell_id].powerful_flag; } + else if (id == "no_resist") {return spells[spell_id].no_resist; } else if (id == "CastRestriction") {return spells[spell_id].CastRestriction; } else if (id == "AllowRest") {return spells[spell_id].AllowRest; } else if (id == "InCombat") {return spells[spell_id].InCombat; } else if (id == "OutofCombat") {return spells[spell_id].OutofCombat; } else if (id == "aemaxtargets") {return spells[spell_id].aemaxtargets; } - else if (id == "maxtargets") {return spells[spell_id].maxtargets; } + else if (id == "no_heal_damage_item_mod") {return spells[spell_id].no_heal_damage_item_mod; } else if (id == "persistdeath") {return spells[spell_id].persistdeath; } else if (id == "min_dist") {return static_cast(spells[spell_id].min_dist); } else if (id == "min_dist_mod") {return static_cast(spells[spell_id].min_dist_mod); } diff --git a/zone/spell_effects.cpp b/zone/spell_effects.cpp index 754ced55d..8d3b252ad 100644 --- a/zone/spell_effects.cpp +++ b/zone/spell_effects.cpp @@ -780,7 +780,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove // define spells with fixed duration // charm spells with -1 in field 209 are all of fixed duration, so lets use that instead of spell_ids - if(spells[spell_id].powerful_flag == -1) + if(spells[spell_id].no_resist) bBreak = true; if (!bBreak) @@ -5228,6 +5228,9 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) if (IsBardSong(spell_id) && type != focusFcBaseEffects && type != focusSpellDuration) return 0; + if (spells[spell_id].not_focusable) + return 0; + int16 realTotal = 0; int16 realTotal2 = 0; int16 realTotal3 = 0; @@ -5499,6 +5502,9 @@ int16 Client::GetFocusEffect(focusType type, uint16 spell_id) int16 NPC::GetFocusEffect(focusType type, uint16 spell_id) { + if (spells[spell_id].not_focusable) + return 0; + int16 realTotal = 0; int16 realTotal2 = 0; bool rand_effectiveness = false; diff --git a/zone/spells.cpp b/zone/spells.cpp index 44bd8e3de..6967598d0 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4298,7 +4298,7 @@ float Mob::ResistSpell(uint8 resist_type, uint16 spell_id, Mob *caster, bool use } //Get the resist chance for the target - if(resist_type == RESIST_NONE) + if(resist_type == RESIST_NONE || spells[spell_id].no_resist) { Log.Out(Logs::Detail, Logs::Spells, "Spell was unresistable"); return 100; From 9bff5baa1cfc8e074543f41398ed723d539af536 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 8 Oct 2015 13:36:04 -0400 Subject: [PATCH 08/13] Nuked. --- common/ruletypesx.h | 562 -------------------------------------------- 1 file changed, 562 deletions(-) delete mode 100644 common/ruletypesx.h diff --git a/common/ruletypesx.h b/common/ruletypesx.h deleted file mode 100644 index de0dbb587..000000000 --- a/common/ruletypesx.h +++ /dev/null @@ -1,562 +0,0 @@ - - - -#ifndef RULE_CATEGORY -#define RULE_CATEGORY(name) -#endif -#ifndef RULE_INT -#define RULE_INT(cat, rule, default_value) -#endif -#ifndef RULE_REAL -#define RULE_REAL(cat, rule, default_value) -#endif -#ifndef RULE_BOOL -#define RULE_BOOL(cat, rule, default_value) -#endif -#ifndef RULE_CATEGORY_END -#define RULE_CATEGORY_END() -#endif - - - - -RULE_CATEGORY( Character ) -RULE_INT ( Character, MaxLevel, 65 ) -RULE_BOOL ( Character, PerCharacterQglobalMaxLevel, false) // This will check for qglobal 'CharMaxLevel' character qglobal (Type 5), if player tries to level beyond that point, it will not go beyond that level -RULE_INT ( Character, MaxExpLevel, 0 ) //Sets the Max Level attainable via Experience -RULE_INT ( Character, DeathExpLossLevel, 10 ) // Any level greater than this will lose exp on death -RULE_INT ( Character, DeathExpLossMaxLevel, 255 ) // Any level greater than this will no longer lose exp on death -RULE_INT ( Character, DeathItemLossLevel, 10 ) -RULE_INT ( Character, DeathExpLossMultiplier, 3) //Adjust how much exp is lost -RULE_BOOL( Character, UseDeathExpLossMult, false ) //Adjust to use the above multiplier or to use code default. -RULE_INT ( Character, CorpseDecayTimeMS, 10800000 ) -RULE_INT ( Character, CorpseResTimeMS, 10800000 ) // time before cant res corpse(3 hours) -RULE_BOOL( Character, LeaveCorpses, true ) -RULE_BOOL( Character, LeaveNakedCorpses, false ) -RULE_INT ( Character, MaxDraggedCorpses, 2 ) -RULE_REAL( Character, DragCorpseDistance, 400) // If the corpse is <= this distance from the player, it won't move -RULE_REAL( Character, ExpMultiplier, 0.5 ) -RULE_REAL( Character, AAExpMultiplier, 0.5 ) -RULE_REAL( Character, GroupExpMultiplier, 0.5 ) -RULE_REAL( Character, RaidExpMultiplier, 0.2 ) -RULE_BOOL( Character, UseXPConScaling, true ) -RULE_INT ( Character, LightBlueModifier, 40 ) -RULE_INT ( Character, BlueModifier, 90 ) -RULE_INT ( Character, WhiteModifier, 100 ) -RULE_INT ( Character, YellowModifier, 125 ) -RULE_INT ( Character, RedModifier, 150 ) -RULE_INT ( Character, AutosaveIntervalS, 300 ) //0=disabled -RULE_INT ( Character, HPRegenMultiplier, 100) -RULE_INT ( Character, ManaRegenMultiplier, 100) -RULE_INT ( Character, EnduranceRegenMultiplier, 100) -RULE_INT ( Character, ConsumptionMultiplier, 100) //item's hunger restored = this value * item's food level, 100 = normal, 50 = people eat 2x as fast, 200 = people eat 2x as slow -RULE_BOOL( Character, HealOnLevel, false) -RULE_BOOL( Character, FeignKillsPet, false) -RULE_INT ( Character, ItemManaRegenCap, 15) -RULE_INT ( Character, ItemHealthRegenCap, 35) -RULE_INT ( Character, ItemDamageShieldCap, 30) -RULE_INT ( Character, ItemAccuracyCap, 150) -RULE_INT ( Character, ItemAvoidanceCap, 100) -RULE_INT ( Character, ItemCombatEffectsCap, 100) -RULE_INT ( Character, ItemShieldingCap, 35) -RULE_INT ( Character, ItemSpellShieldingCap, 35) -RULE_INT ( Character, ItemDoTShieldingCap, 35) -RULE_INT ( Character, ItemStunResistCap, 35) -RULE_INT ( Character, ItemStrikethroughCap, 35) -RULE_INT ( Character, ItemATKCap, 250) -RULE_INT ( Character, ItemHealAmtCap, 250) -RULE_INT ( Character, ItemSpellDmgCap, 250) -RULE_INT ( Character, ItemClairvoyanceCap, 250) -RULE_INT ( Character, ItemDSMitigationCap, 50) -RULE_INT ( Character, ItemEnduranceRegenCap, 15) -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(overhaste) haste. -RULE_INT ( Character, SkillUpModifier, 100) //skill ups are at 100% -RULE_BOOL ( Character, SharedBankPlat, false) //off by default to prevent duping for now -RULE_BOOL ( Character, BindAnywhere, false) -RULE_INT ( Character, RestRegenPercent, 0) // Set to >0 to enable rest state bonus HP and mana regen. -RULE_INT ( Character, RestRegenTimeToActivate, 30) // Time in seconds for rest state regen to kick in. -RULE_BOOL ( Character, RestRegenEndurance, false) // Whether rest regen will work for endurance or not. -RULE_INT ( Character, KillsPerGroupLeadershipAA, 250) // Number of dark blues or above per Group Leadership AA -RULE_INT ( Character, KillsPerRaidLeadershipAA, 250) // Number of dark blues or above per Raid Leadership AA -RULE_INT ( Character, MaxFearDurationForPlayerCharacter, 4) //4 tics, each tic calculates every 6 seconds. -RULE_INT ( Character, MaxCharmDurationForPlayerCharacter, 15) -RULE_INT ( Character, BaseHPRegenBonusRaces, 4352) //a bitmask of race(s) that receive the regen bonus. Iksar (4096) & Troll (256) = 4352. see common/races.h for the bitmask values -RULE_BOOL ( Character, SoDClientUseSoDHPManaEnd, false) // Setting this to true will allow SoD clients to use the SoD HP/Mana/End formulas and previous clients will use the old formulas -RULE_BOOL ( Character, UseRaceClassExpBonuses, true) // Setting this to true will enable Class and Racial experience rate bonuses -RULE_BOOL ( Character, RespawnFromHover, false) // Use Respawn window, or not. -RULE_INT ( Character, RespawnFromHoverTimer, 300) // Respawn Window countdown timer, in SECONDS -RULE_BOOL ( Character, UseNewStatsWindow, true) // New stats window shows everything -RULE_BOOL ( Character, ItemCastsUseFocus, false) // If true, this allows item clickies to use focuses that have limited max levels on them -RULE_INT ( Character, MinStatusForNoDropExemptions, 80) // This allows status x and higher to trade no drop items. -RULE_INT ( Character, SkillCapMaxLevel, 75 ) // Sets the Max Level used for Skill Caps (from skill_caps table). -1 makes it use MaxLevel rule value. It is set to 75 because PEQ only has skillcaps up to that level, and grabbing the players' skill past 75 will return 0, breaking all skills past that level. This helps servers with obsurd level caps (75+ level cap) function without any modifications. -RULE_INT ( Character, StatCap, 0 ) -RULE_BOOL ( Character, CheckCursorEmptyWhenLooting, true ) // If true, a player cannot loot a corpse (player or NPC) with an item on their cursor -RULE_BOOL ( Character, MaintainIntoxicationAcrossZones, true ) // If true, alcohol effects are maintained across zoning and logging out/in. -RULE_BOOL ( Character, EnableDiscoveredItems, true ) // If enabled, it enables EVENT_DISCOVER_ITEM and also saves character names and timestamps for the first time an item is discovered. -RULE_BOOL ( Character, EnableXTargetting, true) // Enable Extended Targetting Window, for users with UF and later clients. -RULE_BOOL ( Character, KeepLevelOverMax, false) // Don't delevel a character that has somehow gone over the level cap -RULE_INT ( Character, FoodLossPerUpdate, 35) // How much food/water you lose per stamina update -RULE_INT ( Character, BaseInstrumentSoftCap, 36) // Softcap for instrument mods, 36 commonly referred to as "3.6" as well. -RULE_INT ( Character, BaseRunSpeedCap, 158) // Base Run Speed Cap, on live it's 158% which will give you a runspeed of 1.580 hard capped to 225. -RULE_CATEGORY_END() - -RULE_CATEGORY( Mercs ) -RULE_INT (Mercs, SuspendIntervalMS, 10000) -RULE_INT (Mercs, UpkeepIntervalMS, 180000) -RULE_INT (Mercs, SuspendIntervalS, 10) -RULE_INT (Mercs, UpkeepIntervalS, 180) -RULE_BOOL (Mercs, AllowMercs, false) -RULE_BOOL (Mercs, ChargeMercPurchaseCost, false) -RULE_BOOL (Mercs, ChargeMercUpkeepCost, false) -RULE_INT (Mercs, AggroRadius, 100) // Determines the distance from which a merc will aggro group member's target(also used to determine the distance at which a healer merc will begin healing a group member) -RULE_INT (Mercs, AggroRadiusPuller, 25) // Determines the distance from which a merc will aggro group member's target, if they have the group role of puller (also used to determine the distance at which a healer merc will begin healing a group member, if they have the group role of puller) -RULE_INT (Mercs, ResurrectRadius, 50) // Determines the distance from which a healer merc will attempt to resurrect a group member's corpse -RULE_INT (Mercs, ScaleRate, 100) -RULE_CATEGORY_END() - -RULE_CATEGORY( Guild ) -RULE_INT ( Guild, MaxMembers, 2048 ) -RULE_BOOL ( Guild, PlayerCreationAllowed, false) // Allow players to create a guild using the window in Underfoot+ -RULE_INT ( Guild, PlayerCreationLimit, 1) // Only allow use of the UF+ window if the account has < than this number of guild leaders on it -RULE_INT ( Guild, PlayerCreationRequiredStatus, 0) // Required admin status. -RULE_INT ( Guild, PlayerCreationRequiredLevel, 0) // Required Level of the player attempting to create the guild. -RULE_INT ( Guild, PlayerCreationRequiredTime, 0) // Required Time Entitled On Account (in Minutes) to create the guild. - -RULE_CATEGORY_END() - -RULE_CATEGORY( Skills ) -RULE_INT ( Skills, MaxTrainTradeskills, 21 ) -RULE_BOOL ( Skills, UseLimitTradeskillSearchSkillDiff, true ) -RULE_INT ( Skills, MaxTradeskillSearchSkillDiff, 50 ) -RULE_INT ( Skills, MaxTrainSpecializations, 50 ) // Max level a GM trainer will train casting specializations -RULE_CATEGORY_END() - -RULE_CATEGORY( Pets ) -RULE_REAL( Pets, AttackCommandRange, 150 ) -RULE_BOOL( Pets, UnTargetableSwarmPet, false ) -RULE_BOOL( Pets, SwarmPetNotTargetableWithHotKey, false ) //On SOF+ clients this a semi-hack to make swarm pets not F8 targetable. -RULE_CATEGORY_END() - -RULE_CATEGORY( GM ) -RULE_INT ( GM, MinStatusToSummonItem, 250) -RULE_INT ( GM, MinStatusToZoneAnywhere, 250 ) -RULE_CATEGORY_END() - -RULE_CATEGORY( World ) -RULE_INT ( World, ZoneAutobootTimeoutMS, 60000 ) -RULE_INT ( World, ClientKeepaliveTimeoutMS, 65000 ) -RULE_BOOL ( World, UseBannedIPsTable, false ) // Toggle whether or not to check incoming client connections against the Banned_IPs table. Set this value to false to disable this feature. -RULE_BOOL ( World, EnableTutorialButton, true) -RULE_BOOL ( World, EnableReturnHomeButton, true) -RULE_INT ( World, MaxLevelForTutorial, 10) -RULE_INT ( World, TutorialZoneID, 189) -RULE_INT ( World, GuildBankZoneID, 345) -RULE_INT ( World, MinOfflineTimeToReturnHome, 21600) // 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, ExemptMaxClientsStatus, -1 ) // Exempt accounts from the MaxClientsPerIP and AddMaxClientsStatus rules, if their status is >= this value. Default value: -1 (feature disabled) -RULE_INT ( World, AddMaxClientsPerIP, -1 ) // Maximum number of clients allowed to connect per IP address if account status is < ExemptMaxClientsStatus. Default value: -1 (feature disabled) -RULE_INT ( World, AddMaxClientsStatus, -1 ) // Accounts with status >= this rule will be allowed to use the amount of accounts defined in the AddMaxClientsPerIP. Default value: -1 (feature disabled) -RULE_BOOL ( World, MaxClientsSetByStatus, false) // If True, IP Limiting will be set to the status on the account as long as the status is > MaxClientsPerIP -RULE_BOOL ( World, ClearTempMerchantlist, true) // Clears temp merchant items when world boots. -RULE_BOOL ( World, DeleteStaleCorpeBackups, true) // Deletes stale corpse backups older than 2 weeks. -RULE_INT ( World, AccountSessionLimit, -1 ) //Max number of characters allowed on at once from a single account (-1 is disabled) -RULE_INT ( World, ExemptAccountLimitStatus, -1 ) //Min status required to be exempt from multi-session per account limiting (-1 is disabled) -RULE_BOOL ( World, GMAccountIPList, false) // Check ip list against GM Accounts, AntiHack GM Accounts. -RULE_INT ( World, MinGMAntiHackStatus, 1 ) //Minimum GM status to check against AntiHack list -RULE_INT ( World, SoFStartZoneID, -1 ) //Sets the Starting Zone for SoF Clients separate from Titanium Clients (-1 is disabled) -RULE_INT ( World, ExpansionSettings, 16383) // Sets the expansion settings for the server, This is sent on login to world and affects client expansion settings. Defaults to all expansions enabled up to TSS. -RULE_INT ( World, PVPSettings, 0) // Sets the PVP settings for the server, 1 = Rallos Zek RuleSet, 2 = Tallon/Vallon Zek Ruleset, 4 = Sullon Zek Ruleset, 6 = Discord Ruleset, anything above 6 is the Discord Ruleset without the no-drop restrictions removed. TODO: Edit IsAttackAllowed in Zone to accomodate for these rules. -RULE_BOOL (World, IsGMPetitionWindowEnabled, false) -RULE_INT (World, FVNoDropFlag, 0) // Sets the Firiona Vie settings on the client. If set to 2, the flag will be set for GMs only, allowing trading of no-drop items. -RULE_BOOL (World, IPLimitDisconnectAll, false) -RULE_CATEGORY_END() - -RULE_CATEGORY( Zone ) -RULE_INT ( Zone, NPCPositonUpdateTicCount, 32 ) //ms between intervals of sending a position update to the entire zone. -RULE_INT ( Zone, ClientLinkdeadMS, 180000) //the time a client remains link dead on the server after a sudden disconnection -RULE_INT ( Zone, GraveyardTimeMS, 1200000) //ms time until a player corpse is moved to a zone's graveyard, if one is specified for the zone -RULE_BOOL ( Zone, EnableShadowrest, 1 ) // enables or disables the shadowrest zone feature for player corpses. Default is turned on. -RULE_BOOL ( Zone, UsePlayerCorpseBackups, true) // Keeps backups of player corpses. -RULE_INT ( Zone, MQWarpExemptStatus, -1 ) // Required status level to exempt the MQWarpDetector. Set to -1 to disable this feature. -RULE_INT ( Zone, MQZoneExemptStatus, -1 ) // Required status level to exempt the MQZoneDetector. Set to -1 to disable this feature. -RULE_INT ( Zone, MQGateExemptStatus, -1 ) // Required status level to exempt the MQGateDetector. Set to -1 to disable this feature. -RULE_INT ( Zone, MQGhostExemptStatus, -1 ) // Required status level to exempt the MGhostDetector. Set to -1 to disable this feature. -RULE_BOOL ( Zone, EnableMQWarpDetector, true ) // Enable the MQWarp Detector. Set to False to disable this feature. -RULE_BOOL ( Zone, EnableMQZoneDetector, true ) // Enable the MQZone Detector. Set to False to disable this feature. -RULE_BOOL ( Zone, EnableMQGateDetector, true ) // Enable the MQGate Detector. Set to False to disable this feature. -RULE_BOOL ( Zone, EnableMQGhostDetector, true ) // Enable the MQGhost Detector. Set to False to disable this feature. -RULE_REAL ( Zone, MQWarpDetectionDistanceFactor, 9.0) //clients move at 4.4 about if in a straight line but with movement and to acct for lag we raise it a bit -RULE_BOOL ( Zone, MarkMQWarpLT, false ) -RULE_INT ( Zone, AutoShutdownDelay, 5000 ) //How long a dynamic zone stays loaded while empty -RULE_INT ( Zone, PEQZoneReuseTime, 900 ) //How long, in seconds, until you can reuse the #peqzone command. -RULE_INT ( Zone, PEQZoneDebuff1, 4454 ) //First debuff casted by #peqzone Default is Cursed Keeper's Blight. -RULE_INT ( Zone, PEQZoneDebuff2, 2209 ) //Second debuff casted by #peqzone Default is Tendrils of Apathy. -RULE_BOOL ( Zone, UsePEQZoneDebuffs, true ) //Will determine if #peqzone will debuff players or not when used. -RULE_REAL ( Zone, HotZoneBonus, 0.75 ) -RULE_INT ( Zone, ReservedInstances, 30 ) //Will reserve this many instance ids for globals... probably not a good idea to change this while a server is running. -RULE_INT ( Zone, EbonCrystalItemID, 40902) -RULE_INT ( Zone, RadiantCrystalItemID, 40903) -RULE_BOOL ( Zone, LevelBasedEXPMods, false) // Allows you to use the level_exp_mods table in consideration to your players EXP hits -RULE_INT ( Zone, WeatherTimer, 600) // Weather timer when no duration is available -RULE_CATEGORY_END() - -RULE_CATEGORY( Map ) -//enable these to help prevent mob hopping when they are pathing -RULE_BOOL ( Map, FixPathingZWhenLoading, true ) //increases zone boot times a bit to reduce hopping. -RULE_BOOL ( Map, FixPathingZAtWaypoints, false ) //alternative to `WhenLoading`, accomplishes the same thing but does it at each waypoint instead of once at boot time. -RULE_BOOL ( Map, FixPathingZWhenMoving, false ) //very CPU intensive, but helps hopping with widely spaced waypoints. -RULE_BOOL ( Map, FixPathingZOnSendTo, false ) //try to repair Z coords in the SendTo routine as well. -RULE_REAL ( Map, FixPathingZMaxDeltaMoving, 20 ) //at runtime while pathing: max change in Z to allow the BestZ code to apply. -RULE_REAL ( Map, FixPathingZMaxDeltaWaypoint, 20 ) //at runtime at each waypoint: max change in Z to allow the BestZ code to apply. -RULE_REAL ( Map, FixPathingZMaxDeltaSendTo, 20 ) //at runtime in SendTo: max change in Z to allow the BestZ code to apply. -RULE_REAL ( Map, FixPathingZMaxDeltaLoading, 45 ) //while loading each waypoint: max change in Z to allow the BestZ code to apply. -RULE_BOOL ( Map, UseClosestZ, false) // Move mobs to the nearest Z above or below, rather than just the nearest below. - // Only set UseClosestZ true if all your .map files generated from EQGs were created - // with azone2. - // -RULE_INT ( Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position -RULE_CATEGORY_END() - -RULE_CATEGORY( Pathing ) -// Some of these rules may benefit by being made into columns in the zone table, -// for instance, in dungeons, the min LOS distances could be substantially lowered. -RULE_BOOL ( Pathing, Aggro, true ) // Enable pathing for aggroed mobs. -RULE_BOOL ( Pathing, AggroReturnToGrid, true ) // Enable pathing for aggroed roaming mobs returning to their previous waypoint. -RULE_BOOL ( Pathing, Guard, true ) // Enable pathing for mobs moving to their guard point. -RULE_BOOL ( Pathing, Find, true ) // Enable pathing for FindPerson requests from the client. -RULE_BOOL ( Pathing, Fear, true ) // Enable pathing for fear -RULE_REAL ( Pathing, ZDiffThreshold, 10) // If a mob las LOS to it's target, it will run to it if the Z difference is < this. -RULE_INT ( Pathing, LOSCheckFrequency, 1000) // A mob will check for LOS to it's target this often (milliseconds). -RULE_INT ( Pathing, RouteUpdateFrequencyShort, 1000) // How often a new route will be calculated if the target has moved. -RULE_INT ( Pathing, RouteUpdateFrequencyLong, 5000) // How often a new route will be calculated if the target has moved. -// When a path has a path node route and it's target changes position, if it has RouteUpdateFrequencyNodeCount or less nodes to go on it's -// current path, it will recalculate it's path based on the RouteUpdateFrequencyShort timer, otherwise it will use the -// RouteUpdateFrequencyLong timer. -RULE_INT ( Pathing, RouteUpdateFrequencyNodeCount, 5) -RULE_REAL ( Pathing, MinDistanceForLOSCheckShort, 40000) // (NoRoot). While following a path, only check for LOS to target within this distance. -RULE_REAL ( Pathing, MinDistanceForLOSCheckLong, 1000000) // (NoRoot). Min distance when initially attempting to acquire the target. -RULE_INT ( Pathing, MinNodesLeftForLOSCheck, 4) // Only check for LOS when we are down to this many path nodes left to run. -// This next rule was put in for situations where the mob and it's target may be on different sides of a 'hazard', e.g. a pit -// If the mob has LOS to it's target, even though there is a hazard in it's way, it may break off from the node path and run at -// the target, only to later detect the hazard and re-acquire a node path. Depending upon the placement of the path nodes, this -// can lead to the mob looping. The rule is intended to allow the mob to at least get closer to it's target each time before -// checking LOS and trying to head straight for it. -RULE_INT ( Pathing, MinNodesTraversedForLOSCheck, 3) // Only check for LOS after we have traversed this many path nodes. -RULE_INT ( Pathing, CullNodesFromStart, 1) // Checks LOS from Start point to second node for this many nodes and removes first node if there is LOS -RULE_INT ( Pathing, CullNodesFromEnd, 1) // Checks LOS from End point to second to last node for this many nodes and removes last node if there is LOS -RULE_REAL ( Pathing, CandidateNodeRangeXY, 400) // When searching for path start/end nodes, only nodes within this range will be considered. -RULE_REAL ( Pathing, CandidateNodeRangeZ, 10) // When searching for path start/end nodes, only nodes within this range will be considered. - -RULE_CATEGORY_END() - -RULE_CATEGORY( Watermap ) -// enable these to use the water detection code. Requires Water Maps generated by awater utility -RULE_BOOL ( Watermap, CheckWaypointsInWaterWhenLoading, false ) // Does not apply BestZ as waypoints are loaded if they are in water -RULE_BOOL ( Watermap, CheckForWaterAtWaypoints, false) // Check if a mob has moved into/out of water when at waypoints and sets flymode -RULE_BOOL ( Watermap, CheckForWaterWhenMoving, false) // Checks if a mob has moved into/out of water each time it's loc is recalculated -RULE_BOOL ( Watermap, CheckForWaterOnSendTo, false) // Checks if a mob has moved into/out of water on SendTo -RULE_BOOL ( Watermap, CheckForWaterWhenFishing, false) // Only lets a player fish near water (if a water map exists for the zone) -RULE_REAL ( Watermap, FishingRodLength, 30) // How far in front of player water must be for fishing to work -RULE_REAL ( Watermap, FishingLineLength, 40) // If water is more than this far below the player, it is considered too far to fish -RULE_CATEGORY_END() - -RULE_CATEGORY( Spells ) -RULE_INT ( Spells, AutoResistDiff, 15) -RULE_REAL ( Spells, ResistChance, 2.0) //chance to resist given no resists and same level -RULE_REAL ( Spells, ResistMod, 0.40) //multiplier, chance to resist = this * ResistAmount -RULE_REAL ( Spells, PartialHitChance, 0.7) //The chance when a spell is resisted that it will partial hit. -RULE_REAL ( Spells, PartialHitChanceFear, 0.25) //The chance when a fear spell is resisted that it will partial hit. -RULE_INT ( Spells, BaseCritChance, 0) //base % chance that everyone has to crit a spell -RULE_INT ( Spells, BaseCritRatio, 100) //base % bonus to damage on a successful spell crit. 100 = 2x damage -RULE_INT ( Spells, WizCritLevel, 12) //level wizards first get spell crits -RULE_INT ( Spells, WizCritChance, 7) //wiz's crit chance, on top of BaseCritChance -RULE_INT ( Spells, WizCritRatio, 0) //wiz's crit bonus, on top of BaseCritRatio (should be 0 for Live-like) -RULE_INT ( Spells, ResistPerLevelDiff, 85) //8.5 resist per level difference. -RULE_INT ( Spells, TranslocateTimeLimit, 0) // If not zero, time in seconds to accept a Translocate. -RULE_INT ( Spells, SacrificeMinLevel, 46) //first level Sacrifice will work on -RULE_INT ( Spells, SacrificeMaxLevel, 69) //last level Sacrifice will work on -RULE_INT ( Spells, SacrificeItemID, 9963) //Item ID of the item Sacrifice will return (defaults to an EE) -RULE_BOOL ( Spells, EnableSpellGlobals, false) // If Enabled, spells check the spell_globals table and compare character data from the quest globals before allowing that spell to scribe with scribespells -RULE_INT ( Spells, MaxBuffSlotsNPC, 25) -RULE_INT ( Spells, MaxSongSlotsNPC, 10) -RULE_INT ( Spells, MaxDiscSlotsNPC, 1) -RULE_INT ( Spells, MaxTotalSlotsNPC, 36) -RULE_INT ( Spells, MaxTotalSlotsPET, 25) // do not set this higher than 25 until the player profile is removed from the blob -RULE_BOOL (Spells, EnableBlockedBuffs, true) -RULE_INT ( Spells, ReflectType, 1) //0 = disabled, 1 = single target player spells only, 2 = all player spells, 3 = all single target spells, 4 = all spells -RULE_INT ( Spells, VirusSpreadDistance, 30) // The distance a viral spell will jump to its next victim -RULE_BOOL( Spells, LiveLikeFocusEffects, true) // Determines whether specific healing, dmg and mana reduction focuses are randomized -RULE_INT ( Spells, BaseImmunityLevel, 55) // The level that targets start to be immune to stun, fear and mez spells with a max level of 0. -RULE_BOOL ( Spells, NPCIgnoreBaseImmunity, true) // Whether or not NPCs get to ignore the BaseImmunityLevel for their spells. -RULE_REAL ( Spells, AvgSpellProcsPerMinute, 6.0) //Adjust rate for sympathetic spell procs -RULE_INT ( Spells, ResistFalloff, 67) //Max that level that will adjust our resist chance based on level modifiers -RULE_INT ( Spells, CharismaEffectiveness, 10) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod. -RULE_INT ( Spells, CharismaEffectivenessCap, 255) // Deterimes how much resist modification charisma applies to charm/pacify checks. Default 10 CHA = -1 resist mod. -RULE_BOOL ( Spells, CharismaCharmDuration, false) // Allow CHA resist mod to extend charm duration. -RULE_INT ( Spells, CharmBreakCheckChance, 25) //Determines chance for a charm break check to occur each buff tick. -RULE_INT ( Spells, MaxCastTimeReduction, 50) //Max percent your spell cast time can be reduced by spell haste -RULE_INT ( Spells, RootBreakFromSpells, 55) //Chance for root to break when cast on. -RULE_INT ( Spells, DeathSaveCharismaMod, 3) //Determines how much charisma effects chance of death save firing. -RULE_INT ( Spells, DivineInterventionHeal, 8000) //Divine intervention heal amount. -RULE_BOOL ( Spells, AdditiveBonusValues, false) //Allow certain bonuses to be calculated by adding together the value from each item, instead of taking the highest value. (ie Add together all Cleave Effects) -RULE_BOOL ( Spells, UseCHAScribeHack, false) //ScribeSpells and TrainDiscs quest functions will ignore entries where field 12 is CHA. What's the best way to do this? -RULE_BOOL ( Spells, BuffLevelRestrictions, true) //Buffs will not land on low level toons like live -RULE_INT ( Spells, RootBreakCheckChance, 70) //Determines chance for a root break check to occur each buff tick. -RULE_INT ( Spells, FearBreakCheckChance, 70) //Determines chance for a fear break check to occur each buff tick. -RULE_INT ( Spells, SuccorFailChance, 2) //Determines chance for a succor spell not to teleport an invidual player -RULE_INT ( Spells, FRProjectileItem_Titanium, 1113) // Item id for Titanium clients for Fire 'spell projectile'. -RULE_INT ( Spells, FRProjectileItem_SOF, 80684) // Item id for SOF clients for Fire 'spell projectile'. -RULE_INT ( Spells, FRProjectileItem_NPC, 80684) // Item id for NPC Fire 'spell projectile'. -RULE_BOOL ( Spells, UseLiveSpellProjectileGFX, false) // Use spell projectile graphics set in the spells_new table (player_1). Server must be using UF+ spell file. -RULE_BOOL ( Spells, FocusCombatProcs, false) //Allow all combat procs to receive focus effects. -RULE_CATEGORY_END() - -RULE_CATEGORY( Combat ) -RULE_INT ( Combat, MeleeBaseCritChance, 0 ) //The base crit chance for non warriors, NOTE: This will apply to NPCs as well -RULE_INT ( Combat, WarBerBaseCritChance, 3 ) //The base crit chance for warriors and berserkers, only applies to clients -RULE_INT ( Combat, BerserkBaseCritChance, 6 ) //The bonus base crit chance you get when you're berserk -RULE_INT ( Combat, NPCBashKickLevel, 6 ) //The level that npcs can KICK/BASH -RULE_INT ( Combat, NPCBashKickStunChance, 15 ) //Percent chance that a bash/kick will stun -RULE_INT ( Combat, RogueCritThrowingChance, 25) //Rogue throwing crit bonus -RULE_INT ( Combat, RogueDeadlyStrikeChance, 80) //Rogue chance throwing from behind crit becomes a deadly strike -RULE_INT ( Combat, RogueDeadlyStrikeMod, 2) //Deadly strike modifier to crit damage -RULE_INT ( Combat, ClientBaseCritChance, 0 ) //The base crit chance for all clients, this will stack with warrior's/zerker's crit chance. -RULE_BOOL ( Combat, UseIntervalAC, true) -RULE_INT ( Combat, PetAttackMagicLevel, 30) -RULE_BOOL ( Combat, EnableFearPathing, true) -RULE_REAL ( Combat, FleeMultiplier, 2.0) // Determines how quickly a NPC will slow down while fleeing. Decrease multiplier to slow NPC down quicker. -RULE_INT ( Combat, FleeHPRatio, 25) //HP % when a NPC begins to flee. -RULE_BOOL ( Combat, FleeIfNotAlone, false) // If false, mobs won't flee if other mobs are in combat with it. -RULE_BOOL ( Combat, AdjustProcPerMinute, true) -RULE_REAL ( Combat, AvgProcsPerMinute, 2.0) -RULE_REAL ( Combat, ProcPerMinDexContrib, 0.075) -RULE_REAL ( Combat, BaseProcChance, 0.035) -RULE_REAL ( Combat, ProcDexDivideBy, 11000) -RULE_REAL ( Combat, BaseHitChance, 69.0) -RULE_REAL ( Combat, NPCBonusHitChance, 26.0) -RULE_REAL ( Combat, HitFalloffMinor, 5.0) //hit will fall off up to 5% over the initial level range -RULE_REAL ( Combat, HitFalloffModerate, 7.0) //hit will fall off up to 7% over the three levels after the initial level range -RULE_REAL ( Combat, HitFalloffMajor, 50.0) //hit will fall off sharply if we're outside the minor and moderate range -RULE_REAL ( Combat, HitBonusPerLevel, 1.2) //You gain this % of hit for every level you are above your target -RULE_REAL ( Combat, WeaponSkillFalloff, 0.33) //For every weapon skill point that's not maxed you lose this % of hit -RULE_REAL ( Combat, ArcheryHitPenalty, 0.25) //Archery has a hit penalty to try to help balance it with the plethora of long term +hit modifiers for it -RULE_REAL ( Combat, AgiHitFactor, 0.01) -RULE_INT ( Combat, MinRangedAttackDist, 25) //Minimum Distance to use Ranged Attacks -RULE_BOOL ( Combat, ArcheryBonusRequiresStationary, true) //does the 2x archery bonus chance require a stationary npc -RULE_REAL ( Combat, ArcheryBaseDamageBonus, 1) // % Modifier to Base Archery Damage (.5 = 50% base damage, 1 = 100%, 2 = 200%) -RULE_REAL ( Combat, ArcheryNPCMultiplier, 1.0) // this is multiplied by the regular dmg to get the archery dmg -RULE_BOOL ( Combat, AssistNoTargetSelf, true) //when assisting a target that does not have a target: true = target self, false = leave target as was before assist (false = live like) -RULE_INT ( Combat, MaxRampageTargets, 3) //max number of people hit with rampage -RULE_INT ( Combat, DefaultRampageTargets, 1) // default number of people to hit with rampage -RULE_BOOL ( Combat, RampageHitsTarget, false) // rampage will hit the target if it still has targets left -RULE_INT ( Combat, MaxFlurryHits, 2) //max number of extra hits from flurry -RULE_INT ( Combat, MonkDamageTableBonus, 5) //% bonus monks get to their damage table calcs -RULE_INT ( Combat, FlyingKickBonus, 25) //% Modifier that this skill gets to str and skill bonuses -RULE_INT ( Combat, DragonPunchBonus, 20) //% Modifier that this skill gets to str and skill bonuses -RULE_INT ( Combat, EagleStrikeBonus, 15) //% Modifier that this skill gets to str and skill bonuses -RULE_INT ( Combat, TigerClawBonus, 10) //% Modifier that this skill gets to str and skill bonuses -RULE_INT ( Combat, RoundKickBonus, 5) //% Modifier that this skill gets to str and skill bonuses -RULE_INT ( Combat, FrenzyBonus, 0) //% Modifier to damage -RULE_BOOL ( Combat, ProcTargetOnly, true) //true = procs will only affect our target, false = procs will affect all of our targets -RULE_REAL ( Combat, NPCACFactor, 2.25) -RULE_INT ( Combat, ClothACSoftcap, 75) -RULE_INT ( Combat, LeatherACSoftcap, 100) -RULE_INT ( Combat, MonkACSoftcap, 120) -RULE_INT ( Combat, ChainACSoftcap, 200) -RULE_INT ( Combat, PlateACSoftcap, 300) -RULE_REAL ( Combat, AAMitigationACFactor, 3.0) -RULE_REAL ( Combat, WarriorACSoftcapReturn, 0.45) -RULE_REAL ( Combat, KnightACSoftcapReturn, 0.33) -RULE_REAL ( Combat, LowPlateChainACSoftcapReturn, 0.23) -RULE_REAL ( Combat, LowChainLeatherACSoftcapReturn, 0.17) -RULE_REAL ( Combat, CasterACSoftcapReturn, 0.06) -RULE_REAL ( Combat, MiscACSoftcapReturn, 0.3) -RULE_BOOL ( Combat, OldACSoftcapRules, false) // use old softcaps -RULE_BOOL ( Combat, UseOldDamageIntervalRules, false) // use old damage formulas for everything -RULE_REAL ( Combat, WarACSoftcapReturn, 0.3448) // new AC returns -RULE_REAL ( Combat, ClrRngMnkBrdACSoftcapReturn, 0.3030) -RULE_REAL ( Combat, PalShdACSoftcapReturn, 0.3226) -RULE_REAL ( Combat, DruNecWizEncMagACSoftcapReturn, 0.2000) -RULE_REAL ( Combat, RogShmBstBerACSoftcapReturn, 0.2500) -RULE_REAL ( Combat, SoftcapFactor, 1.88) -RULE_REAL ( Combat, ACthac0Factor, 0.55) -RULE_REAL ( Combat, ACthac20Factor, 0.55) -RULE_INT ( Combat, HitCapPre20, 40) // live has it capped at 40 for whatever dumb reason... this is mainly for custom servers -RULE_INT ( Combat, HitCapPre10, 20) // live has it capped at 20, see above :p -RULE_INT ( Combat, MinHastedDelay, 400) // how fast we can get with haste. -RULE_REAL ( Combat, AvgDefProcsPerMinute, 2.0) -RULE_REAL ( Combat, DefProcPerMinAgiContrib, 0.075) //How much agility contributes to defensive proc rate -RULE_INT ( Combat, SpecialAttackACBonus, 15) //Percent amount of damage per AC gained for certain special attacks (damage = AC*SpecialAttackACBonus/100). -RULE_INT ( Combat, NPCFlurryChance, 20) // Chance for NPC to flurry. -RULE_BOOL (Combat,TauntOverLevel, 1) //Allows you to taunt NPC's over warriors level. -RULE_REAL (Combat,TauntSkillFalloff, 0.33)//For every taunt skill point that's not maxed you lose this % chance to taunt. -RULE_BOOL (Combat,EXPFromDmgShield, false) //Determine if damage from a damage shield counts for EXP gain. -RULE_INT ( Combat, MonkACBonusWeight, 15) -RULE_INT ( Combat, ClientStunLevel, 55) //This is the level where client kicks and bashes can stun the target -RULE_INT ( Combat, QuiverWRHasteDiv, 3) //Weight Reduction is divided by this to get haste contribution for quivers -RULE_BOOL ( Combat, UseArcheryBonusRoll, false) //Make the 51+ archery bonus require an actual roll -RULE_INT ( Combat, ArcheryBonusChance, 50) -RULE_INT ( Combat, BerserkerFrenzyStart, 35) -RULE_INT ( Combat, BerserkerFrenzyEnd, 45) -RULE_BOOL ( Combat, OneProcPerWeapon, true) //If enabled, One proc per weapon per round -RULE_CATEGORY_END() - -RULE_CATEGORY( NPC ) -RULE_INT ( NPC, MinorNPCCorpseDecayTimeMS, 450000 ) //level<55 -RULE_INT ( NPC, MajorNPCCorpseDecayTimeMS, 1500000 ) //level>=55 -RULE_INT ( NPC, CorpseUnlockTimer, 150000 ) -RULE_INT ( NPC, EmptyNPCCorpseDecayTimeMS, 0 ) -RULE_BOOL (NPC, UseItemBonusesForNonPets, true) -RULE_INT ( NPC, SayPauseTimeInSec, 5) -RULE_INT ( NPC, OOCRegen, 0) -RULE_BOOL ( NPC, BuffFriends, false ) -RULE_BOOL ( NPC, EnableNPCQuestJournal, false) -RULE_INT ( NPC, LastFightingDelayMovingMin, 10000) -RULE_INT ( NPC, LastFightingDelayMovingMax, 20000) -RULE_BOOL ( NPC, SmartLastFightingDelayMoving, true) -RULE_BOOL ( NPC, ReturnNonQuestNoDropItems, false) // Returns NO DROP items on NPCs that don't have an EVENT_TRADE sub in their script -RULE_INT ( NPC, StartEnrageValue, 9) // % HP that an NPC will begin to enrage -RULE_BOOL ( NPC, LiveLikeEnrage, false) // If set to true then only player controlled pets will enrage -RULE_CATEGORY_END() - -RULE_CATEGORY ( Aggro ) -RULE_BOOL ( Aggro, SmartAggroList, true ) -RULE_INT ( Aggro, SittingAggroMod, 35 ) //35% -RULE_INT ( Aggro, MeleeRangeAggroMod, 10 ) //10% -RULE_INT ( Aggro, CurrentTargetAggroMod, 0 ) //0% -- will prefer our current target to any other; makes it harder for our npcs to switch targets. -RULE_INT ( Aggro, CriticallyWoundedAggroMod, 100 ) //100% -RULE_INT ( Aggro, SpellAggroMod, 100 ) -RULE_INT ( Aggro, SongAggroMod, 33 ) -RULE_INT ( Aggro, PetSpellAggroMod, 10 ) -RULE_REAL ( Aggro, TunnelVisionAggroMod, 0.75 ) //people not currently the top hate generate this much hate on a Tunnel Vision mob -RULE_INT ( Aggro, MaxStunProcAggro, 400 ) // Set to -1 for no limit. Maxmimum amount of aggro that a stun based proc will add. -RULE_INT ( Aggro, IntAggroThreshold, 75 ) // Int <= this will aggro regardless of level difference. -RULE_CATEGORY_END() - -RULE_CATEGORY ( TaskSystem) -RULE_BOOL ( TaskSystem, EnableTaskSystem, true) // Globally enable or disable the Task system -RULE_INT ( TaskSystem, PeriodicCheckTimer, 5) // Seconds between checks for failed tasks. Also used by the 'Touch' activity -RULE_BOOL ( TaskSystem, RecordCompletedTasks, true) -RULE_BOOL ( TaskSystem, RecordCompletedOptionalActivities, false) -RULE_BOOL ( TaskSystem, KeepOneRecordPerCompletedTask, true) -RULE_BOOL ( TaskSystem, EnableTaskProximity, true) -RULE_CATEGORY_END() - -#ifdef BOTS -RULE_CATEGORY ( Bots ) -RULE_REAL ( Bots, BotManaRegen, 2.0 ) // Adjust mana regen for bots, 1 is fast and higher numbers slow it down 3 is about the same as players. -RULE_BOOL ( Bots, BotFinishBuffing, false ) // Allow for buffs to complete even if the bot caster is out of mana. Only affects buffing out of combat. -RULE_INT ( Bots, CreateBotCount, 150 ) // Number of bots that each account can create -RULE_INT ( Bots, SpawnBotCount, 71 ) // Number of bots a character can have spawned at one time, You + 71 bots is a 12 group raid -RULE_BOOL ( Bots, BotQuest, false ) // Optional quest method to manage bot spawn limits using the quest_globals name bot_spawn_limit, see: /bazaar/Aediles_Thrall.pl -RULE_BOOL ( Bots, BotGroupBuffing, false ) // Bots will cast single target buffs as group buffs, default is false for single. Does not make single target buffs work for MGB. -RULE_BOOL ( Bots, BotSpellQuest, false ) // Anita Thrall's (Anita_Thrall.pl) Bot Spell Scriber quests. -RULE_INT ( Bots, BotAAExpansion, 8 ) // Bots get AAs through this expansion -RULE_BOOL ( Bots, BotGroupXP, false ) // Determines whether client gets xp for bots outside their group. -RULE_BOOL ( Bots, BotBardUseOutOfCombatSongs, true) // Determines whether bard bots use additional out of combat songs. -RULE_BOOL ( Bots, BotLevelsWithOwner, false) // Auto-updates spawned bots as owner levels/de-levels (false is original behavior) -RULE_CATEGORY_END() -#endif - -RULE_CATEGORY ( Chat ) -RULE_BOOL ( Chat, ServerWideOOC, true) -RULE_BOOL ( Chat, ServerWideAuction, true) -RULE_BOOL ( Chat, EnableVoiceMacros, true) -RULE_BOOL ( Chat, EnableMailKeyIPVerification, true) -RULE_BOOL ( Chat, EnableAntiSpam, true) -RULE_INT ( Chat, MinStatusToBypassAntiSpam, 100) -RULE_INT ( Chat, MinimumMessagesPerInterval, 4) -RULE_INT ( Chat, MaximumMessagesPerInterval, 12) -RULE_INT ( Chat, MaxMessagesBeforeKick, 20) -RULE_INT ( Chat, IntervalDurationMS, 60000) -RULE_INT ( Chat, KarmaUpdateIntervalMS, 1200000) -RULE_INT ( Chat, KarmaGlobalChatLimit, 72) //amount of karma you need to be able to talk in ooc/auction/chat below the level limit -RULE_INT ( Chat, GlobalChatLevelLimit, 8) //level limit you need to of reached to talk in ooc/auction/chat if your karma is too low. -RULE_CATEGORY_END() - -RULE_CATEGORY ( Merchant ) -RULE_BOOL ( Merchant, UsePriceMod, true) // Use faction/charisma price modifiers. -RULE_REAL ( Merchant, SellCostMod, 1.05) // Modifier for NPC sell price. -RULE_REAL ( Merchant, BuyCostMod, 0.95) // Modifier for NPC buy price. -RULE_INT ( Merchant, PriceBonusPct, 4) // Determines maximum price bonus from having good faction/CHA. Value is a percent. -RULE_INT ( Merchant, PricePenaltyPct, 4) // Determines maximum price penalty from having bad faction/CHA. Value is a percent. -RULE_REAL( Merchant, ChaBonusMod, 3.45) // Determines CHA cap, from 104 CHA. 3.45 is 132 CHA at apprehensive. 0.34 is 400 CHA at apprehensive. -RULE_REAL ( Merchant, ChaPenaltyMod, 1.52) // Determines CHA bottom, up to 102 CHA. 1.52 is 37 CHA at apprehensive. 0.98 is 0 CHA at apprehensive. -RULE_BOOL ( Merchant, EnableAltCurrencySell, true) // Enables the ability to resell items to alternate currency merchants - -RULE_CATEGORY_END() - -RULE_CATEGORY ( Bazaar ) -RULE_BOOL ( Bazaar, AuditTrail, false) -RULE_INT ( Bazaar, MaxSearchResults, 50) -RULE_BOOL ( Bazaar, EnableWarpToTrader, true) -RULE_INT ( Bazaar, MaxBarterSearchResults, 200) // The max results returned in the /barter search -RULE_CATEGORY_END() - -RULE_CATEGORY ( Mail ) -RULE_BOOL ( Mail, EnableMailSystem, true) // If false, client won't bring up the Mail window. -RULE_INT ( Mail, ExpireTrash, 0) // Time in seconds. 0 will delete all messages in the trash when the mailserver starts -RULE_INT ( Mail, ExpireRead, 31536000 ) // 1 Year. Set to -1 for never -RULE_INT ( Mail, ExpireUnread, 31536000 ) // 1 Year. Set to -1 for never -RULE_CATEGORY_END() - -RULE_CATEGORY ( Channels ) -RULE_INT ( Channels, RequiredStatusAdmin, 251) // Required status to administer chat channels -RULE_INT ( Channels, RequiredStatusListAll, 251) // Required status to list all chat channels -RULE_INT ( Channels, DeleteTimer, 1440) // Empty password protected channels will be deleted after this many minutes -RULE_CATEGORY_END() - -RULE_CATEGORY ( EventLog ) -RULE_BOOL ( EventLog, RecordSellToMerchant, false ) // Record sales from a player to an NPC merchant in eventlog table -RULE_BOOL ( EventLog, RecordBuyFromMerchant, false ) // Record purchases by a player from an NPC merchant in eventlog table -RULE_CATEGORY_END() - -RULE_CATEGORY ( Adventure ) -RULE_INT ( Adventure, MinNumberForGroup, 2 ) -RULE_INT ( Adventure, MaxNumberForGroup, 6 ) -RULE_INT ( Adventure, MinNumberForRaid, 18 ) -RULE_INT ( Adventure, MaxNumberForRaid, 36 ) -RULE_INT ( Adventure, MaxLevelRange, 9 ) -RULE_INT ( Adventure, NumberKillsForBossSpawn, 45) -RULE_REAL ( Adventure, DistanceForRescueAccept, 10000.0) -RULE_REAL ( Adventure, DistanceForRescueComplete, 2500.0) -RULE_INT ( Adventure, ItemIDToEnablePorts, 41000 ) //0 to disable, otherwise using a LDoN portal will require the user to have this item. -RULE_INT ( Adventure, LDoNTrapDistanceUse, 625 ) -RULE_REAL ( Adventure, LDoNBaseTrapDifficulty, 15.0 ) -RULE_REAL ( Adventure, LDoNCriticalFailTrapThreshold, 10.0 ) -RULE_INT ( Adventure, LDoNAdventureExpireTime, 1800) //30 minutes to expire -RULE_CATEGORY_END() - -RULE_CATEGORY ( AA ) -RULE_INT ( AA, ExpPerPoint, 23976503) //Amount of exp per AA. Is the same as the amount of exp to go from level 51 to level 52. -RULE_BOOL ( AA, Stacking, true) //Allow AA that belong to the same group to stack on SOF+ clients. -RULE_CATEGORY_END() - -RULE_CATEGORY( Console ) -RULE_INT ( Console, SessionTimeOut, 600000 ) // Amount of time in ms for the console session to time out -RULE_CATEGORY_END() - -RULE_CATEGORY( QueryServ ) -RULE_BOOL( QueryServ, PlayerChatLogging, false) // Logs Player Chat -RULE_BOOL( QueryServ, PlayerLogTrades, false) // Logs Player Trades -RULE_BOOL( QueryServ, PlayerLogHandins, false) // Logs Player Handins -RULE_BOOL( QueryServ, PlayerLogNPCKills, false) // Logs Player NPC Kills -RULE_BOOL( QueryServ, PlayerLogDeletes, false) // Logs Player Deletes -RULE_BOOL( QueryServ, PlayerLogMoves, false) // Logs Player Moves -RULE_BOOL( QueryServ, MerchantLogTransactions, false) // Logs Merchant Transactions -RULE_BOOL( QueryServ, PlayerLogPCCoordinates, false) // Logs Player Coordinates with certain events -RULE_CATEGORY_END() - -RULE_CATEGORY( Inventory ) -RULE_BOOL ( Inventory, EnforceAugmentRestriction, true) // Forces augment slot restrictions -RULE_BOOL ( Inventory, EnforceAugmentUsability, true) // Forces augmented item usability -RULE_BOOL ( Inventory, EnforceAugmentWear, true) // Forces augment wear slot validation -RULE_CATEGORY_END() - -#undef RULE_CATEGORY -#undef RULE_INT -#undef RULE_REAL -#undef RULE_BOOL -#undef RULE_CATEGORY_END - From 20bdbdd52d9109dc319a02fa6b51d5031cb104e5 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 8 Oct 2015 16:05:14 -0400 Subject: [PATCH 09/13] Implemented spells_new field 198 = no_detrimental_spell_aggro Spells with this flag will not generate any aggro Note: DOT portions of spells wilth this flag STILL generate aggro. Example Harminous Arrow (Ranger AA) 16127 --- common/shareddb.cpp | 1 + common/spdat.cpp | 8 ++++++++ common/spdat.h | 6 ++++-- zone/aggro.cpp | 3 +++ zone/attack.cpp | 13 ++++++++----- zone/mob.h | 2 +- zone/spells.cpp | 12 ++++++------ 7 files changed, 31 insertions(+), 14 deletions(-) diff --git a/common/shareddb.cpp b/common/shareddb.cpp index 9ace76873..b2dbc8175 100644 --- a/common/shareddb.cpp +++ b/common/shareddb.cpp @@ -1660,6 +1660,7 @@ void SharedDatabase::LoadSpells(void *data, int max_spells) { sp[tempid].directional_end = static_cast(atoi(row[195])); sp[tempid].sneak = atoi(row[196]) != 0; sp[tempid].not_focusable = atoi(row[197]) != 0; + sp[tempid].no_detrimental_spell_aggro = atoi(row[198]) != 0; sp[tempid].suspendable = atoi(row[200]) != 0; sp[tempid].viral_range = atoi(row[201]); sp[tempid].songcap = atoi(row[202]); diff --git a/common/spdat.cpp b/common/spdat.cpp index bb6097566..02803b173 100644 --- a/common/spdat.cpp +++ b/common/spdat.cpp @@ -1092,6 +1092,14 @@ bool DetrimentalSpellAllowsRest(uint16 spell_id) return false; } +bool NoDetrimentalSpellAggro(uint16 spell_id) +{ + if (IsValidSpell(spell_id)) + return spells[spell_id].no_detrimental_spell_aggro; + + return false; +} + uint32 GetNimbusEffect(uint16 spell_id) { if (IsValidSpell(spell_id)) diff --git a/common/spdat.h b/common/spdat.h index 76515ae42..b70be171a 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -745,7 +745,8 @@ struct SPDat_Spell_Struct /* 195 */ float directional_end; // Cone End Angle: /* 196 */ bool sneak; // effect can only be used if sneaking (rogue 'Daggerfall' ect) /* 197 */ bool not_focusable; //prevents focus effects from being applied to spell -/* 198- 199 */ +/* 198 */ bool no_detrimental_spell_aggro; +/* 199 */ /* 200 */ bool suspendable; // buff is suspended in suspended buff zones /* 201 */ int viral_range; /* 202 */ int songcap; // individual song cap @@ -764,7 +765,7 @@ struct SPDat_Spell_Struct /* 215 - 216 */ /* 217 */ int override_crit_chance; //Places a cap on the max chance to critical /* 218 */ int aemaxtargets; //Is used for various AE effects -/* 219 */ int no_heal_damage_item_mod; //Is used for beam and ring spells for target # limits (not implemented) +/* 219 */ int no_heal_damage_item_mod; /* 220 - 223 */ /* 224 */ bool persistdeath; // buff doesn't get stripped on death /* 225 - 226 */ @@ -880,6 +881,7 @@ uint32 GetPartialMeleeRuneReduction(uint32 spell_id); uint32 GetPartialMagicRuneReduction(uint32 spell_id); uint32 GetPartialMeleeRuneAmount(uint32 spell_id); uint32 GetPartialMagicRuneAmount(uint32 spell_id); +bool NoDetrimentalSpellAggro(uint16 spell_id); int CalcPetHp(int levelb, int classb, int STA = 75); const char *GetRandPetName(); diff --git a/zone/aggro.cpp b/zone/aggro.cpp index 09f173ac5..574ac335d 100644 --- a/zone/aggro.cpp +++ b/zone/aggro.cpp @@ -960,6 +960,9 @@ bool Mob::CheckLosFN(float posX, float posY, float posZ, float mobSize) { //offensive spell aggro int32 Mob::CheckAggroAmount(uint16 spell_id, Mob *target, bool isproc) { + if (NoDetrimentalSpellAggro(spell_id)) + return 0; + int32 AggroAmount = 0; int32 nonModifiedAggro = 0; uint16 slevel = GetLevel(); diff --git a/zone/attack.cpp b/zone/attack.cpp index 7a62aaff4..3089aa573 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -2410,7 +2410,7 @@ bool NPC::Death(Mob* killerMob, int32 damage, uint16 spell, SkillUseTypes attack return true; } -void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, bool iYellForHelp /*= true*/, bool bFrenzy /*= false*/, bool iBuffTic /*= false*/) +void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, bool iYellForHelp /*= true*/, bool bFrenzy /*= false*/, bool iBuffTic /*= false*/, uint16 spell_id) { if(!other) return; @@ -2466,6 +2466,9 @@ void Mob::AddToHateList(Mob* other, uint32 hate /*= 0*/, int32 damage /*= 0*/, b if(IsFamiliar() || GetSpecialAbility(IMMUNE_AGGRO)) return; + if (spell_id != SPELL_UNKNOWN && NoDetrimentalSpellAggro(spell_id)) + return; + if (other == myowner) return; @@ -3139,15 +3142,15 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons if(!RuleB(Combat, EXPFromDmgShield)) { // Damage shield damage shouldn't count towards who gets EXP if(!attacker->CastToClient()->GetFeigned() && !FromDamageShield) - AddToHateList(attacker, 0, damage, true, false, iBuffTic); + AddToHateList(attacker, 0, damage, true, false, iBuffTic, spell_id); } else { if(!attacker->CastToClient()->GetFeigned()) - AddToHateList(attacker, 0, damage, true, false, iBuffTic); + AddToHateList(attacker, 0, damage, true, false, iBuffTic, spell_id); } } else - AddToHateList(attacker, 0, damage, true, false, iBuffTic); + AddToHateList(attacker, 0, damage, true, false, iBuffTic, spell_id); } if(damage > 0) { @@ -3172,7 +3175,7 @@ void Mob::CommonDamage(Mob* attacker, int32 &damage, const uint16 spell_id, cons { if (!pet->IsHeld()) { Log.Out(Logs::Detail, Logs::Aggro, "Sending pet %s into battle due to attack.", pet->GetName()); - pet->AddToHateList(attacker, 1); + pet->AddToHateList(attacker, 1,0, true, false, false, spell_id); pet->SetTarget(attacker); Message_StringID(10, PET_ATTACKING, pet->GetCleanName(), attacker->GetCleanName()); } diff --git a/zone/mob.h b/zone/mob.h index 651065296..e48eda680 100644 --- a/zone/mob.h +++ b/zone/mob.h @@ -489,7 +489,7 @@ public: inline uint32 GetLevelCon(uint8 iOtherLevel) const { return this ? GetLevelCon(GetLevel(), iOtherLevel) : CON_GREEN; } virtual void AddToHateList(Mob* other, uint32 hate = 0, int32 damage = 0, bool iYellForHelp = true, - bool bFrenzy = false, bool iBuffTic = false); + bool bFrenzy = false, bool iBuffTic = false, uint16 spell_id = SPELL_UNKNOWN); bool RemoveFromHateList(Mob* mob); void SetHateAmountOnEnt(Mob* other, int32 hate = 0, int32 damage = 0) { hate_list.SetHateAmountOnEnt(other,hate,damage);} void HalveAggro(Mob *other) { uint32 in_hate = GetHateAmount(other); SetHateAmountOnEnt(other, (in_hate > 1 ? in_hate / 2 : 1)); } diff --git a/zone/spells.cpp b/zone/spells.cpp index 6967598d0..ce45b6d83 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -4067,7 +4067,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if(aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } @@ -4094,7 +4094,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if(aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } @@ -4110,7 +4110,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if(aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } else if(IsClient() && caster->IsClient() && (caster->CastToClient()->GetGM() == false)) @@ -4127,7 +4127,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if (aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } @@ -4150,7 +4150,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if(aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } @@ -4190,7 +4190,7 @@ bool Mob::IsImmuneToSpell(uint16 spell_id, Mob *caster) if(aggro > 0) { AddToHateList(caster, aggro); } else { - AddToHateList(caster, 1); + AddToHateList(caster, 1,0,true,false,false,spell_id); } return true; } From 43671fa749d147680f178f5acf11bbb226ce4f99 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Thu, 8 Oct 2015 19:26:04 -0400 Subject: [PATCH 10/13] Implemented SE_PC_Pet_Flurry_Chance 466 // Base1 % chance to do flurry from double attack hit. --- common/spdat.h | 2 +- zone/attack.cpp | 18 ++++++++++++++++-- zone/bonuses.cpp | 13 +++++++++++-- zone/common.h | 1 + 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/common/spdat.h b/common/spdat.h index b70be171a..75c6e60c0 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -619,7 +619,7 @@ typedef enum { //#define SE_Shield_Target 463 // #define SE_PC_Pet_Rampage 464 // implemented - Base1 % chance to do rampage for base2 % of damage each melee round //#define SE_PC_Pet_AE_Rampage 465 // Would assume as above but need to confirm. -//#define SE_PC_Pet_Flurry_Chance 466 // +#define SE_PC_Pet_Flurry_Chance 466 // implemented - Base1 % chance to do flurry from double attack hit. //#define SE_DS_Mitigation_Amount 467 // //#define SE_DS_Mitigation_Percentage 468 // //#define SE_Chance_Best_in_Spell_Grp 469 // diff --git a/zone/attack.cpp b/zone/attack.cpp index 3089aa573..2f94716bf 100644 --- a/zone/attack.cpp +++ b/zone/attack.cpp @@ -4763,8 +4763,15 @@ void Mob::DoMainHandAttackRounds(Mob *target, ExtraAttackOptions *opts, int spec // A "quad" on live really is just a successful dual wield where both double attack // The mobs that could triple lost the ability to when the triple attack skill was added in Attack(target, MainPrimary, false, false, false, opts, special); - if (CanThisClassDoubleAttack() && CheckDoubleAttack()) + if (CanThisClassDoubleAttack() && CheckDoubleAttack()){ Attack(target, MainPrimary, false, false, false, opts, special); + + if ((IsPet() || IsTempPet()) && IsPetOwnerClient()){ + int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; + if (chance && zone->random.Roll(chance)) + Flurry(nullptr); + } + } return; } @@ -4814,8 +4821,15 @@ void Mob::DoOffHandAttackRounds(Mob *target, ExtraAttackOptions *opts, int speci GetEquipment(MaterialSecondary) != 0) { if (CheckDualWield()) { Attack(target, MainSecondary, false, false, false, opts, special); - if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack()) + if (CanThisClassDoubleAttack() && GetLevel() > 35 && CheckDoubleAttack()){ Attack(target, MainSecondary, false, false, false, opts, special); + + if ((IsPet() || IsTempPet()) && IsPetOwnerClient()){ + int chance = spellbonuses.PC_Pet_Flurry + itembonuses.PC_Pet_Flurry + aabonuses.PC_Pet_Flurry; + if (chance && zone->random.Roll(chance)) + Flurry(nullptr); + } + } } } } diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 772f875e5..bcf70a873 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1423,7 +1423,12 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) if (newbon->PC_Pet_Rampage[1] < base2) newbon->PC_Pet_Rampage[1] = base2; //Damage modifer - take highest break; - } + } + + case SE_PC_Pet_Flurry_Chance: + newbon->PC_Pet_Flurry += base1; //Chance to Flurry + break; + // to do case SE_PetDiscipline: break; @@ -3132,7 +3137,11 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne if (new_bonus->PC_Pet_Rampage[1] < base2) new_bonus->PC_Pet_Rampage[1] = base2; //Damage modifer - take highest break; - } + } + + case SE_PC_Pet_Flurry_Chance: + new_bonus->PC_Pet_Flurry += effect_value; //Chance to Flurry + break; //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/common.h b/zone/common.h index af53e1a93..b76a2d21a 100644 --- a/zone/common.h +++ b/zone/common.h @@ -408,6 +408,7 @@ struct StatBonuses { uint32 SkillProc[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs. uint32 SkillProcSuccess[MAX_SKILL_PROCS]; // Max number of spells containing skill_procs_success. uint32 PC_Pet_Rampage[2]; // 0= % chance to rampage, 1=damage modifier + uint32 PC_Pet_Flurry; // Percent chance flurry from double attack // AAs int8 Packrat; //weight reduction for items, 1 point = 10% From 2cf59ae2f2ce0ffb0deac5ee9d16aa811341ad7b Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Fri, 9 Oct 2015 13:08:24 -0400 Subject: [PATCH 11/13] Updated a few AA effects to use database values instead of hardcoded values. --- common/spdat.h | 6 +- zone/bonuses.cpp | 30 ++++++++-- zone/client_packet.cpp | 76 +++++++++--------------- zone/common.h | 3 + zone/tradeskills.cpp | 129 +---------------------------------------- 5 files changed, 59 insertions(+), 185 deletions(-) diff --git a/common/spdat.h b/common/spdat.h index 75c6e60c0..b89d88307 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -381,7 +381,7 @@ typedef enum { #define SE_GiveDoubleAttack 225 // implemented[AA] - Allow any class to double attack with set chance. #define SE_TwoHandBash 226 // *not implemented as bonus #define SE_ReduceSkillTimer 227 // implemented -#define SE_ReduceFallDamage 228 // not implented as bonus - reduce the damage that you take from falling +#define SE_ReduceFallDamage 228 // implented - reduce the damage that you take from falling #define SE_PersistantCasting 229 // implemented #define SE_ExtendedShielding 230 // not used as bonus - increase range of /shield ability #define SE_StunBashChance 231 // implemented - increase chance to stun from bash. @@ -409,7 +409,7 @@ typedef enum { #define SE_FrontalBackstabMinDmg 253 // implemented[AA] - allow a frontal backstab for mininum damage. #define SE_Blank 254 // implemented #define SE_ShieldDuration 255 // not implemented as bonus - increases duration of /shield -#define SE_ShroudofStealth 256 // not implemented as bonus - rogue improved invs +#define SE_ShroudofStealth 256 // implemented #define SE_PetDiscipline 257 // not implemented as bonus - /pet hold #define SE_TripleBackstab 258 // implemented[AA] - chance to perform a triple backstab #define SE_CombatStability 259 // implemented[AA] - damage mitigation @@ -421,7 +421,7 @@ typedef enum { #define SE_MasteryofPast 265 // implemented[AA] - Spells less than effect values level can not be fizzled #define SE_ExtraAttackChance 266 // implemented - increase chance to score an extra attack with a 2-Handed Weapon. #define SE_PetDiscipline2 267 // *not implemented - /pet focus, /pet no cast -#define SE_ReduceTradeskillFail 268 // *not implemented? - reduces chance to fail with given tradeskill by a percent chance +#define SE_ReduceTradeskillFail 268 // implemented - reduces chance to fail with given tradeskill by a percent chance #define SE_MaxBindWound 269 // implemented[AA] - Increase max HP you can bind wound. #define SE_BardSongRange 270 // implemented[AA] - increase range of beneficial bard songs (Sionachie's Crescendo) #define SE_BaseMovementSpeed 271 // implemented[AA] - mods basemove speed, doesn't stack with other move mods diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index bcf70a873..fcf952627 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1429,13 +1429,23 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) newbon->PC_Pet_Flurry += base1; //Chance to Flurry break; + case SE_ShroudofStealth: + newbon->ShroudofStealth = true; + break; + + case SE_ReduceFallDamage: + newbon->ReduceFallDamage += base1; + break; + + case SE_ReduceTradeskillFail: + newbon->ReduceTradeskillFail[base2] += base1; + break; + // to do case SE_PetDiscipline: break; case SE_PetDiscipline2: break; - case SE_ReduceTradeskillFail: - break; case SE_PotionBeltSlots: break; case SE_BandolierSlots: @@ -1458,13 +1468,9 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) break; case SE_TrapCircumvention: break; - case SE_ShroudofStealth: - break; case SE_FeignedMinion: break; - // handled client side - case SE_ReduceFallDamage: // not handled here case SE_HastenedAASkill: // not handled here but don't want to clutter debug log -- these may need to be verified to ignore @@ -3143,6 +3149,18 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne new_bonus->PC_Pet_Flurry += effect_value; //Chance to Flurry break; + case SE_ShroudofStealth: + new_bonus->ShroudofStealth = true; + break; + + case SE_ReduceFallDamage: + new_bonus->ReduceFallDamage += effect_value; + break; + + case SE_ReduceTradeskillFail: + new_bonus->ReduceTradeskillFail[base2] += effect_value; + break; + //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 51ad0f3e8..d8ffb6a68 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -5076,18 +5076,12 @@ void Client::Handle_OP_DisarmTraps(const EQApplicationPacket *app) Message(13, "Ability recovery time not yet met."); return; } - int reuse = DisarmTrapsReuseTime; - switch (GetAA(aaAdvTrapNegotiation)) { - case 1: - reuse -= 1; - break; - case 2: - reuse -= 3; - break; - case 3: - reuse -= 5; - break; - } + + int reuse = DisarmTrapsReuseTime - GetSkillReuseTime(SkillDisarmTraps); + + if (reuse < 1) + reuse = 1; + p_timers.Start(pTimerDisarmTraps, reuse - 1); Trap* trap = entity_list.FindNearbyTrap(this, 60); @@ -5359,17 +5353,9 @@ void Client::Handle_OP_EnvDamage(const EQApplicationPacket *app) if (ed->dmgtype == 252) { - switch (GetAA(aaAcrobatics)) { //Don't know what acrobatics effect is yet but it should be done client side via aa effect.. till then - case 1: - damage = damage * 95 / 100; - break; - case 2: - damage = damage * 90 / 100; - break; - case 3: - damage = damage * 80 / 100; - break; - } + int mod = spellbonuses.ReduceFallDamage + itembonuses.ReduceFallDamage + aabonuses.ReduceFallDamage; + + damage -= damage * mod / 100; } if (damage < 0) @@ -5443,19 +5429,13 @@ void Client::Handle_OP_FeignDeath(const EQApplicationPacket *app) Message(13, "Ability recovery time not yet met."); return; } + int reuse = FeignDeathReuseTime; - switch (GetAA(aaRapidFeign)) - { - case 1: - reuse -= 1; - break; - case 2: - reuse -= 2; - break; - case 3: - reuse -= 5; - break; - } + reuse -= GetSkillReuseTime(SkillFeignDeath); + + if (reuse < 1) + reuse = 1; + p_timers.Start(pTimerFeignDeath, reuse - 1); //BreakInvis(); @@ -7762,7 +7742,11 @@ void Client::Handle_OP_Hide(const EQApplicationPacket *app) Message(13, "Ability recovery time not yet met."); return; } - int reuse = HideReuseTime - GetAA(209); + int reuse = HideReuseTime - GetSkillReuseTime(SkillHide); + + if (reuse < 1) + reuse = 1; + p_timers.Start(pTimerHide, reuse - 1); float hidechance = ((GetSkill(SkillHide) / 250.0f) + .25) * 100; @@ -7776,7 +7760,7 @@ void Client::Handle_OP_Hide(const EQApplicationPacket *app) sa_out->parameter = 1; entity_list.QueueClients(this, outapp, true); safe_delete(outapp); - if (GetAA(aaShroudofStealth)){ + if (spellbonuses.ShroudofStealth || aabonuses.ShroudofStealth || itembonuses.ShroudofStealth){ improved_hidden = true; hidden = true; } @@ -11698,18 +11682,12 @@ void Client::Handle_OP_SenseTraps(const EQApplicationPacket *app) Message(13, "Ability recovery time not yet met."); return; } - int reuse = SenseTrapsReuseTime; - switch (GetAA(aaAdvTrapNegotiation)) { - case 1: - reuse -= 1; - break; - case 2: - reuse -= 3; - break; - case 3: - reuse -= 5; - break; - } + + int reuse = SenseTrapsReuseTime - GetSkillReuseTime(SkillSenseTraps); + + if (reuse < 1) + reuse = 1; + p_timers.Start(pTimerSenseTraps, reuse - 1); Trap* trap = entity_list.FindNearbyTrap(this, 800); diff --git a/zone/common.h b/zone/common.h index b76a2d21a..77981412d 100644 --- a/zone/common.h +++ b/zone/common.h @@ -467,6 +467,9 @@ struct StatBonuses { int32 PetMeleeMitigation; // Add AC to owner's pet. bool IllusionPersistence; // Causes illusions not to fade. uint16 extra_xtargets; // extra xtarget entries + bool ShroudofStealth; // rogue improved invisiblity + uint16 ReduceFallDamage; // reduce fall damage by percent + int32 ReduceTradeskillFail[HIGHEST_SKILL+1]; // Reduces chance for trade skills to fail by percent. }; typedef struct diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index 6ed516da0..e5fe49813 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -941,135 +941,10 @@ bool Client::TradeskillExecute(DBTradeskillRecipe_Struct *spec) { float res = zone->random.Real(0, 99); int aa_chance = 0; - //AA modifiers - //can we do this with nested switches? - if(spec->tradeskill == SkillAlchemy){ - switch(GetAA(aaAlchemyMastery)){ - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } + aa_chance = spellbonuses.ReduceTradeskillFail[spec->tradeskill] + itembonuses.ReduceTradeskillFail[spec->tradeskill] + aabonuses.ReduceTradeskillFail[spec->tradeskill]; - if(spec->tradeskill == SkillJewelryMaking){ - switch(GetAA(aaJewelCraftMastery)){ - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } const Item_Struct* item = nullptr; - - if (spec->tradeskill == SkillBlacksmithing) { - switch(GetAA(aaBlacksmithingMastery)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillBaking) { - switch(GetAA(aaBakingMastery)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillBrewing) { - switch(GetAA(aaBrewingMastery)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillFletching) { - switch(GetAA(aaFletchingMastery2)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillPottery) { - switch(GetAA(aaPotteryMastery)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillTailoring) { - switch(GetAA(aaTailoringMastery)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - - if (spec->tradeskill == SkillResearch) { - switch(GetAA(aaArcaneTongues)) { - case 1: - aa_chance = 10; - break; - case 2: - aa_chance = 25; - break; - case 3: - aa_chance = 50; - break; - } - } - + chance = mod_tradeskill_chance(chance, spec); if (((spec->tradeskill==75) || GetGM() || (chance > res)) || zone->random.Roll(aa_chance)) { From 79c9862131b6731d347704b8be2b2a605c23a2f5 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Fri, 9 Oct 2015 14:04:39 -0400 Subject: [PATCH 12/13] Few more AA updates to use database instead of hard coded values. --- common/spdat.h | 6 +++--- zone/bonuses.cpp | 24 +++++++++++++++++------- zone/client.cpp | 14 ++------------ zone/common.h | 3 ++- zone/tradeskills.cpp | 5 +++-- 5 files changed, 27 insertions(+), 25 deletions(-) diff --git a/common/spdat.h b/common/spdat.h index b89d88307..41fd35f1f 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -400,7 +400,7 @@ typedef enum { #define SE_RootBreakChance 244 // implemented[AA] reduce the chance that your root will break. #define SE_TrapCircumvention 245 // *not implemented[AA] - decreases the chance that you will set off a trap when opening a chest #define SE_SetBreathLevel 246 // *not implemented as bonus -#define SE_RaiseSkillCap 247 // *not implemented[AA] - adds skill over the skill cap. +#define SE_RaiseSkillCap 247 // implemented[AA] - adds skill over the skill cap. #define SE_SecondaryForte 248 // not implemented as bonus(gives you a 2nd specialize skill that can go past 50 to 100) #define SE_SecondaryDmgInc 249 // implemented[AA] Allows off hand weapon to recieve a damage bonus (Sinister Strikes) #define SE_SpellProcChance 250 // implemented - Increase chance to proc from melee proc spells (ie Spirit of Panther) @@ -416,7 +416,7 @@ typedef enum { #define SE_AddSingingMod 260 // implemented[AA] - Instrument/Singing Mastery, base1 is the mod, base2 is the ItemType #define SE_SongModCap 261 // implemented[AA] - Song Mod cap increase (no longer used on live) #define SE_RaiseStatCap 262 // implemented -#define SE_TradeSkillMastery 263 // not implemented - lets you raise more than one tradeskill above master. +#define SE_TradeSkillMastery 263 // implemented - lets you raise more than one tradeskill above master. #define SE_HastenedAASkill 264 // implemented #define SE_MasteryofPast 265 // implemented[AA] - Spells less than effect values level can not be fizzled #define SE_ExtraAttackChance 266 // implemented - increase chance to score an extra attack with a 2-Handed Weapon. @@ -478,7 +478,7 @@ typedef enum { #define SE_GateToHomeCity 322 // implemented #define SE_DefensiveProc 323 // implemented #define SE_HPToMana 324 // implemented -//#define SE_ChanceInvsBreakToAoE 325 // *not implemented[AA] - [AA Nerves of Steel] increasing chance to remain hidden when they are an indirect target of an AoE spell. +//#define SE_NoBreakAESneak 325 // *not implemented[AA] - [AA Nerves of Steel] increasing chance to remain hidden when they are an indirect target of an AoE spell. #define SE_SpellSlotIncrease 326 // *not implemented as bonus - increases your spell slot availability #define SE_MysticalAttune 327 // implemented - increases amount of buffs that a player can have #define SE_DelayDeath 328 // implemented - increases how far you can fall below 0 hp before you die diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index fcf952627..88d627dcd 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1199,13 +1199,10 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) break; } - // Kayen: Not sure best way to implement this yet. // Physically raises skill cap ie if 55/55 it will raise to 55/60 case SE_RaiseSkillCap: { - if (newbon->RaiseSkillCap[0] < base1) { - newbon->RaiseSkillCap[0] = base1; // value - newbon->RaiseSkillCap[1] = base2; // skill - } + if (newbon->RaiseSkillCap[base2] < base1) + newbon->RaiseSkillCap[base2] = base1; break; } @@ -1441,6 +1438,11 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) newbon->ReduceTradeskillFail[base2] += base1; break; + case SE_TradeSkillMastery: + if (newbon->TradeSkillMastery < base1) + newbon->TradeSkillMastery = base1; + break; + // to do case SE_PetDiscipline: break; @@ -1452,8 +1454,6 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) break; case SE_ForageSkill: break; - case SE_TradeSkillMastery: - break; case SE_SecondaryForte: break; case SE_FeignedCastOnChance: @@ -3161,6 +3161,16 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne new_bonus->ReduceTradeskillFail[base2] += effect_value; break; + case SE_TradeSkillMastery: + if (new_bonus->TradeSkillMastery < effect_value) + new_bonus->TradeSkillMastery = effect_value; + break; + + case SE_RaiseSkillCap: + if (new_bonus->RaiseSkillCap[base2] < effect_value) + new_bonus->RaiseSkillCap[base2] = effect_value; + break; + //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/client.cpp b/zone/client.cpp index ef0c9bf7d..24a916b2a 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -2439,18 +2439,8 @@ uint16 Client::GetMaxSkillAfterSpecializationRules(SkillUseTypes skillid, uint16 } } - // This should possibly be handled by bonuses rather than here. - switch(skillid) - { - case SkillTracking: - { - Result += ((GetAA(aaAdvancedTracking) * 10) + (GetAA(aaTuneofPursuance) * 10)); - break; - } - - default: - break; - } + + Result += spellbonuses.RaiseSkillCap[skillid] + itembonuses.RaiseSkillCap[skillid] + aabonuses.RaiseSkillCap[skillid]; return Result; } diff --git a/zone/common.h b/zone/common.h index 77981412d..88aa58264 100644 --- a/zone/common.h +++ b/zone/common.h @@ -439,7 +439,7 @@ struct StatBonuses { int32 CombatStability; // Melee damage mitigation. int32 DoubleRiposte; // Chance to double riposte int32 GiveDoubleRiposte[3]; // 0=Regular Chance, 1=Skill Attack Chance, 2=Skill - uint32 RaiseSkillCap[2]; // Raise a specific skill cap (1 = value, 2=skill) + uint32 RaiseSkillCap[HIGHEST_SKILL+1]; // Raise a specific skill cap (base1= value, base2=skill) int32 Ambidexterity; // Increase chance to duel wield by adding bonus 'skill'. int32 PetMaxHP; // Increase the max hp of your pet. int32 PetFlurry; // Chance for pet to flurry. @@ -470,6 +470,7 @@ struct StatBonuses { bool ShroudofStealth; // rogue improved invisiblity uint16 ReduceFallDamage; // reduce fall damage by percent int32 ReduceTradeskillFail[HIGHEST_SKILL+1]; // Reduces chance for trade skills to fail by percent. + uint8 TradeSkillMastery; // Allow number of tradeskills to exceed 200 skill. }; typedef struct diff --git a/zone/tradeskills.cpp b/zone/tradeskills.cpp index e5fe49813..903c7c34c 100644 --- a/zone/tradeskills.cpp +++ b/zone/tradeskills.cpp @@ -1403,8 +1403,9 @@ bool Client::CanIncreaseTradeskill(SkillUseTypes tradeskill) { uint8 Pottery = (GetRawSkill(SkillPottery) > 200) ? 1 : 0; uint8 Tailoring = (GetRawSkill(SkillTailoring) > 200) ? 1 : 0; uint8 SkillTotal = Baking + Smithing + Brewing + Fletching + Jewelry + Pottery + Tailoring; //Tradeskills above 200 - uint32 aaLevel = GetAA(aaNewTanaanCraftingMastery); //New Tanaan AA: Each level allows an additional tradeskill above 200 (first one is free) - + //New Tanaan AA: Each level allows an additional tradeskill above 200 (first one is free) + uint8 aaLevel = spellbonuses.TradeSkillMastery + itembonuses.TradeSkillMastery + aabonuses.TradeSkillMastery; + switch (tradeskill) { case SkillBaking: case SkillBlacksmithing: From aae073f58814ce5edf6f927aa023b766181069b0 Mon Sep 17 00:00:00 2001 From: KayenEQ Date: Fri, 9 Oct 2015 14:29:15 -0400 Subject: [PATCH 13/13] update --- zone/bonuses.cpp | 24 +++++++++++++++++++++--- zone/spells.cpp | 8 -------- 2 files changed, 21 insertions(+), 11 deletions(-) diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index 88d627dcd..ab7d8bfee 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -1201,6 +1201,10 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) // Physically raises skill cap ie if 55/55 it will raise to 55/60 case SE_RaiseSkillCap: { + + if (base2 > HIGHEST_SKILL) + break; + if (newbon->RaiseSkillCap[base2] < base1) newbon->RaiseSkillCap[base2] = base1; break; @@ -1434,9 +1438,14 @@ void Mob::ApplyAABonuses(const AA::Rank &rank, StatBonuses *newbon) newbon->ReduceFallDamage += base1; break; - case SE_ReduceTradeskillFail: + case SE_ReduceTradeskillFail:{ + + if (base2 > HIGHEST_SKILL) + break; + newbon->ReduceTradeskillFail[base2] += base1; break; + } case SE_TradeSkillMastery: if (newbon->TradeSkillMastery < base1) @@ -3157,19 +3166,28 @@ void Mob::ApplySpellsBonuses(uint16 spell_id, uint8 casterlevel, StatBonuses *ne new_bonus->ReduceFallDamage += effect_value; break; - case SE_ReduceTradeskillFail: + case SE_ReduceTradeskillFail:{ + + if (base2 > HIGHEST_SKILL) + break; + new_bonus->ReduceTradeskillFail[base2] += effect_value; break; + } case SE_TradeSkillMastery: if (new_bonus->TradeSkillMastery < effect_value) new_bonus->TradeSkillMastery = effect_value; break; - case SE_RaiseSkillCap: + case SE_RaiseSkillCap: { + if (base2 > HIGHEST_SKILL) + break; + if (new_bonus->RaiseSkillCap[base2] < effect_value) new_bonus->RaiseSkillCap[base2] = effect_value; break; + } //Special custom cases for loading effects on to NPC from 'npc_spels_effects' table if (IsAISpellEffect) { diff --git a/zone/spells.cpp b/zone/spells.cpp index ce45b6d83..999ab684d 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -750,14 +750,6 @@ bool Client::CheckFizzle(uint16 spell_id) // always at least 1% chance to fail or 5% to succeed fizzlechance = fizzlechance < 1 ? 1 : (fizzlechance > 95 ? 95 : fizzlechance); - /* - if(IsBardSong(spell_id)) - { - //This was a channel chance modifier - no evidence for fizzle reduction - fizzlechance -= GetAA(aaInternalMetronome) * 1.5f; - } - */ - float fizzle_roll = zone->random.Real(0, 100); Log.Out(Logs::Detail, Logs::Spells, "Check Fizzle %s spell %d fizzlechance: %0.2f%% diff: %0.2f roll: %0.2f", GetName(), spell_id, fizzlechance, diff, fizzle_roll);