Skip to content

Commit

Permalink
Delete dublicate
Browse files Browse the repository at this point in the history
  • Loading branch information
KamiliaBlow committed Oct 2, 2024
1 parent c11cd8f commit e982160
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 34 deletions.
31 changes: 0 additions & 31 deletions src/server/game/Entities/Unit/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13186,37 +13186,6 @@ bool Unit::SetCanFly(bool enable)
return true;
}

bool Unit::SetCanAdvFly(bool enable)
{
if (enable == HasExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY))
return false;

if (enable)
AddExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY);
else
RemoveExtraUnitMovementFlag2(MOVEMENTFLAG3_CAN_ADV_FLY);

static OpcodeServer const advFlyOpcodeTable[2] =
{
SMSG_MOVE_UNSET_CAN_ADV_FLY,
SMSG_MOVE_SET_CAN_ADV_FLY
};

if (Player* playerMover = Unit::ToPlayer(GetUnitBeingMoved()))
{
WorldPackets::Movement::MoveSetFlag packet(advFlyOpcodeTable[enable]);
packet.MoverGUID = GetGUID();
packet.SequenceIndex = m_movementCounter++;
playerMover->SendDirectMessage(packet.Write());

WorldPackets::Movement::MoveUpdate moveUpdate;
moveUpdate.Status = &m_movementInfo;
SendMessageToSet(moveUpdate.Write(), playerMover);
}

return true;
}

bool Unit::SetWaterWalking(bool enable)
{
if (enable == HasUnitMovementFlag(MOVEMENTFLAG_WATERWALKING))
Expand Down
1 change: 0 additions & 1 deletion src/server/game/Entities/Unit/Unit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,6 @@ class TC_GAME_API Unit : public WorldObject
bool SetFall(bool enable);
bool SetSwim(bool enable);
bool SetCanFly(bool enable);
bool SetCanAdvFly(bool enable);
bool SetWaterWalking(bool enable);
bool SetFeatherFall(bool enable);
bool SetHover(bool enable, bool updateAnimTier = true);
Expand Down
4 changes: 2 additions & 2 deletions src/server/scripts/Custom/custom_script_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
// This is where scripts' loading functions should be declared:

//void AddSC_custom_commandscript();
void AddSC_custom_commandscrip();
//void AddSC_custom_commandscrip();
void AddSC_dragonriding_spell_scripts();
//ROLEPLAY FUNC
void AddSC_free_share_scripts();
Expand All @@ -33,7 +33,7 @@ void AddSC_toy_spell_scripts();
void AddCustomScripts()
{
//AddSC_custom_commandscript();
AddSC_custom_commandscrip();
//AddSC_custom_commandscrip();
AddSC_dragonriding_spell_scripts();
AddSC_toy_spell_scripts();
//ROLEPLAY FUNC
Expand Down

0 comments on commit e982160

Please sign in to comment.