Vinolentus
-
Posts
22 -
Joined
-
Last visited
Never -
Donations
0.00 GBP
Content Type
Profiles
Bug Tracker
Wiki
Release Notes
Forums
Downloads
Blogs
Events
Posts posted by Vinolentus
-
-
* 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=20169MYSQL_TYPE_BIT is not one ofthe allowable input values, so to submit a BIT value, you can
pass it using an integer variable and the corresponding
type code, and MySQL will perform type conversion to BIT
on the server side.
* 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
-
* 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);
-
11778, of course* For which repository revision was the patch created?
1178
-
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);
-
* What bug does the patch fix? What features does the patch add?
Each of these functions takes a pointer to an argument list, then formats the data, and writes up to count characters to the memory pointed to by buffer. If there is room at the end (that is, if the number of characters to write is less than count), the buffer will be null-terminated.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.
-
Shouldn't GO_FLAG_INTERACT_COND be here too?
-
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.
-
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;
-
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;
-
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); }
-
better use special function that check is creature spawned staticly
Of course. I just forgot about it's existence.
-
-
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; }
-
@@ -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.
-
Uups... Pardon. Mea culpa. The only function I didn't checked was Map::AddObjectToRemoveList.
https://github.com/insider42/mangos/commit/52382da487dcf870b85aa890a5c5f50a9e717687
Old hack
-
*sigh*
Player::TeleportTo | |-- Unit::RemoveAllDynObjects | |-- Map::Remove | | |-- Player::RemoveFromWorld | | | | | |-- Unit::RemoveFromWorld | | | | | |-- Object::RemoveFromWorld | { | ... | m_inWorld = false; | } | |-- WorldObject::ResetMap { m_currMap = NULL; }
-
sart13, it is not even a gag. MSG_MOVE_WORLDPORT_ACK received while player _NOT_ in world. Camera will not be reset.
Vladimir, no. Dynamic objects added to removeList in Player::TeleportTo. We handle removeList later.
-
That hack isn't a solution.
Problem is:
Player's camera attached to dynamicObject's viewpoint. Player is teleported far, its map pointer is now nulled, it is in world no more.
IF dynamicObject 'll be removed now - we fail to reset camera
void Camera::SetView(WorldObject *obj, bool update_far_sight_field /*= true*/) { ... if (!m_owner.IsInMap(obj)) { sLog.outError("Camera::SetView, viewpoint is not in map with camera's owner."); return; }
and get crashed next visibility update or something like that.
-
Metamorphosis
SpellShapeshiftForm.dbc
wouldn't a GM command to OBTAIN display ID's make sense? Something like '.getid'
.debug getvalue?
-
It occurs when our pet is already removed from map (mb we shouldn't despawn pets so quick?)
Client get no answer -> it'll request name for this pet no more.
-
Sad but true.can it be that somewhy holder deletes itself and its auras without clearing itself out from arrays?Holder created : 0x72646640
Holder deleted : 0x72646640
...
Unit::GetAura:
(i*)->m_spellAuraHolder : 0x72646640
[fix] isPassiveToHostile
in ... rejectedOld
Posted
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?