discord: Update activity message while playing PVP or DMM (#11522)
This commit is contained in:
@@ -43,6 +43,8 @@ enum DiscordGameEventType
|
||||
|
||||
IN_GAME("In Game", -3),
|
||||
IN_MENU("In Menu", -3),
|
||||
PLAYING_DEADMAN("Playing Deadman Mode", -3),
|
||||
PLAYING_PVP("Playing in a PVP world", -3),
|
||||
TRAINING_ATTACK(Skill.ATTACK),
|
||||
TRAINING_DEFENCE(Skill.DEFENCE),
|
||||
TRAINING_STRENGTH(Skill.STRENGTH),
|
||||
|
||||
@@ -381,6 +381,19 @@ public class DiscordPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
final EnumSet<WorldType> worldType = client.getWorldType();
|
||||
|
||||
if (worldType.contains(WorldType.DEADMAN))
|
||||
{
|
||||
discordState.triggerEvent(DiscordGameEventType.PLAYING_DEADMAN);
|
||||
return;
|
||||
}
|
||||
else if (WorldType.isPvpWorld(worldType))
|
||||
{
|
||||
discordState.triggerEvent(DiscordGameEventType.PLAYING_PVP);
|
||||
return;
|
||||
}
|
||||
|
||||
DiscordGameEventType discordGameEventType = DiscordGameEventType.fromRegion(playerRegionID);
|
||||
|
||||
// NMZ uses the same region ID as KBD. KBD is always on plane 0 and NMZ is always above plane 0
|
||||
@@ -413,14 +426,6 @@ public class DiscordPlugin extends Plugin
|
||||
return false;
|
||||
}
|
||||
|
||||
final EnumSet<WorldType> worldType = client.getWorldType();
|
||||
|
||||
// Do not show location in PVP activities
|
||||
if (WorldType.isPvpWorld(worldType))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (event.getDiscordAreaType())
|
||||
{
|
||||
case BOSSES: return config.showBossActivity();
|
||||
|
||||
Reference in New Issue
Block a user