diff --git a/src/game/Channel.cpp b/src/game/Channel.cpp index 22c1a5b1a..d1dee730c 100644 --- a/src/game/Channel.cpp +++ b/src/game/Channel.cpp @@ -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; } diff --git a/src/game/Channel.h b/src/game/Channel.h index c3214f824..55ebf57ea 100644 --- a/src/game/Channel.h +++ b/src/game/Channel.h @@ -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 diff --git a/src/game/CharacterHandler.cpp b/src/game/CharacterHandler.cpp index f43fef017..30a90f23b 100644 --- a/src/game/CharacterHandler.cpp +++ b/src/game/CharacterHandler.cpp @@ -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; diff --git a/src/game/MovementHandler.cpp b/src/game/MovementHandler.cpp index 99e6a5aae..01b217f1c 100644 --- a/src/game/MovementHandler.cpp +++ b/src/game/MovementHandler.cpp @@ -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()) diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 865b22e47..297ddf6be 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -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,21 +4614,43 @@ 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; } } } diff --git a/src/realmd/AuthCodes.h b/src/realmd/AuthCodes.h index 19ea32071..630b50948 100644 --- a/src/realmd/AuthCodes.h +++ b/src/realmd/AuthCodes.h @@ -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 diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f3c8a6fdf..756f31327 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "6902" + #define REVISION_NR "6905" #endif // __REVISION_NR_H__