diff options
Diffstat (limited to 'src/server/game')
| -rw-r--r-- | src/server/game/Events/GameEventMgr.cpp | 8 | ||||
| -rw-r--r-- | src/server/game/Events/GameEventMgr.h | 1 | ||||
| -rw-r--r-- | src/server/game/Handlers/MovementHandler.cpp | 2 | ||||
| -rw-r--r-- | src/server/game/Spells/Auras/SpellAuras.cpp | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/server/game/Events/GameEventMgr.cpp b/src/server/game/Events/GameEventMgr.cpp index 9141f77b852..737a6d1b91c 100644 --- a/src/server/game/Events/GameEventMgr.cpp +++ b/src/server/game/Events/GameEventMgr.cpp @@ -205,8 +205,8 @@ void GameEventMgr::LoadFromDB() { { uint32 oldMSTime = getMSTime(); - // 0 1 2 3 4 5 6 7 - QueryResult result = WorldDatabase.Query("SELECT eventEntry, UNIX_TIMESTAMP(start_time), UNIX_TIMESTAMP(end_time), occurence, length, holiday, description, world_event FROM game_event"); + // 0 1 2 3 4 5 6 7 8 + QueryResult result = WorldDatabase.Query("SELECT eventEntry, UNIX_TIMESTAMP(start_time), UNIX_TIMESTAMP(end_time), occurence, length, holiday, description, world_event, announce FROM game_event"); if (!result) { mGameEvent.clear(); @@ -237,6 +237,7 @@ void GameEventMgr::LoadFromDB() pGameEvent.state = (GameEventState)(fields[7].GetUInt8()); pGameEvent.nextstart = 0; + pGameEvent.announce = fields[8].GetUInt8(); if (pGameEvent.length == 0 && pGameEvent.state == GAMEEVENT_NORMAL) // length>0 is validity check { @@ -1104,7 +1105,8 @@ void GameEventMgr::UnApplyEvent(uint16 event_id) void GameEventMgr::ApplyNewEvent(uint16 event_id) { - if (sWorld->getBoolConfig(CONFIG_EVENT_ANNOUNCE)) + uint8 announce = mGameEvent[event_id].announce; + if (announce == 1 || (announce == 2 && sWorld->getBoolConfig(CONFIG_EVENT_ANNOUNCE))) sWorld->SendWorldText(LANG_EVENTMESSAGE, mGameEvent[event_id].description.c_str()); sLog->outInfo(LOG_FILTER_GAMEEVENTS, "GameEvent %u \"%s\" started.", event_id, mGameEvent[event_id].description.c_str()); diff --git a/src/server/game/Events/GameEventMgr.h b/src/server/game/Events/GameEventMgr.h index 4175e57f28a..ad4ddeeba88 100644 --- a/src/server/game/Events/GameEventMgr.h +++ b/src/server/game/Events/GameEventMgr.h @@ -66,6 +66,7 @@ struct GameEventData GameEventConditionMap conditions; // conditions to finish std::set<uint16 /*gameevent id*/> prerequisite_events; // events that must be completed before starting this event std::string description; + uint8 announce; // if 0 dont announce, if 1 announce, if 2 take config value bool isValid() const { return length > 0 || state > GAMEEVENT_NORMAL; } }; diff --git a/src/server/game/Handlers/MovementHandler.cpp b/src/server/game/Handlers/MovementHandler.cpp index 6f1c2a30d5e..4410cd20d7c 100644 --- a/src/server/game/Handlers/MovementHandler.cpp +++ b/src/server/game/Handlers/MovementHandler.cpp @@ -76,7 +76,7 @@ void WorldSession::HandleMoveWorldportAckOpcode() // while the player is in transit, for example the map may get full if (!newMap || !newMap->CanEnter(GetPlayer())) { - sLog->outError(LOG_FILTER_NETWORKIO, "Map %d could not be created for player %d, porting player to homebind", loc.GetMapId(), GetPlayer()->GetGUIDLow()); + sLog->outError(LOG_FILTER_NETWORKIO, "Map %d (%s) could not be created for player %d (%s), porting player to homebind", loc.GetMapId(), newMap ? newMap->GetMapName() : "Unknown", GetPlayer()->GetGUIDLow(), GetPlayer()->GetName().c_str()); GetPlayer()->TeleportTo(GetPlayer()->m_homebindMapId, GetPlayer()->m_homebindX, GetPlayer()->m_homebindY, GetPlayer()->m_homebindZ, GetPlayer()->GetOrientation()); return; } diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp index 51149df1265..12c4183ce2e 100644 --- a/src/server/game/Spells/Auras/SpellAuras.cpp +++ b/src/server/game/Spells/Auras/SpellAuras.cpp @@ -1801,7 +1801,7 @@ bool Aura::CanStackWith(Aura const* existingAura) const return true; // Dynobj auras always stack - if (existingAura->GetType() == DYNOBJ_AURA_TYPE) + if (GetType() == DYNOBJ_AURA_TYPE || existingAura->GetType() == DYNOBJ_AURA_TYPE) return true; SpellInfo const* existingSpellInfo = existingAura->GetSpellInfo(); |
