Zjistil jsem že na vyších revizích OC nefunguje /DND tak tu máte fix ...
# HG changeset patch
# User Andriy Release <
[email protected]>
# Date 1346073921 -10800
# Node ID 090323eb05115847fb9f33b9d657066f4c70812b
# Parent b387944fe97e4009b7e5f3a24419dafd023347a1
Make /dnd like in old revisions
diff -r b387944fe97e -r 090323eb0511 src/game/Player.cpp
--- a/src/game/Player.cpp Tue May 29 09:55:41 2012 +0200
+++ b/src/game/Player.cpp Mon Aug 27 16:25:21 2012 +0300
@@ -17317,16 +17317,25 @@
sLog.outChat("[WHISPER] Player %s tells %s: %s",
GetName(), rPlayer->GetName(), text.c_str());
- WorldPacket data(SMSG_MESSAGECHAT, 200);
- BuildPlayerChat(&data, CHAT_MSG_WHISPER, text, language);
- rPlayer->GetSession()->SendPacket(&data);
-
- // not send confirmation for addon messages
- if (language != LANG_ADDON)
- {
+ // when player you are whispering to is dnd, he cannot receive your message, unless you are in gm mode
+ if (!rPlayer->isDND() || isGameMaster())
+ {
+ WorldPacket data(SMSG_MESSAGECHAT, 200);
+ BuildPlayerChat(&data, CHAT_MSG_WHISPER, text, language);
+ rPlayer->GetSession()->SendPacket(&data);
+
+ // not send confirmation for addon messages
+ if (language != LANG_ADDON)
+ {
data.Initialize(SMSG_MESSAGECHAT, 200);
rPlayer->BuildPlayerChat(&data, CHAT_MSG_REPLY, text, language);
GetSession()->SendPacket(&data);
+ }
+ }
+ else if (rPlayer->isDND())
+ {
+ {
+ // announce to player that player he is whispering to is dnd and cannot receive his message
+ ChatHandler(this).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName(), rPlayer->dndMsg.c_str());
+ }
}
if (!isAcceptWhispers() && !(isGameMaster() && rPlayer->isGameMaster()))
@@ -17335,11 +17344,12 @@
ChatHandler(this).SendSysMessage(LANG_COMMAND_WHISPERON);
}
- // announce afk or dnd message if whispered player is either afk or dnd
+ // announce to player that player he is whispering to is afk
if (rPlayer->isAFK())
ChatHandler(this).PSendSysMessage(LANG_PLAYER_AFK, rPlayer->GetName(), rPlayer->afkMsg.c_str());
- else if (rPlayer->isDND())
- ChatHandler(this).PSendSysMessage(LANG_PLAYER_DND, rPlayer->GetName(), rPlayer->dndMsg.c_str());
+ // if player whisper someone, auto turn of dnd to be able to receive an answer
+ if (isDND() && !rPlayer->isGameMaster())
+ ToggleDND();
}
void Player::PetSpellInitialize()
Zdroj http://www.oregoncore.com/index.php?/topic/2623-dnd/ ale to uplně nefungovalo tak jsem to poupravil a nyní plně funguje. Testovano na poslední revizi OC.