mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 303
Conflicts: src/game/MovementHandler.cpp
This commit is contained in:
commit
4f55ef857a
7 changed files with 41 additions and 16 deletions
|
|
@ -626,7 +626,7 @@ void Channel::Invite(uint64 p, const char *newname)
|
|||
SendToOne(&data, newp->GetGUID());
|
||||
data.clear();
|
||||
}
|
||||
MakePlayerInvited(&data, newp->GetGUID());
|
||||
MakePlayerInvited(&data, newp->GetName());
|
||||
SendToOne(&data, p);
|
||||
}
|
||||
|
||||
|
|
@ -916,13 +916,8 @@ void Channel::MakeNotModerated(WorldPacket *data)
|
|||
}
|
||||
|
||||
// done 0x1D
|
||||
void Channel::MakePlayerInvited(WorldPacket *data, uint64 guid)
|
||||
void Channel::MakePlayerInvited(WorldPacket *data, const std::string& name)
|
||||
{
|
||||
std::string name;
|
||||
|
||||
if(!objmgr.GetPlayerNameByGUID(guid, name) || name.empty())
|
||||
return; // player name not found
|
||||
|
||||
MakeNotifyPacket(data, CHAT_PLAYER_INVITED_NOTICE);
|
||||
*data << name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ class Channel
|
|||
void MakeWrongFaction(WorldPacket *data); //? 0x1A
|
||||
void MakeInvalidName(WorldPacket *data); //? 0x1B
|
||||
void MakeNotModerated(WorldPacket *data); //? 0x1C
|
||||
void MakePlayerInvited(WorldPacket *data, uint64 guid); //+ 0x1D
|
||||
void MakePlayerInvited(WorldPacket *data, const std::string& name); //+ 0x1D
|
||||
void MakePlayerInviteBanned(WorldPacket *data, uint64 guid); //? 0x1E
|
||||
void MakeThrottled(WorldPacket *data); //? 0x1F
|
||||
void MakeNotInArea(WorldPacket *data); //? 0x20
|
||||
|
|
|
|||
|
|
@ -480,6 +480,12 @@ void WorldSession::HandlePlayerLoginOpcode( WorldPacket & recv_data )
|
|||
{
|
||||
CHECK_PACKET_SIZE(recv_data,8);
|
||||
|
||||
if(PlayerLoading() || GetPlayer() != NULL)
|
||||
{
|
||||
sLog.outError("Player tryes to login again, AccountId = %d",GetAccountId());
|
||||
return;
|
||||
}
|
||||
|
||||
m_playerLoading = true;
|
||||
uint64 playerGuid = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -317,7 +317,7 @@ void WorldSession::HandleMovementOpcodes( WorldPacket & recv_data )
|
|||
}
|
||||
}
|
||||
|
||||
if (GetPlayer()->m_lastFallTime >= movementInfo.fallTime || GetPlayer()->m_lastFallZ <=movementInfo.z)
|
||||
if (GetPlayer()->m_lastFallTime >= movementInfo.fallTime || GetPlayer()->m_lastFallZ <=movementInfo.z || recv_data.GetOpcode() == MSG_MOVE_FALL_LAND)
|
||||
GetPlayer()->SetFallInformation(movementInfo.fallTime, movementInfo.z);
|
||||
|
||||
if(GetPlayer()->isMovingOrTurning())
|
||||
|
|
|
|||
|
|
@ -4605,6 +4605,8 @@ uint8 Spell::CheckItems()
|
|||
uint32 ItemClass = proto->Class;
|
||||
if (ItemClass == ITEM_CLASS_CONSUMABLE && m_targets.getUnitTarget())
|
||||
{
|
||||
// such items should only fail if there is no suitable effect at all - see Rejuvenation Potions for example
|
||||
uint8 failReason = 0;
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
// skip check, pet not required like checks, and for TARGET_PET m_targets.getUnitTarget() is not the real target but the caster
|
||||
|
|
@ -4612,22 +4614,44 @@ uint8 Spell::CheckItems()
|
|||
continue;
|
||||
|
||||
if (m_spellInfo->Effect[i] == SPELL_EFFECT_HEAL)
|
||||
{
|
||||
if (m_targets.getUnitTarget()->GetHealth() == m_targets.getUnitTarget()->GetMaxHealth())
|
||||
return (uint8)SPELL_FAILED_ALREADY_AT_FULL_HEALTH;
|
||||
{
|
||||
failReason = (uint8)SPELL_FAILED_ALREADY_AT_FULL_HEALTH;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
failReason = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Mana Potion, Rage Potion, Thistle Tea(Rogue), ...
|
||||
if (m_spellInfo->Effect[i] == SPELL_EFFECT_ENERGIZE)
|
||||
{
|
||||
if(m_spellInfo->EffectMiscValue[i] < 0 || m_spellInfo->EffectMiscValue[i] >= MAX_POWERS)
|
||||
return (uint8)SPELL_FAILED_ALREADY_AT_FULL_POWER;
|
||||
{
|
||||
failReason = (uint8)SPELL_FAILED_ALREADY_AT_FULL_POWER;
|
||||
continue;
|
||||
}
|
||||
|
||||
Powers power = Powers(m_spellInfo->EffectMiscValue[i]);
|
||||
|
||||
if (m_targets.getUnitTarget()->GetPower(power) == m_targets.getUnitTarget()->GetMaxPower(power))
|
||||
return (uint8)SPELL_FAILED_ALREADY_AT_FULL_POWER;
|
||||
{
|
||||
failReason = (uint8)SPELL_FAILED_ALREADY_AT_FULL_POWER;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
failReason = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (failReason)
|
||||
return failReason;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ enum LoginResult
|
|||
|
||||
// we need to stick to 1 version or half of the stuff will work for someone
|
||||
// others will not and opposite
|
||||
// will only support WoW and WoW:TBC 3.0.3 client build 9155, 9174, 9183, 9328...
|
||||
// will only support WoW and WoW:TBC 3.0.3 client build 9155, 9174, 9183, 9355...
|
||||
|
||||
#define EXPECTED_MANGOS_CLIENT_BUILD {9155, 9174, 9183, 9328, 0}
|
||||
#define EXPECTED_MANGOS_CLIENT_BUILD {9155, 9174, 9183, 9355, 0}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "6902"
|
||||
#define REVISION_NR "6905"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue