Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: bwsrv/mangos
base: daf381a250
...
head fork: bwsrv/mangos
compare: 314094e519
Checking mergeability… Don't worry, you can still create the pull request.
  • 10 commits
  • 9 files changed
  • 0 commit comments
  • 4 contributors
2  spell_proc_event
@@ -1 +1 @@
-Subproject commit 0448a95a36338490c9f3d66e904a8e0225afb85b
+Subproject commit 9a439498d06477e84f03fe7439b226b4c892fdd7
View
4 sql/updates/11335_02_mangos_mangos_string.sql
@@ -1,4 +1,6 @@
ALTER TABLE db_version CHANGE COLUMN required_11335_01_mangos_mangos_string required_11335_02_mangos_mangos_string bit;
-REPLACE INTO mangos_string VALUES
+DELETE FROM mangos_string WHERE entry IN (503);
+
+INSERT INTO mangos_string VALUES
(503,'The distance is: (3D) %f (2D) %f - (3D, point-to-point) %f yards.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
View
4 src/game/GameObject.cpp
@@ -1744,6 +1744,8 @@ void GameObject::DamageTaken(Unit* pDoneBy, uint32 damage)
if (BattleGround *bg = pWho->GetBattleGround())
bg->EventPlayerDamageGO(pWho, this, m_goInfo->destructibleBuilding.destroyedEvent);
}
+
+ GetMap()->ScriptsStart(sEventScripts, m_goInfo->destructibleBuilding.destroyedEvent, pDoneBy, this);
}
}
else // from intact to damaged
@@ -1752,6 +1754,7 @@ void GameObject::DamageTaken(Unit* pDoneBy, uint32 damage)
{
SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->destructibleBuilding.damagedDisplayId);
+ GetMap()->ScriptsStart(sEventScripts, m_goInfo->destructibleBuilding.damageEvent, pDoneBy, this);
// if we have a "dead" display we can "kill" the building after its damaged
if (m_goInfo->destructibleBuilding.destroyedDisplayId)
{
@@ -1779,6 +1782,7 @@ void GameObject::Rebuild(Unit* pWho)
RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_DESTROYED);
SetUInt32Value(GAMEOBJECT_DISPLAYID, m_goInfo->displayId);
m_health = GetMaxHealth();
+ GetMap()->ScriptsStart(sEventScripts, m_goInfo->destructibleBuilding.rebuildingEvent, pWho, this);
SetGoAnimProgress(255);
}
View
38 src/game/LFGHandler.cpp
@@ -527,6 +527,10 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
if (!dungeonEntry)
return;
+ uint32 flags = LFG_MEMBER_FLAG_NONE | LFG_MEMBER_FLAG_CHARINFO |
+ LFG_MEMBER_FLAG_COMMENT | LFG_MEMBER_FLAG_UNK1 |
+ LFG_MEMBER_FLAG_GROUP | LFG_MEMBER_FLAG_UNK2 |
+ LFG_MEMBER_FLAG_UNK3 | LFG_MEMBER_FLAG_BIND;
uint8 guids1 = 0; // additional guids. unknown
@@ -543,7 +547,6 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
if (!leader)
continue;
- uint32 flags = *(*itr)->GetLFGState()->GetFlags();
if (flags & LFG_MEMBER_FLAG_COMMENT)
groupSize += leader->GetLFGState()->GetComment().size();
if (flags & LFG_MEMBER_FLAG_ROLES)
@@ -561,8 +564,6 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
{
playerSize += (8+4);
- uint32 flags = *(*itr)->GetLFGState()->GetFlags();
-
if (flags & LFG_MEMBER_FLAG_CHARINFO)
playerSize += (1+1+1+3+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4+4);
@@ -618,8 +619,6 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
data << leader->GetObjectGuid();
- uint32 flags = *group->GetLFGState()->GetFlags();
-
data << uint32(flags);
if (flags & LFG_MEMBER_FLAG_COMMENT)
@@ -637,8 +636,18 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
if (flags & LFG_MEMBER_FLAG_BIND)
{
- data << uint64(0); // guid
- data << int32(0); // unk
+ ObjectGuid instanceGuid;
+ uint32 encounters = 0;
+ if (InstancePlayerBind* bind = leader->GetBoundInstance(dungeon->map, Difficulty(dungeon->difficulty)))
+ {
+ if (DungeonPersistentState* state = bind->state)
+ {
+ instanceGuid = state->GetInstanceGuid();
+ encounters = state->GetCompletedEncountersMask();
+ }
+ }
+ data << instanceGuid;
+ data << encounters;
}
}
}
@@ -659,7 +668,6 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
Player* player = *itr;
data << player->GetObjectGuid(); // guid
- uint32 flags = *player->GetLFGState()->GetFlags();
data << uint32(flags); // flags
@@ -725,8 +733,18 @@ void WorldSession::SendLfgUpdateList(uint32 dungeonEntry)
if (flags & LFG_MEMBER_FLAG_BIND)
{
- data << uint64(0); // guid
- data << int32(0); // unk
+ ObjectGuid instanceGuid;
+ uint32 encounters = 0;
+ if (InstancePlayerBind* bind = player->GetBoundInstance(dungeon->map, Difficulty(dungeon->difficulty)))
+ {
+ if (DungeonPersistentState* state = bind->state)
+ {
+ instanceGuid = state->GetInstanceGuid();
+ encounters = state->GetCompletedEncountersMask();
+ }
+ }
+ data << instanceGuid;
+ data << encounters;
}
}
View
16 src/game/LFGMgr.cpp
@@ -462,9 +462,21 @@ LFGLockStatusType LFGMgr::GetPlayerLockStatus(Player* player, LFGDungeonEntry co
return LFG_LOCKSTATUS_RAID_LOCKED;
}
+ if (dungeon->difficulty > DUNGEON_DIFFICULTY_NORMAL)
+ {
+ if (AreaTrigger const* at = sObjectMgr.GetMapEntranceTrigger(dungeon->map))
+ {
+ uint32 gs = player->GetEquipGearScore(true,true);
+
+ if (at->minGS > 0 && gs < at->minGS)
+ return LFG_LOCKSTATUS_TOO_LOW_GEAR_SCORE;
+ else if (at->maxGS > 0 && gs > at->maxGS)
+ return LFG_LOCKSTATUS_TOO_HIGH_GEAR_SCORE;
+ }
+ else
+ return LFG_LOCKSTATUS_RAID_LOCKED;
+ }
/* TODO
- LFG_LOCKSTATUS_TOO_LOW_GEAR_SCORE;
- LFG_LOCKSTATUS_TOO_HIGH_GEAR_SCORE;
LFG_LOCKSTATUS_ATTUNEMENT_TOO_LOW_LEVEL;
LFG_LOCKSTATUS_ATTUNEMENT_TOO_HIGH_LEVEL;
LFG_LOCKSTATUS_NOT_IN_SEASON;
View
3  src/game/Map.cpp
@@ -1413,7 +1413,7 @@ bool DungeonMap::Add(Player *player)
{
WorldPacket data(SMSG_INSTANCE_LOCK_WARNING_QUERY, 9);
data << uint32(60000);
- data << ((DungeonPersistentState*)GetPersistentState())->GetCompletedEncountersMask();
+ data << groupBind->state->GetCompletedEncountersMask();
data << uint8(0);
player->GetSession()->SendPacket(&data);
player->SetPendingBind(GetPersistanceState(), 60000);
@@ -1427,6 +1427,7 @@ bool DungeonMap::Add(Player *player)
player->BindToInstance(GetPersistanceState(), false);
else
{
+ // cannot jump to a different instance without resetting it
player->RepopAtGraveyard();
return false;
}
View
2  src/game/PetitionsHandler.cpp
@@ -736,7 +736,7 @@ void WorldSession::HandleTurnInPetitionOpcode(WorldPacket & recv_data)
}
else
{
- sLog.outError("petition table has broken data!");
+ sLog.outError("CMSG_TURN_IN_PETITION: petition table not have data for guid %u!", petitionGuid.GetCounter());
return;
}
View
24 src/game/SpellHandler.cpp
@@ -705,19 +705,19 @@ void WorldSession::HandleMirrorImageDataRequest( WorldPacket & recv_data )
void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
{
- uint64 casterGuid; // actually target ?
- uint32 spellId; // Spell Id
- uint8 cast_Id; // Some counter ? the fuck
+ ObjectGuid casterGuid; // actually target ?
+ uint32 spellId; // Spell Id
+ uint8 castCount; //
float m_targetX, m_targetY, m_targetZ; // Position of missile hit
recvPacket >> casterGuid;
recvPacket >> spellId;
- recvPacket >> cast_Id;
+ recvPacket >> castCount;
recvPacket >> m_targetX >> m_targetY >> m_targetZ;
// Do we need unit as we use 3d position anyway ?
- Unit * pCaster = ObjectAccessor::GetUnit(*_player, casterGuid);
+ Unit* pCaster = GetPlayer()->GetMap()->GetUnit(casterGuid);
if (!pCaster)
return;
@@ -730,7 +730,19 @@ void WorldSession::HandleUpdateProjectilePosition(WorldPacket& recvPacket)
return;
}
+ WorldPacket data(SMSG_SET_PROJECTILE_POSITION, 8+1+4+4+4);
+ data << casterGuid;
+ data << castCount;
+ data << m_targetX;
+ data << m_targetY;
+ data << m_targetZ;
+ SendPacket(&data);
+
for(int i = 0; i < 3; ++i)
+ {
if(spellInfo->EffectTriggerSpell[i])
- pCaster->CastSpell(m_targetX, m_targetY, m_targetZ, spellInfo->EffectTriggerSpell[i], true);
+ if (SpellEntry const* spellInfoT = sSpellStore.LookupEntry(spellInfo->EffectTriggerSpell[i]))
+ pCaster->CastSpell(m_targetX, m_targetY, m_targetZ, spellInfoT, true);
+ }
+
}
View
2  src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "11344"
+ #define REVISION_NR "11346"
#endif // __REVISION_NR_H__

No commit comments for this range

Something went wrong with that request. Please try again.