mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-11 21:01:29 +00:00
[Rules] Rule Gate Pet Zoning (#2625)
Allows preventing pet zoning from happening for more classic servers.
This commit is contained in:
parent
86af0f0759
commit
3872555332
@ -193,6 +193,7 @@ RULE_INT(Character, EnchanterTrackingDistanceMultiplier, 0, "If you want enchant
|
||||
RULE_INT(Character, BeastlordTrackingDistanceMultiplier, 0, "If you want beastlords to be able to track, increase this above 0. 0 disables tracking packets.")
|
||||
RULE_INT(Character, BerserkerTrackingDistanceMultiplier, 0, "If you want berserkers to be able to track, increase this above 0. 0 disables tracking packets.")
|
||||
RULE_BOOL(Character, OnInviteReceiveAlreadyinGroupMessage, true, "If you want clients to receive a message when trying to invite a player into a group that is currently in another group.")
|
||||
RULE_BOOL(Character, PetZoneWithOwner, true, "Should Pets Zone with Owner")
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
RULE_CATEGORY(Mercs)
|
||||
|
||||
@ -1606,28 +1606,32 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app)
|
||||
outapp->priority = 6;
|
||||
FastQueuePacket(&outapp);
|
||||
|
||||
if (m_pp.RestTimer)
|
||||
if (m_pp.RestTimer) {
|
||||
rest_timer.Start(m_pp.RestTimer * 1000);
|
||||
}
|
||||
|
||||
/* Load Pet */
|
||||
database.LoadPetInfo(this);
|
||||
if (m_petinfo.SpellID > 1 && !GetPet() && m_petinfo.SpellID <= SPDAT_RECORDS) {
|
||||
MakePoweredPet(m_petinfo.SpellID, spells[m_petinfo.SpellID].teleport_zone, m_petinfo.petpower, m_petinfo.Name, m_petinfo.size);
|
||||
if (GetPet() && GetPet()->IsNPC()) {
|
||||
NPC *pet = GetPet()->CastToNPC();
|
||||
pet->SetPetState(m_petinfo.Buffs, m_petinfo.Items);
|
||||
pet->CalcBonuses();
|
||||
pet->SetHP(m_petinfo.HP);
|
||||
pet->SetMana(m_petinfo.Mana);
|
||||
if (RuleB(NPC, PetZoneWithOwner)) {
|
||||
/* Load Pet */
|
||||
database.LoadPetInfo(this);
|
||||
if (m_petinfo.SpellID > 1 && !GetPet() && m_petinfo.SpellID <= SPDAT_RECORDS) {
|
||||
MakePoweredPet(m_petinfo.SpellID, spells[m_petinfo.SpellID].teleport_zone, m_petinfo.petpower,
|
||||
m_petinfo.Name, m_petinfo.size);
|
||||
if (GetPet() && GetPet()->IsNPC()) {
|
||||
NPC *pet = GetPet()->CastToNPC();
|
||||
pet->SetPetState(m_petinfo.Buffs, m_petinfo.Items);
|
||||
pet->CalcBonuses();
|
||||
pet->SetHP(m_petinfo.HP);
|
||||
pet->SetMana(m_petinfo.Mana);
|
||||
|
||||
// Taunt persists when zoning on newer clients, overwrite default.
|
||||
if (m_ClientVersionBit & EQ::versions::maskUFAndLater) {
|
||||
if (!firstlogon) {
|
||||
pet->SetTaunting(m_petinfo.taunting);
|
||||
// Taunt persists when zoning on newer clients, overwrite default.
|
||||
if (m_ClientVersionBit & EQ::versions::maskUFAndLater) {
|
||||
if (!firstlogon) {
|
||||
pet->SetTaunting(m_petinfo.taunting);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_petinfo.SpellID = 0;
|
||||
}
|
||||
m_petinfo.SpellID = 0;
|
||||
}
|
||||
/* Moved here so it's after where we load the pet data. */
|
||||
if (!aabonuses.ZoneSuspendMinion && !spellbonuses.ZoneSuspendMinion && !itembonuses.ZoneSuspendMinion) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user