From eaf5cea90893eb44e5b5e5caec2d487d07e61531 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Sat, 14 Feb 2015 10:29:43 -0500 Subject: [PATCH 1/5] Fixed a comment --- zone/command.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/command.cpp b/zone/command.cpp index f54db9a75..f175ce1c1 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -28,7 +28,7 @@ set to nullptr and 0 respectively since they aren't used when adding an alias. The function pointers being equal is makes it an alias. The access level you set with command_add is only a default if - the command isn't listed in the addon.ini file. + the command isn't listed in the commands db table. */ From f9dbea531c937e380b9241fbd63190fcf0cd7a38 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 16 Feb 2015 17:14:29 -0500 Subject: [PATCH 2/5] Added note about augs to changelog --- changelog.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/changelog.txt b/changelog.txt index 88180df59..a429579ab 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,9 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/09/2015 == +Noudess: Placing an aug tagged as magical onto a non-magical weapon now allows +the resulting weapon to hit creatures requiring magical creatures. Seems like +the correct thing, as the weapon is marked as magical. == 01/31/2015 == Trevius: Fixed FindGroundZ() and GetGroundZ() to once again utilize the X and Y arguments that are passed to them. From fe77c6fb3f69df4daba9131eada5fc7867504cdb Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Wed, 18 Feb 2015 16:26:48 -0500 Subject: [PATCH 3/5] Updated change log and made changes to worlddb.cpp so paineel characters start in paineel again on Titanium. --- changelog.txt | 3 +++ world/worlddb.cpp | 8 ++++++++ 2 files changed, 11 insertions(+) diff --git a/changelog.txt b/changelog.txt index a429579ab..9db99cc58 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/18/2015 == +Noudess: Starting erudites that were supposed to start in paineel were landing +in erudin on Titanium. Fixed to be paineel. == 02/09/2015 == Noudess: Placing an aug tagged as magical onto a non-magical weapon now allows the resulting weapon to hit creatures requiring magical creatures. Seems like diff --git a/world/worlddb.cpp b/world/worlddb.cpp index 223ae89d6..27093e2ea 100644 --- a/world/worlddb.cpp +++ b/world/worlddb.cpp @@ -348,8 +348,16 @@ void WorldDatabase::SetTitaniumDefaultStartZone(PlayerProfile_Struct* in_pp, Cha { case 0: { + if (in_cc->deity == 203) // Cazie erudites go to paineel + { + in_pp->zone_id = 75; // paineel + in_pp->binds[0].zoneId = 75; // paineel + } + else + { in_pp->zone_id = 24; // erudnext in_pp->binds[0].zoneId = 38; // tox + } break; } case 1: From ba49e5f696da69176a89c5dfd50181b17205f458 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 23 Feb 2015 13:32:10 -0500 Subject: [PATCH 4/5] Allow servers to set starting value for swimming instead of the hard coded value. --- changelog.txt | 6 ++++++ common/ruletypes.h | 1 + world/client.cpp | 7 +++++++ zone/client_packet.cpp | 4 ---- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/changelog.txt b/changelog.txt index f12dfd0ae..e27e7f44a 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,11 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- +== 02/23/2015 == +Noudess: Allow for a rule to set starting swimming value. +If the rule does not exist, it uses the old hard coded overrides. I moved +the swimming override to char create instead of setting it every time a char +enters a zone. + == 02/21/2015 == Noudess: Starting erudites that were supposed to start in paineel were landing in erudin on Titanium. Fixed to be paineel. diff --git a/common/ruletypes.h b/common/ruletypes.h index 12a8a0737..7be048385 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -133,6 +133,7 @@ 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_INT ( Skills, SwimmingStartValue, 100 ) RULE_CATEGORY_END() RULE_CATEGORY( Pets ) diff --git a/world/client.cpp b/world/client.cpp index 540dfa683..2fbb6ffb9 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1430,6 +1430,13 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) SetClassStartingSkills(&pp); SetClassLanguages(&pp); pp.skills[SkillSenseHeading] = 200; + + // Allow server to force swimming training from a configured level + std::string value; + bool userule; + userule=RuleManager::Instance()->GetRule("Skills:SwimmingStartValue", value); + pp.skills[SkillSwimming] = (userule) ? atoi(value.c_str()) : 100; + // strcpy(pp.servername, WorldConfig::get()->ShortName.c_str()); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index f93f83018..bd856fc45 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1431,10 +1431,6 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) if (m_pp.ldon_points_tak < 0 || m_pp.ldon_points_tak > 2000000000){ m_pp.ldon_points_tak = 0; } if (m_pp.ldon_points_available < 0 || m_pp.ldon_points_available > 2000000000){ m_pp.ldon_points_available = 0; } - /* Set Swimming Skill 100 by default if under 100 */ - if (GetSkill(SkillSwimming) < 100) - SetSkill(SkillSwimming, 100); - /* Initialize AA's : Move to function eventually */ for (uint32 a = 0; a < MAX_PP_AA_ARRAY; a++){ aa[a] = &m_pp.aa_array[a]; } query = StringFormat( From 221c1f17c7e9b2489d12815579a579083c280c6b Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Mon, 23 Feb 2015 19:03:28 -0500 Subject: [PATCH 5/5] Streamline changes for Swimming Rule and add Sense Heading rules --- changelog.txt | 10 ++++++---- common/ruletypes.h | 2 ++ world/client.cpp | 8 ++------ zone/client_packet.cpp | 29 ++++++++++++++++++++++++++++- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/changelog.txt b/changelog.txt index e27e7f44a..f2fe06150 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,10 +1,12 @@ EQEMu Changelog (Started on Sept 24, 2003 15:50) ------------------------------------------------------- == 02/23/2015 == -Noudess: Allow for a rule to set starting swimming value. -If the rule does not exist, it uses the old hard coded overrides. I moved -the swimming override to char create instead of setting it every time a char -enters a zone. +Noudess: Allow for a rule to set starting swimming && SenseHeading value. +I moved the swimming override to char create instead of setting it +every time a char enters a zone. + +Also added rules to not ignore, but rather forrce sense heading packets to be +used to train it instead of maxing it out like before. == 02/21/2015 == Noudess: Starting erudites that were supposed to start in paineel were landing in erudin on Titanium. Fixed to be paineel. diff --git a/common/ruletypes.h b/common/ruletypes.h index 7be048385..7894c5ebd 100644 --- a/common/ruletypes.h +++ b/common/ruletypes.h @@ -134,6 +134,8 @@ 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_INT ( Skills, SwimmingStartValue, 100 ) +RULE_BOOL ( Skills, TrainSenseHeading, false ) +RULE_INT ( Skills, SenseHeadingStartValue, 200 ) RULE_CATEGORY_END() RULE_CATEGORY( Pets ) diff --git a/world/client.cpp b/world/client.cpp index 2fbb6ffb9..1cf88d481 100644 --- a/world/client.cpp +++ b/world/client.cpp @@ -1429,13 +1429,9 @@ bool Client::OPCharCreate(char *name, CharCreate_Struct *cc) SetRaceStartingSkills(&pp); SetClassStartingSkills(&pp); SetClassLanguages(&pp); - pp.skills[SkillSenseHeading] = 200; - // Allow server to force swimming training from a configured level - std::string value; - bool userule; - userule=RuleManager::Instance()->GetRule("Skills:SwimmingStartValue", value); - pp.skills[SkillSwimming] = (userule) ? atoi(value.c_str()) : 100; + pp.skills[SkillSwimming] = RuleI(Skills, SwimmingStartValue); + pp.skills[SkillSenseHeading] = RuleI(Skills, SenseHeadingStartValue); // strcpy(pp.servername, WorldConfig::get()->ShortName.c_str()); diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index bd856fc45..29abadb61 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -332,7 +332,13 @@ void MapOpcodes() ConnectedOpcodes[OP_Save] = &Client::Handle_OP_Save; ConnectedOpcodes[OP_SaveOnZoneReq] = &Client::Handle_OP_SaveOnZoneReq; ConnectedOpcodes[OP_SelectTribute] = &Client::Handle_OP_SelectTribute; - ConnectedOpcodes[OP_SenseHeading] = &Client::Handle_OP_Ignore; + + // Use or Ignore sense heading based on rule. + bool train=RuleB(Skills, TrainSenseHeading); + + ConnectedOpcodes[OP_SenseHeading] = + (train) ? &Client::Handle_OP_SenseHeading : &Client::Handle_OP_Ignore; + ConnectedOpcodes[OP_SenseTraps] = &Client::Handle_OP_SenseTraps; ConnectedOpcodes[OP_SetGuildMOTD] = &Client::Handle_OP_SetGuildMOTD; ConnectedOpcodes[OP_SetRunMode] = &Client::Handle_OP_SetRunMode; @@ -11648,6 +11654,27 @@ void Client::Handle_OP_SelectTribute(const EQApplicationPacket *app) return; } +void Client::Handle_OP_SenseHeading(const EQApplicationPacket *app) +{ + if (!HasSkill(SkillSenseHeading)) + return; + + int chancemod=0; + + // The client seems to limit sense heading packets based on skill + // level. So if we're really low, we don't hit this routine very often. + // I think it's the GUI deciding when to skill you up. + // So, I'm adding a mod here which is larger at lower levels so + // very low levels get a much better chance to skill up when the GUI + // eventually sends a message. + if (GetLevel() <= 8) + chancemod += (9-level) * 10; + + CheckIncreaseSkill(SkillSenseHeading, nullptr, chancemod); + + return; +} + void Client::Handle_OP_SenseTraps(const EQApplicationPacket *app) { if (!HasSkill(SkillSenseTraps))