Skip to content

Instantly share code, notes, and snippets.

@mweinelt
Created September 17, 2012 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mweinelt/3734915 to your computer and use it in GitHub Desktop.
Save mweinelt/3734915 to your computer and use it in GitHub Desktop.
diff --git a/src/server/game/Handlers/CalendarHandler.cpp b/src/server/game/Handlers/CalendarHandler.cpp
index b207547..d1209ee 100755
--- a/src/server/game/Handlers/CalendarHandler.cpp
+++ b/src/server/game/Handlers/CalendarHandler.cpp
@@ -431,7 +431,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
return;
}
- if (_player->GetTeam() != team)
+ if (_player->GetTeam() != team && !sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR))
{
SendCalendarCommandResult(CALENDAR_ERROR_NOT_ALLIED);
return;
diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp
index 919dda2..44db65e 100755
--- a/src/server/game/World/World.cpp
+++ b/src/server/game/World/World.cpp
@@ -659,6 +659,7 @@ void World::LoadConfigSettings(bool reload)
m_int_configs[CONFIG_REALM_ZONE] = ConfigMgr::GetIntDefault("RealmZone", REALM_ZONE_DEVELOPMENT);
m_bool_configs[CONFIG_ALLOW_TWO_SIDE_ACCOUNTS] = ConfigMgr::GetBoolDefault("AllowTwoSide.Accounts", true);
+ m_bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR]= ConfigMgr::GetBoolDefault("AllowTwoSide.Interaction.Calendar", false);
m_bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT] = ConfigMgr::GetBoolDefault("AllowTwoSide.Interaction.Chat", false);
m_bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL] = ConfigMgr::GetBoolDefault("AllowTwoSide.Interaction.Channel", false);
m_bool_configs[CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP] = ConfigMgr::GetBoolDefault("AllowTwoSide.Interaction.Group", false);
diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h
index 6776eb0..3964293 100755
--- a/src/server/game/World/World.h
+++ b/src/server/game/World/World.h
@@ -92,6 +92,7 @@ enum WorldBoolConfigs
CONFIG_GRID_UNLOAD,
CONFIG_STATS_SAVE_ONLY_ON_LOGOUT,
CONFIG_ALLOW_TWO_SIDE_ACCOUNTS,
+ CONFIG_ALLOW_TWO_SIDE_INTERACTION_CALENDAR,
CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT,
CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHANNEL,
CONFIG_ALLOW_TWO_SIDE_INTERACTION_GROUP,
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index ac25fbd..aae0a88 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -1209,6 +1209,14 @@ Warden.BanDuration = 86400
AllowTwoSide.Accounts = 1
#
+# AllowTwoSide.Interaction.Calendar
+# Description: Allow calendar invites between factions.
+# Default: 0 - (Disabled)
+# 1 - (Enabled)
+
+AllowTwoSide.Interaction.Calendar = 0
+
+#
# AllowTwoSide.Interaction.Chat
# Description: Allow say chat between factions.
# Default: 0 - (Disabled)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment