Skip to content

Commit e13c866

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-base_patch
2 parents 8eaec8a + 67ac5e4 commit e13c866

5 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/server/game/Entities/Player/Player.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,6 +1858,7 @@ class TC_GAME_API Player : public Unit, public GridObject<Player>
18581858

18591859
void SetDrunkValue(uint8 newDrunkValue, uint32 itemId = 0);
18601860
uint8 GetDrunkValue() const { return GetByteValue(PLAYER_BYTES_3, PLAYER_BYTES_3_OFFSET_INEBRIATION); }
1861+
void ApplyModFakeDrunkValue(int32 mod, bool apply) { ApplyModInt32Value(PLAYER_FAKE_INEBRIATION, mod, apply); }
18611862
int32 GetFakeDrunkValue() const { return GetInt32Value(PLAYER_FAKE_INEBRIATION); }
18621863
void UpdateInvisibilityDrunkDetect();
18631864
static DrunkenState GetDrunkenstateByValue(uint8 value);

src/server/game/Entities/Unit/Unit.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include "Object.h"
2222
#include "CombatManager.h"
2323
#include "SpellAuraDefines.h"
24-
#include "PetDefines.h"
2524
#include "ThreatManager.h"
2625
#include "Timer.h"
2726
#include "UnitDefines.h"
@@ -94,6 +93,8 @@ class UnitAura;
9493
class Vehicle;
9594
class VehicleJoinEvent;
9695

96+
enum PetAction : int32;
97+
enum class PetActionFeedback : uint8;
9798
enum MovementGeneratorType : uint8;
9899
enum ZLiquidStatus : uint32;
99100

src/server/game/Movement/MotionMaster.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,9 +1168,9 @@ void MotionMaster::DirectAdd(MovementGenerator* movement, MovementSlot slot/* =
11681168
{
11691169
if (!_generators.empty())
11701170
{
1171-
auto where = _generators.find(movement); // find movement with equal priority
1171+
auto where = _generators.lower_bound(movement); // find movement with equal priority
11721172
bool replacesExisting = !movement->HasFlag(MOVEMENTGENERATOR_FLAG_IMMEDIATE)
1173-
&& where != _generators.end();
1173+
&& where != _generators.end() && !_generators.key_comp()(movement, *where);
11741174
auto top = _generators.begin();
11751175
if (replacesExisting)
11761176
Remove(where, where == top, false);

src/server/game/Spells/Auras/SpellAuraEffects.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4911,7 +4911,7 @@ void AuraEffect::HandleAuraModFakeInebriation(AuraApplication const* aurApp, uin
49114911
if (!target)
49124912
return;
49134913

4914-
target->ApplyModInt32Value(PLAYER_FAKE_INEBRIATION, GetAmount(), apply);
4914+
target->ApplyModFakeDrunkValue(GetAmount(), apply);
49154915
target->UpdateInvisibilityDrunkDetect();
49164916
}
49174917

src/server/game/Spells/SpellEffects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3886,7 +3886,7 @@ void Spell::EffectInebriate()
38863886
if (effectHandleMode != SPELL_EFFECT_HANDLE_HIT_TARGET)
38873887
return;
38883888

3889-
if (!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
3889+
if (!unitTarget || !unitTarget->IsPlayer())
38903890
return;
38913891

38923892
Player* player = unitTarget->ToPlayer();
@@ -3908,7 +3908,7 @@ void Spell::EffectInebriate()
39083908

39093909
player->SetDrunkValue(currentDrunk, m_CastItem ? m_CastItem->GetEntry() : 0);
39103910

3911-
if (currentDrunk == 100 && roll_chance_i(25))
3911+
if (currentDrunk == 100 && drunkMod > 0 && roll_chance_i(25))
39123912
player->CastSpell(player, 67468, false); // Drunken Vomit
39133913
}
39143914

0 commit comments

Comments
 (0)