mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 07:37:01 +00:00
[c12617] Change a default config setting to more fitting
This commit is contained in:
parent
dc3de04d62
commit
e0290b165a
8 changed files with 45 additions and 4 deletions
|
|
@ -213,6 +213,7 @@ DungeonPersistentState::DungeonPersistentState(uint16 MapId, uint32 InstanceId,
|
|||
|
||||
DungeonPersistentState::~DungeonPersistentState()
|
||||
{
|
||||
DEBUG_LOG("Unloading DungeonPersistantState of map %u instance %u", GetMapId(), GetInstanceId());
|
||||
while (!m_playerList.empty())
|
||||
{
|
||||
Player* player = *(m_playerList.begin());
|
||||
|
|
|
|||
|
|
@ -420,6 +420,15 @@ void MotionMaster::MoveDistract(uint32 timer)
|
|||
Mutate(mgen);
|
||||
}
|
||||
|
||||
void MotionMaster::MoveFlyOrLand(uint32 id, float x, float y, float z, bool liftOff)
|
||||
{
|
||||
if (m_owner->GetTypeId() != TYPEID_UNIT)
|
||||
return;
|
||||
|
||||
DEBUG_FILTER_LOG(LOG_FILTER_AI_AND_MOVEGENSS, "%s targeted point for %s (Id: %u X: %f Y: %f Z: %f)", m_owner->GetGuidStr().c_str(), liftOff ? "liftoff" : "landing", id, x, y, z);
|
||||
Mutate(new FlyOrLandMovementGenerator(id, x, y, z, liftOff));
|
||||
}
|
||||
|
||||
void MotionMaster::Mutate(MovementGenerator* m)
|
||||
{
|
||||
if (!empty())
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ class MANGOS_DLL_SPEC MotionMaster : private std::stack<MovementGenerator*>
|
|||
void MoveDistract(uint32 timeLimit);
|
||||
void MoveJump(float x, float y, float z, float horizontalSpeed, float max_height, uint32 id = 0);
|
||||
void MoveFall();
|
||||
void MoveFlyOrLand(uint32 id, float x, float y, float z, bool liftOff);
|
||||
|
||||
MovementGeneratorType GetCurrentMovementGeneratorType() const;
|
||||
|
||||
|
|
|
|||
|
|
@ -141,3 +141,21 @@ void EffectMovementGenerator::Finalize(Unit& unit)
|
|||
unit.GetMotionMaster()->Initialize();
|
||||
}
|
||||
}
|
||||
|
||||
void FlyOrLandMovementGenerator::Initialize(Unit& unit)
|
||||
{
|
||||
if (unit.hasUnitState(UNIT_STAT_CAN_NOT_REACT | UNIT_STAT_NOT_MOVE))
|
||||
return;
|
||||
|
||||
if (!unit.IsStopped())
|
||||
unit.StopMoving();
|
||||
|
||||
float x, y, z;
|
||||
GetDestination(x, y, z);
|
||||
unit.addUnitState(UNIT_STAT_ROAMING | UNIT_STAT_ROAMING_MOVE);
|
||||
Movement::MoveSplineInit init(unit);
|
||||
init.SetFly();
|
||||
init.SetAnimation((m_liftOff ? Movement::FlyToGround : Movement::ToGround));
|
||||
init.MoveTo(x, y, z, false);
|
||||
init.Launch();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,4 +74,16 @@ class EffectMovementGenerator : public MovementGenerator
|
|||
uint32 m_Id;
|
||||
};
|
||||
|
||||
class MANGOS_DLL_SPEC FlyOrLandMovementGenerator : public PointMovementGenerator<Creature>
|
||||
{
|
||||
public:
|
||||
FlyOrLandMovementGenerator(uint32 _id, float _x, float _y, float _z, bool liftOff) :
|
||||
PointMovementGenerator<Creature>(_id, _x, _y, _z, false),
|
||||
m_liftOff(liftOff) {}
|
||||
|
||||
void Initialize(Unit& unit) override;
|
||||
private:
|
||||
bool m_liftOff;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ void World::LoadConfigSettings(bool reload)
|
|||
setConfig(CONFIG_BOOL_INSTANCE_IGNORE_RAID, "Instance.IgnoreRaid", false);
|
||||
|
||||
setConfig(CONFIG_BOOL_CAST_UNSTUCK, "CastUnstuck", true);
|
||||
setConfig(CONFIG_UINT32_MAX_SPELL_CASTS_IN_CHAIN, "MaxSpellCastsInChain", 10);
|
||||
setConfig(CONFIG_UINT32_MAX_SPELL_CASTS_IN_CHAIN, "MaxSpellCastsInChain", 20);
|
||||
setConfig(CONFIG_UINT32_BIRTHDAY_TIME, "BirthdayTime", 1125180000);
|
||||
setConfig(CONFIG_UINT32_RABBIT_DAY, "RabbitDay", 0);
|
||||
|
||||
|
|
|
|||
|
|
@ -573,7 +573,7 @@ LogColors = ""
|
|||
# Max amount triggered spell casts in chain by one caster, prevent stack overflow crash
|
||||
# Too Low value will make some correct triggered casts fail
|
||||
# 0 (no limit)
|
||||
# Default: 10
|
||||
# Default: 20
|
||||
#
|
||||
# BirthdayTime
|
||||
# Set to birthday (date in unix time), By default 28th August 2005, when MaNGOS got it’s name
|
||||
|
|
@ -793,7 +793,7 @@ DisableWaterBreath = 4
|
|||
AllFlightPaths = 0
|
||||
ActivateWeather = 1
|
||||
CastUnstuck = 1
|
||||
MaxSpellCastsInChain = 10
|
||||
MaxSpellCastsInChain = 20
|
||||
BirthdayTime = 1125180000
|
||||
RabbitDay = 0
|
||||
Instance.IgnoreLevel = 0
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "12616"
|
||||
#define REVISION_NR "12617"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue