mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
Merge branch 'master' into 303
Conflicts: contrib/extractor/System.cpp contrib/extractor/ad.exe src/game/WorldSocket.cpp
This commit is contained in:
commit
78ec66babc
78 changed files with 510 additions and 752 deletions
|
|
@ -479,6 +479,8 @@ void Player::CleanupsBeforeDelete()
|
|||
|
||||
bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_, uint8 gender, uint8 skin, uint8 face, uint8 hairStyle, uint8 hairColor, uint8 facialHair, uint8 outfitId )
|
||||
{
|
||||
//FIXME: outfitId not used in player creating
|
||||
|
||||
Object::_Create(guidlow, 0, HIGHGUID_PLAYER);
|
||||
|
||||
m_name = name;
|
||||
|
|
@ -1489,7 +1491,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
// The player was ported to another map and looses the duel immediatly.
|
||||
// We have to perform this check before the teleport, otherwise the
|
||||
// ObjectAccessor won't find the flag.
|
||||
if (duel && this->GetMapId()!=mapid)
|
||||
if (duel && GetMapId()!=mapid)
|
||||
{
|
||||
GameObject* obj = ObjectAccessor::GetGameObject(*this, GetUInt64Value(PLAYER_DUEL_ARBITER));
|
||||
if (obj)
|
||||
|
|
@ -1499,7 +1501,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
|
|||
// reset movement flags at teleport, because player will continue move with these flags after teleport
|
||||
SetUnitMovementFlags(0);
|
||||
|
||||
if ((this->GetMapId() == mapid) && (!m_transport))
|
||||
if ((GetMapId() == mapid) && (!m_transport))
|
||||
{
|
||||
// prepare zone change detect
|
||||
uint32 old_zone = GetZoneId();
|
||||
|
|
@ -3526,7 +3528,7 @@ void Player::DeleteFromDB(uint64 playerguid, uint32 accountId, bool updateRealmC
|
|||
|
||||
uint32 pl_account = objmgr.GetPlayerAccountIdByGUID(MAKE_NEW_GUID(guid, 0, HIGHGUID_PLAYER));
|
||||
|
||||
WorldSession::SendReturnToSender(MAIL_NORMAL, pl_account, guid, sender, subject, itemTextId, &mi, money, 0, mailTemplateId);
|
||||
WorldSession::SendReturnToSender(MAIL_NORMAL, pl_account, guid, sender, subject, itemTextId, &mi, money, mailTemplateId);
|
||||
}
|
||||
while (resultMail->NextRow());
|
||||
|
||||
|
|
@ -3655,13 +3657,14 @@ void Player::BuildPlayerRepop()
|
|||
|
||||
void Player::SendDelayResponse(const uint32 ml_seconds)
|
||||
{
|
||||
//FIXME: is this delay time arg really need? 50msec by default in code
|
||||
WorldPacket data( SMSG_QUERY_TIME_RESPONSE, 4+4 );
|
||||
data << (uint32)time(NULL);
|
||||
data << (uint32)0;
|
||||
GetSession()->SendPacket( &data );
|
||||
}
|
||||
|
||||
void Player::ResurrectPlayer(float restore_percent, bool updateToWorld, bool applySickness)
|
||||
void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
{
|
||||
WorldPacket data(SMSG_DEATH_RELEASE_LOC, 4*4); // remove spirit healer position
|
||||
data << uint32(-1);
|
||||
|
|
@ -4192,7 +4195,7 @@ void Player::UpdateDefense()
|
|||
}
|
||||
}
|
||||
|
||||
void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply, bool affectStats)
|
||||
void Player::HandleBaseModValue(BaseModGroup modGroup, BaseModType modType, float amount, bool apply)
|
||||
{
|
||||
if(modGroup >= BASEMOD_END || modType >= MOD_END)
|
||||
{
|
||||
|
|
@ -5880,7 +5883,6 @@ bool Player::RewardHonor(Unit *uVictim, uint32 groupsize, float honor)
|
|||
|
||||
uint64 victim_guid = 0;
|
||||
uint32 victim_rank = 0;
|
||||
time_t now = time(NULL);
|
||||
|
||||
// need call before fields update to have chance move yesterday data to appropriate fields before today data change.
|
||||
UpdateHonorFields();
|
||||
|
|
@ -6840,7 +6842,7 @@ void Player::CastItemCombatSpell(Item *item,Unit* Target, WeaponAttackType attTy
|
|||
}
|
||||
|
||||
if (roll_chance_f(chance))
|
||||
this->CastSpell(Target, spellInfo->Id, true, item);
|
||||
CastSpell(Target, spellInfo->Id, true, item);
|
||||
}
|
||||
|
||||
// item combat enchantments
|
||||
|
|
@ -10510,8 +10512,6 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
|
|||
if(pItem->HasFlag(ITEM_FIELD_FLAGS, ITEM_FLAGS_WRAPPED))
|
||||
CharacterDatabase.PExecute("DELETE FROM character_gifts WHERE item_guid = '%u'", pItem->GetGUIDLow());
|
||||
|
||||
ItemPrototype const *pProto = pItem->GetProto();
|
||||
|
||||
RemoveEnchantmentDurations(pItem);
|
||||
RemoveItemDurations(pItem);
|
||||
|
||||
|
|
@ -17725,7 +17725,7 @@ void Player::learnSkillRewardedSpells(uint32 skill_id )
|
|||
if (pAbility->classmask && !(pAbility->classmask & classMask))
|
||||
continue;
|
||||
|
||||
if (SpellEntry const* spellentry = sSpellStore.LookupEntry(pAbility->spellId))
|
||||
if (sSpellStore.LookupEntry(pAbility->spellId))
|
||||
{
|
||||
// Ok need learn spell
|
||||
learnSpell(pAbility->spellId);
|
||||
|
|
@ -18495,7 +18495,7 @@ void Player::SetCanBlock( bool value )
|
|||
bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
|
||||
{
|
||||
for(ItemPosCountVec::const_iterator itr = vec.begin(); itr != vec.end();++itr)
|
||||
if(itr->pos == this->pos)
|
||||
if(itr->pos == pos)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue