mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-31 00:46:46 +00:00
Streamline changes for Swimming Rule and add Sense Heading rules
This commit is contained in:
+28
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user