mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-01 15:46:37 +00:00
Implement OP_CancelSneakHide
Didn't test every client, but they should all work
This commit is contained in:
@@ -834,6 +834,7 @@ public:
|
||||
eqFilterMode GetFilter(eqFilterType filter_id) const { return ClientFilters[filter_id]; }
|
||||
void SetFilter(eqFilterType filter_id, eqFilterMode value) { ClientFilters[filter_id]=value; }
|
||||
|
||||
void CancelSneakHide();
|
||||
void BreakInvis();
|
||||
void BreakSneakWhenCastOn(Mob* caster, bool IsResisted);
|
||||
void BreakFeignDeathWhenCastOn(bool IsResisted);
|
||||
|
||||
@@ -7871,6 +7871,14 @@ void Client::Handle_OP_Heartbeat(const EQApplicationPacket *app)
|
||||
|
||||
void Client::Handle_OP_Hide(const EQApplicationPacket *app)
|
||||
{
|
||||
// newer client respond to OP_CancelSneakHide with OP_Hide with a size of 4 and 0 data
|
||||
if (app->size == 4) {
|
||||
auto data = app->ReadUInt32(0);
|
||||
if (data)
|
||||
Log.Out(Logs::Detail, Logs::None, "Got OP_Hide with unexpected data %d", data);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!HasSkill(EQEmu::skills::SkillHide) && GetSkill(EQEmu::skills::SkillHide) == 0)
|
||||
{
|
||||
//Can not be able to train hide but still have it from racial though
|
||||
|
||||
@@ -1127,6 +1127,21 @@ void Client::OPMemorizeSpell(const EQApplicationPacket* app)
|
||||
Save();
|
||||
}
|
||||
|
||||
void Client::CancelSneakHide()
|
||||
{
|
||||
if (hidden || improved_hidden) {
|
||||
auto app = new EQApplicationPacket(OP_CancelSneakHide, 0);
|
||||
FastQueuePacket(&app);
|
||||
// SoF and Tit send back a OP_SpawnAppearance turning off AT_Invis
|
||||
// so we need to handle our sneaking flag only
|
||||
// The later clients send back a OP_Hide (this has a size but data is 0)
|
||||
// as well as OP_SpawnAppearance with AT_Invis and one with AT_Sneak
|
||||
// So we don't have to handle any of those flags
|
||||
if (ClientVersionBit() & EQEmu::versions::bit_SoFAndEarlier)
|
||||
sneaking = false;
|
||||
}
|
||||
}
|
||||
|
||||
void Client::BreakInvis()
|
||||
{
|
||||
if (invisible)
|
||||
|
||||
+7
-3
@@ -5854,10 +5854,8 @@ int Mob::CheckBaneDamage(const ItemInst *item)
|
||||
return damage;
|
||||
}
|
||||
|
||||
void Mob::CommonBreakInvisible()
|
||||
void Mob::CancelSneakHide()
|
||||
{
|
||||
BreakInvisibleSpells();
|
||||
|
||||
if (hidden || improved_hidden) {
|
||||
hidden = false;
|
||||
improved_hidden = false;
|
||||
@@ -5871,6 +5869,12 @@ void Mob::CommonBreakInvisible()
|
||||
}
|
||||
}
|
||||
|
||||
void Mob::CommonBreakInvisible()
|
||||
{
|
||||
BreakInvisibleSpells();
|
||||
CancelSneakHide();
|
||||
}
|
||||
|
||||
#ifdef BOTS
|
||||
bool Mob::JoinHealRotationTargetPool(std::shared_ptr<HealRotation>* heal_rotation)
|
||||
{
|
||||
|
||||
@@ -173,6 +173,7 @@ public:
|
||||
void RogueEvade(Mob *other);
|
||||
void CommonOutgoingHitSuccess(Mob* defender, int32 &damage, EQEmu::skills::SkillType skillInUse, ExtraAttackOptions *opts = nullptr);
|
||||
void BreakInvisibleSpells();
|
||||
virtual void CancelSneakHide();
|
||||
void CommonBreakInvisible();
|
||||
void CommonBreakInvisibleFromCombat();
|
||||
bool HasDied();
|
||||
|
||||
Reference in New Issue
Block a user