aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--externals/zlib/win/VC90/zlib.vcproj8
-rw-r--r--src/server/game/Chat/Commands/Level3.cpp60
2 files changed, 55 insertions, 13 deletions
diff --git a/externals/zlib/win/VC90/zlib.vcproj b/externals/zlib/win/VC90/zlib.vcproj
index 8e89623915c..1b63254aa23 100644
--- a/externals/zlib/win/VC90/zlib.vcproj
+++ b/externals/zlib/win/VC90/zlib.vcproj
@@ -22,7 +22,7 @@
<Configuration
Name="Debug|Win32"
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
- IntermediateDirectory=".\bzip2__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory=".\zlib__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
@@ -90,7 +90,7 @@
<Configuration
Name="Debug|x64"
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
- IntermediateDirectory=".\bzip2__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory=".\zlib__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
@@ -159,7 +159,7 @@
<Configuration
Name="Release|Win32"
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
- IntermediateDirectory=".\bzip2__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory=".\zlib__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
@@ -225,7 +225,7 @@
<Configuration
Name="Release|x64"
OutputDirectory="..\..\bin\$(PlatformName)_$(ConfigurationName)"
- IntermediateDirectory=".\bzip2__$(PlatformName)_$(ConfigurationName)"
+ IntermediateDirectory=".\zlib__$(PlatformName)_$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
diff --git a/src/server/game/Chat/Commands/Level3.cpp b/src/server/game/Chat/Commands/Level3.cpp
index f7ced44922b..8ac26cc5e8f 100644
--- a/src/server/game/Chat/Commands/Level3.cpp
+++ b/src/server/game/Chat/Commands/Level3.cpp
@@ -7062,20 +7062,62 @@ bool ChatHandler::HandleInstanceOpenCloseCommand(const char *args,bool open)
uint8 status = objmgr.GetAccessRequirement(instance->access_id)->status;
uint8 flag = 0;
- if (strcmp(instanceModeStr,"normal") || strcmp(instanceModeStr,"10normal"))
- flag = DUNGEON_STATUSFLAG_NORMAL;
- else if (strcmp(instanceModeStr,"heroic") || strcmp(instanceModeStr,"25normal"))
- flag = DUNGEON_STATUSFLAG_HEROIC;
- else if (strcmp(instanceModeStr,"10heroic"))
- flag = RAID_STATUSFLAG_10MAN_HEROIC;
- else if (strcmp(instanceModeStr,"25heroic"))
- flag = RAID_STATUSFLAG_25MAN_HEROIC;
+ const MapEntry *entry = sMapStore.LookupEntry(mapid);
+ if (!entry)
+ return false;
+
+ if (entry->IsDungeon())
+ {
+ if (strcmp(instanceModeStr,"normal"))
+ flag = DUNGEON_STATUSFLAG_NORMAL;
+ else if (strcmp(instanceModeStr,"heroic"))
+ flag = DUNGEON_STATUSFLAG_HEROIC;
+ else if (strcmp(instanceModeStr,"all"))
+ flag = DUNGEON_STATUSFLAG_NORMAL & DUNGEON_STATUSFLAG_HEROIC;
+ else
+ {
+ PSendSysMessage("Unrecognized difficulty string");
+ SetSentErrorMessage(true);
+ return false;
+ }
+ }
+
+ else if (entry->IsRaid())
+ {
+ if (strcmp(instanceModeStr,"normal"))
+ flag = RAID_STATUSFLAG_10MAN_NORMAL & RAID_STATUSFLAG_25MAN_NORMAL;
+ else if (strcmp(instanceModeStr,"heroic"))
+ flag = RAID_STATUSFLAG_10MAN_HEROIC & RAID_STATUSFLAG_25MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"10man"))
+ flag = RAID_STATUSFLAG_10MAN_NORMAL & RAID_STATUSFLAG_10MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"25man"))
+ flag = RAID_STATUSFLAG_25MAN_NORMAL & RAID_STATUSFLAG_25MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"heroic"))
+ flag = RAID_STATUSFLAG_10MAN_HEROIC & RAID_STATUSFLAG_25MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"10normal"))
+ flag = DUNGEON_STATUSFLAG_NORMAL;
+ else if (strcmp(instanceModeStr,"25normal"))
+ flag = DUNGEON_STATUSFLAG_HEROIC;
+ else if (strcmp(instanceModeStr,"10heroic"))
+ flag = RAID_STATUSFLAG_10MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"25heroic"))
+ flag = RAID_STATUSFLAG_25MAN_HEROIC;
+ else if (strcmp(instanceModeStr,"all"))
+ flag = RAID_STATUSFLAG_10MAN_NORMAL & RAID_STATUSFLAG_10MAN_HEROIC & RAID_STATUSFLAG_25MAN_NORMAL & RAID_STATUSFLAG_25MAN_HEROIC;
+ else
+ {
+ PSendSysMessage("Unrecognized difficulty string");
+ SetSentErrorMessage(true);
+ return false;
+ }
+ }
else
{
- PSendSysMessage("Unrecognized difficulty string");
+ PSendSysMessage("Map is not a dungeon/raid");
SetSentErrorMessage(true);
return false;
}
+
if (open)
status |= flag;
else