aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2024-10-20 12:44:15 +0200
committerShauren <shauren.trinity@gmail.com>2024-10-20 12:44:15 +0200
commitc6fd88bf3044de44ac01fe9583a3be4142d1e1d9 (patch)
tree158fc3c13fdb85a7008c12a663e32a5abf4969b5
parentb860733822aebef4bd69d506d32e44c0de9f7789 (diff)
Core/Chat: Update ChatNotify enum
-rw-r--r--src/server/game/Chat/Channels/Channel.h5
-rw-r--r--src/server/game/Chat/Channels/ChannelAppenders.h7
-rw-r--r--src/server/game/Chat/Channels/enuminfo_Channel.cpp13
-rw-r--r--src/server/game/Miscellaneous/enuminfo_RaceMask.cpp8
4 files changed, 22 insertions, 11 deletions
diff --git a/src/server/game/Chat/Channels/Channel.h b/src/server/game/Chat/Channels/Channel.h
index 6e87e34db3d..2fdaa0f2655 100644
--- a/src/server/game/Chat/Channels/Channel.h
+++ b/src/server/game/Chat/Channels/Channel.h
@@ -76,8 +76,9 @@ enum ChatNotify : uint8
CHAT_NOT_IN_LFG_NOTICE = 0x21, //+ "[%s] You must be queued in looking for group before joining this channel."; -- The user must be in the looking for group system to join LFG chat channels.
CHAT_VOICE_ON_NOTICE = 0x22, //+ "[%s] Channel voice enabled by %s.";
CHAT_VOICE_OFF_NOTICE = 0x23, //+ "[%s] Channel voice disabled by %s.";
- CHAT_TRIAL_RESTRICTED = 0x24, //+ "[%s] Free Trial accounts cannot send messages to this channel. |cffffd000|Hstorecategory:gametime|h[Click To Upgrade]|h|r"
- CHAT_NOT_ALLOWED_IN_CHANNEL = 0x25 //+ "That operation is not permitted in this channel."
+ CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE = 0x24, // same as CHAT_VOICE_ON_NOTICE but no chat mode change announcement
+ CHAT_TRIAL_RESTRICTED = 0x25, //+ "[%s] Free Trial accounts cannot send messages to this channel. |cffffd000|Hstorecategory:gametime|h[Click To Upgrade]|h|r"
+ CHAT_NOT_ALLOWED_IN_CHANNEL = 0x26 //+ "That operation is not permitted in this channel."
};
enum ChannelFlags
diff --git a/src/server/game/Chat/Channels/ChannelAppenders.h b/src/server/game/Chat/Channels/ChannelAppenders.h
index b520f3e8b2a..28fea33e938 100644
--- a/src/server/game/Chat/Channels/ChannelAppenders.h
+++ b/src/server/game/Chat/Channels/ChannelAppenders.h
@@ -445,15 +445,16 @@ struct NotInLFGAppend
struct VoiceOnAppend
{
- explicit VoiceOnAppend(ObjectGuid const& guid) : _guid(guid) { }
-
- static uint8 const NotificationType = CHAT_VOICE_ON_NOTICE;
+ explicit VoiceOnAppend(ObjectGuid const& guid, bool announce = true)
+ : NotificationType(announce ? CHAT_VOICE_ON_NOTICE : CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE), _guid(guid) { }
void Append(WorldPackets::Channel::ChannelNotify& data) const
{
data.SenderGuid = _guid;
}
+ uint8 const NotificationType;
+
private:
ObjectGuid _guid;
};
diff --git a/src/server/game/Chat/Channels/enuminfo_Channel.cpp b/src/server/game/Chat/Channels/enuminfo_Channel.cpp
index 7a8b7d3249e..c875bc2b619 100644
--- a/src/server/game/Chat/Channels/enuminfo_Channel.cpp
+++ b/src/server/game/Chat/Channels/enuminfo_Channel.cpp
@@ -67,6 +67,7 @@ TC_API_EXPORT EnumText EnumUtils<ChatNotify>::ToString(ChatNotify value)
case CHAT_NOT_IN_LFG_NOTICE: return { "CHAT_NOT_IN_LFG_NOTICE", "CHAT_NOT_IN_LFG_NOTICE", "+ \042[%s] You must be queued in looking for group before joining this channel.\042; -- The user must be in the looking for group system to join LFG chat channels." };
case CHAT_VOICE_ON_NOTICE: return { "CHAT_VOICE_ON_NOTICE", "CHAT_VOICE_ON_NOTICE", "+ \042[%s] Channel voice enabled by %s.\042;" };
case CHAT_VOICE_OFF_NOTICE: return { "CHAT_VOICE_OFF_NOTICE", "CHAT_VOICE_OFF_NOTICE", "+ \042[%s] Channel voice disabled by %s.\042;" };
+ case CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE: return { "CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE", "CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE", "same as CHAT_VOICE_ON_NOTICE but no chat mode change announcement" };
case CHAT_TRIAL_RESTRICTED: return { "CHAT_TRIAL_RESTRICTED", "CHAT_TRIAL_RESTRICTED", "+ \042[%s] Free Trial accounts cannot send messages to this channel. |cffffd000|Hstorecategory:gametime|h[Click To Upgrade]|h|r\042" };
case CHAT_NOT_ALLOWED_IN_CHANNEL: return { "CHAT_NOT_ALLOWED_IN_CHANNEL", "CHAT_NOT_ALLOWED_IN_CHANNEL", "+ \042That operation is not permitted in this channel.\042" };
default: throw std::out_of_range("value");
@@ -74,7 +75,7 @@ TC_API_EXPORT EnumText EnumUtils<ChatNotify>::ToString(ChatNotify value)
}
template <>
-TC_API_EXPORT size_t EnumUtils<ChatNotify>::Count() { return 38; }
+TC_API_EXPORT size_t EnumUtils<ChatNotify>::Count() { return 39; }
template <>
TC_API_EXPORT ChatNotify EnumUtils<ChatNotify>::FromIndex(size_t index)
@@ -117,8 +118,9 @@ TC_API_EXPORT ChatNotify EnumUtils<ChatNotify>::FromIndex(size_t index)
case 33: return CHAT_NOT_IN_LFG_NOTICE;
case 34: return CHAT_VOICE_ON_NOTICE;
case 35: return CHAT_VOICE_OFF_NOTICE;
- case 36: return CHAT_TRIAL_RESTRICTED;
- case 37: return CHAT_NOT_ALLOWED_IN_CHANNEL;
+ case 36: return CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE;
+ case 37: return CHAT_TRIAL_RESTRICTED;
+ case 38: return CHAT_NOT_ALLOWED_IN_CHANNEL;
default: throw std::out_of_range("index");
}
}
@@ -164,8 +166,9 @@ TC_API_EXPORT size_t EnumUtils<ChatNotify>::ToIndex(ChatNotify value)
case CHAT_NOT_IN_LFG_NOTICE: return 33;
case CHAT_VOICE_ON_NOTICE: return 34;
case CHAT_VOICE_OFF_NOTICE: return 35;
- case CHAT_TRIAL_RESTRICTED: return 36;
- case CHAT_NOT_ALLOWED_IN_CHANNEL: return 37;
+ case CHAT_VOICE_ON_NO_ANNOUNCE_NOTICE: return 36;
+ case CHAT_TRIAL_RESTRICTED: return 37;
+ case CHAT_NOT_ALLOWED_IN_CHANNEL: return 38;
default: throw std::out_of_range("value");
}
}
diff --git a/src/server/game/Miscellaneous/enuminfo_RaceMask.cpp b/src/server/game/Miscellaneous/enuminfo_RaceMask.cpp
index 1ca68bada9c..3225a607dbe 100644
--- a/src/server/game/Miscellaneous/enuminfo_RaceMask.cpp
+++ b/src/server/game/Miscellaneous/enuminfo_RaceMask.cpp
@@ -58,12 +58,14 @@ TC_API_EXPORT EnumText EnumUtils<Races>::ToString(Races value)
case RACE_MECHAGNOME: return { "RACE_MECHAGNOME", "Mechagnome", "Mechagnome (RaceMask bit 14)" };
case RACE_DRACTHYR_ALLIANCE: return { "RACE_DRACTHYR_ALLIANCE", "Dracthyr", "Dracthyr (Alliance) (RaceMask bit 16)" };
case RACE_DRACTHYR_HORDE: return { "RACE_DRACTHYR_HORDE", "Dracthyr", "Dracthyr (Horde) (RaceMask bit 15)" };
+ case RACE_EARTHEN_DWARF_HORDE: return { "RACE_EARTHEN_DWARF_HORDE", "Earthen", "Earthen (Horde) (RaceMask bit 17)" };
+ case RACE_EARTHEN_DWARF_ALLIANCE: return { "RACE_EARTHEN_DWARF_ALLIANCE", "Earthen", "Earthen (Alliance) (RaceMask bit 18)" };
default: throw std::out_of_range("value");
}
}
template <>
-TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 27; }
+TC_API_EXPORT size_t EnumUtils<Races>::Count() { return 29; }
template <>
TC_API_EXPORT Races EnumUtils<Races>::FromIndex(size_t index)
@@ -97,6 +99,8 @@ TC_API_EXPORT Races EnumUtils<Races>::FromIndex(size_t index)
case 24: return RACE_MECHAGNOME;
case 25: return RACE_DRACTHYR_ALLIANCE;
case 26: return RACE_DRACTHYR_HORDE;
+ case 27: return RACE_EARTHEN_DWARF_HORDE;
+ case 28: return RACE_EARTHEN_DWARF_ALLIANCE;
default: throw std::out_of_range("index");
}
}
@@ -133,6 +137,8 @@ TC_API_EXPORT size_t EnumUtils<Races>::ToIndex(Races value)
case RACE_MECHAGNOME: return 24;
case RACE_DRACTHYR_ALLIANCE: return 25;
case RACE_DRACTHYR_HORDE: return 26;
+ case RACE_EARTHEN_DWARF_HORDE: return 27;
+ case RACE_EARTHEN_DWARF_ALLIANCE: return 28;
default: throw std::out_of_range("value");
}
}