Streamline changes for Swimming Rule and add Sense Heading rules

This commit is contained in:
Paul Coene 2015-02-23 19:03:28 -05:00
parent ba49e5f696
commit 221c1f17c7
4 changed files with 38 additions and 11 deletions

View File

@ -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.

View File

@ -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 )

View File

@ -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());

View File

@ -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))