Jump to content

Vinolentus

Members
  • Posts

    22
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Vinolentus's Achievements

Member

Member (2/3)

0

Reputation

  1. Current Creature::CanInitiateAttack() returns true if creature has CREATURE_FLAG_EXTRA_CIVILIAN, but has no UNIT_FLAG_PASSIVE. If we should not use CREATURE_FLAG_EXTRA_CIVILIAN without UNIT_FLAG_PASSIVE - what for is that extraflag needed at all?
  2. * What bug does the patch fix? What features does the patch add? SqlStatement::addBool() is not working currently. http://bugs.mysql.com/bug.php?id=20169* For which repository revision was the patch created? 11797 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. No. * Who has been writing this patch? Please include either forum user names or email addresses. Me https://gist.github.com/1225753
  3. * What bug does the patch fix? What features does the patch add? Correct phasemask was not applied due to Player::SetPhaseMask() check. We should firstly remove GM extraflag. * For which repository revision was the patch created? 11778 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. Did not find any. * Who has been writing this patch? Please include either forum user names or email addresses. Me. diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 75432f3..4cd5b8c 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -2437,17 +2437,18 @@ void Player::SetGameMaster(bool on) } else { + m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON; + // restore phase AuraList const& phases = GetAurasByType(SPELL_AURA_PHASE); SetPhaseMask(!phases.empty() ? phases.front()->GetMiscValue() : PHASEMASK_NORMAL,false); - m_ExtraFlags &= ~ PLAYER_EXTRA_GM_ON; setFactionForRace(getRace()); RemoveFlag(PLAYER_FLAGS, PLAYER_FLAGS_GM);
  4. diff --git a/src/game/PetHandler.cpp b/src/game/PetHandler.cpp index 3f5a0d9..79b7ecf 100644 --- a/src/game/PetHandler.cpp +++ b/src/game/PetHandler.cpp @@ -399,7 +399,7 @@ void WorldSession::HandlePetAbandon(WorldPacket& recv_data) if(pet->GetObjectGuid() == GetPlayer()->GetPetGuid()) { uint32 feelty = pet->GetPower(POWER_HAPPINESS); - pet->SetPower(POWER_HAPPINESS, (feelty - 50000) > 0 ? (feelty - 50000) : 0); + pet->SetPower(POWER_HAPPINESS, feelty > 50000 ? feelty - 50000 : 0); } GetPlayer()->RemovePet(PET_SAVE_AS_DELETED);
  5. * What bug does the patch fix? What features does the patch add? http://msdn.microsoft.com/en-us/library/2ts7cx93.aspx http://msdn.microsoft.com/en-us/library/1kt27hek.aspx * For which repository revision was the patch created? 11741 * Is there a thread in the bug report section or at lighthouse? If yes, please add a link to the thread. No. * Who has been writing this patch? Please include either forum user names or email addresses. Me. https://gist.github.com/1087268
  6. Shouldn't GO_FLAG_INTERACT_COND be here too? https://gist.github.com/1042649
  7. bool WardenSvcHandler::_HandleRegisterRep() { ... WorldSession* session = sWorld.FindSession(accountId); if (moduleLen == 0) { session->GetWardenTimer().SetInterval(5*IN_MILLISECONDS); session->GetWardenTimer().Reset(); // We will retry in 5 seconds return true; } else if (moduleLen == 0xFFFFFFFF) { session->SetWardenStatus(WARD_STATUS_USER_DISABLED); DEBUG_LOG("Disabling warden for account %u since not Windows platform", accountId); return true; } ... } session can be NULL here.
  8. eg, should fix Creature::CanInitiateAttack() diff --git a/src/game/Creature.h b/src/game/Creature.h index c19c386..3c034da 100644 --- a/src/game/Creature.h +++ b/src/game/Creature.h @@ -620,6 +620,11 @@ class MANGOS_DLL_SPEC Creature : public Unit bool CanAssistTo(const Unit* u, const Unit* enemy, bool checkfaction = true) const; bool CanInitiateAttack(); + bool isPassiveToHostile() + { + return (IsCivilian() || Unit::isPassiveToHostile()); + } + MovementGeneratorType GetDefaultMovementType() const { return m_defaultMovementType; } void SetDefaultMovementType(MovementGeneratorType mgt) { m_defaultMovementType = mgt; } diff --git a/src/game/Unit.h b/src/game/Unit.h index d279a32..148b814 100644 --- a/src/game/Unit.h +++ b/src/game/Unit.h @@ -1453,7 +1453,8 @@ class MANGOS_DLL_SPEC Unit : public WorldObject void RemoveSpellbyDamageTaken(AuraType auraType, uint32 damage); bool isTargetableForAttack(bool inversAlive = false) const; - bool isPassiveToHostile() { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } + // overwrited in Creature + virtual bool isPassiveToHostile() { return HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); } virtual bool IsInWater() const; virtual bool IsUnderWater() const;
  9. diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 7ddd159..5c8e93a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -2465,7 +2465,7 @@ void ObjectMgr::LoadItemPrototypes() void ObjectMgr::LoadItemConverts() { - m_ItemRequiredTarget.clear(); // needed for reload case + m_ItemConvert.clear(); // needed for reload case uint32 count = 0;
  10. diff --git a/src/game/Pet.h b/src/game/Pet.h index 9b81b08..a5e3971 100644 --- a/src/game/Pet.h +++ b/src/game/Pet.h @@ -260,7 +260,7 @@ class Pet : public Creature private: PetModeFlags m_petModeFlags; - void SaveToDB(uint32, uint8) // overwrited of Creature::SaveToDB - don't must be called + void SaveToDB(uint32, uint8, uint32) // overwrited of Creature::SaveToDB - don't must be called { MANGOS_ASSERT(false); }
  11. better use special function that check is creature spawned staticly Of course. I just forgot about it's existence.
  12. We ignore other format values at loading and it is expected to ignore them here, not increment offset. diff --git a/src/shared/Database/SQLStorage.cpp b/src/shared/Database/SQLStorage.cpp index c33530b..287a00e 100644 --- a/src/shared/Database/SQLStorage.cpp +++ b/src/shared/Database/SQLStorage.cpp @@ -44,21 +44,31 @@ void SQLStorage::Free () { uint32 offset=0; for(uint32 x=0;x<iNumFields;x++) - if (dst_format[x]==FT_STRING) + { + switch (dst_format[x]) { - for(uint32 y=0;y<MaxEntry;y++) - if(pIndex[y]) - delete [] *(char**)((char*)(pIndex[y])+offset); + case FT_STRING: + { + for(uint32 y = 0; y < MaxEntry; ++y) + if(pIndex[y]) + delete [] *(char**)((char*)(pIndex[y])+offset); - offset += sizeof(char*); + offset += sizeof(char*); + break; + } + case FT_LOGIC: + offset += sizeof(bool); break; + case FT_BYTE: + offset += sizeof(char); break; + case FT_INT: + offset += sizeof(uint32); break; + case FT_FLOAT: + offset += sizeof(float); break; + + default: break; } - else if (dst_format[x]==FT_LOGIC) - offset += sizeof(bool); - else if (dst_format[x]==FT_BYTE) - offset += sizeof(char); - else - offset += 4; + } delete [] pIndex; delete [] data; }
  13. @@ -1509,7 +1509,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data ) DEBUG_LOG("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK"); //recv_data.hexlike(); - ObjectGuid guid; // guid - unused + ObjectGuid guid; MovementInfo movementInfo; recv_data >> guid.ReadAsPacked(); @@ -1517,7 +1517,22 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data ) recv_data >> movementInfo; recv_data >> Unused<float>(); // unk2 - _player->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags()); + Unit * target; + if (_player->GetObjectGuid() == guid) + target = _player; + + else if (!_player->IsSelfMover() && _player->GetMover()->GetObjectGuid() == guid) + target = _player->GetMover(); + + else + { + DEBUG_LOG("WorldSession::HandleMoveSetCanFlyAckOpcode: player %s, " + "mover %s, received %s", _player->GetGuidStr().c_str(), + _player->GetMover()->GetGuidStr().c_str(), guid.GetString().c_str()); + return; + } + + target->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags()); } void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */) Should also fix unexpected Spell::cancel() for channeled spells.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use