Merge branch 'master' of github.com:TrinityCore/TrinityCore into 4.3.4
This commit is contained in:
@@ -1,92 +0,0 @@
|
||||
=========================================
|
||||
Texts Documentation
|
||||
=========================================
|
||||
|
||||
=========================================================
|
||||
WARNING: THIS DOCUMENTATION IS NOT ALWAYS UP TO DATE.
|
||||
FOR MORE UP-TO-DATE INFORMATION, CHECK THE TRINITY WIKI.
|
||||
=========================================================
|
||||
|
||||
Scriptdev2 Revision 695 introduces a new format for using texts in EventAI and SD2 Scripts.
|
||||
This information relates to the *_texts tables located in the ScriptDev Database.
|
||||
|
||||
Any script can at any time access and use text from any of the three text tables, as long as the entry does in fact exist.
|
||||
Custom scripters are adviced to store their text data in custom_texts.
|
||||
|
||||
The different tables has ranges of entries allowed for that table.
|
||||
Reserved EventAI in Mangos entry -1 -> -999999
|
||||
script_texts: entry -1000000 -> -1999999
|
||||
custom_texts: entry -2000000 -> -2999999
|
||||
Any entry out of range for that table will display a startup error.
|
||||
|
||||
|
||||
=========================================
|
||||
Basic Structure of script_texts and custom_texts
|
||||
=========================================
|
||||
Below is a the list of current fields within the texts tables.
|
||||
|
||||
Field_Name Description
|
||||
-----------------------------------------------------------
|
||||
entry This value is mearly an NEGATIVE identifier of the current text number. Required for sql queries.
|
||||
content_default This is the actual text presented in the default language (English).
|
||||
|
||||
content_loc1 This is the actual text presented in the Localization #1 Clients (Korean)
|
||||
content_loc2 This is the actual text presented in the Localization #2 Clients (French)
|
||||
content_loc3 This is the actual text presented in the Localization #3 Clients (German)
|
||||
content_loc4 This is the actual text presented in the Localization #4 Clients (Chinese)
|
||||
content_loc5 This is the actual text presented in the Localization #5 Clients (Taiwanese)
|
||||
content_loc6 This is the actual text presented in the Localization #6 Clients (Spanish)
|
||||
content_loc7 This is the actual text presented in the Localization #7 Clients (Spanish Mexico)
|
||||
content_loc8 This is the actual text presented in the Localization #8 Clients (Russian)
|
||||
|
||||
sound This value is the Sound ID that corresponds to the actual text used (Defined in SoundEntries.dbc).
|
||||
type Variables used to define type of text (Say/Yell/Textemote/Whisper).
|
||||
language This value is the Language that the text is native in (Defined in Languages.dbc).
|
||||
emote Value from enum Emote (defined in Emotes.dbc). Only source of text will play this emote (not target, if target are defined in DoScriptText)
|
||||
comment This is a comment regarding the text entry (For ACID, accepted format is to use Creature ID of NPC using it).
|
||||
|
||||
Note: Fields `content_loc1` to `content_loc8` are NULL values by default and are handled by seperate localization projects.
|
||||
|
||||
|
||||
=========================================
|
||||
Text Types (type)
|
||||
=========================================
|
||||
Below is the list of current Text types that texts tables can handle. These were previously seperate Actions in ACID.
|
||||
|
||||
# Internal Name Description
|
||||
-----------------------------------------------------------
|
||||
0 CHAT_TYPE_SAY This type sets the text to be displayed as a Say (Speech Bubble).
|
||||
1 CHAT_TYPE_YELL This type sets the text to be displayed as a Yell (Red Speech Bubble) and usually has a matching Sound ID.
|
||||
2 CHAT_TYPE_TEXT_EMOTE This type sets the text to be displayed as a text emote in orange in the chat log.
|
||||
3 CHAT_TYPE_BOSS_EMOTE This type sets the text to be displayed as a text emote in orange in the chat log (Used only for specific Bosses).
|
||||
4 CHAT_TYPE_WHISPER This type sets the text to be displayed as a whisper to the player in the chat log.
|
||||
5 CHAT_TYPE_BOSS_WHISPER This type sets the text to be displayed as a whisper to the player in the chat log (Used only for specific Bosses).
|
||||
6 CHAT_TYPE_ZONE_YELL Same as CHAT_TYPE_YELL but will display to all players in current zone.
|
||||
|
||||
|
||||
=========================================
|
||||
Language Types (language)
|
||||
=========================================
|
||||
Below is the list of current Language types that are allowed.
|
||||
This is the Race Language that the text is native to (So it will display properly)
|
||||
|
||||
# Internal Name Description
|
||||
-----------------------------------------------------------
|
||||
0 UNIVERSAL Text in this language is understood by ALL Races.
|
||||
1 ORCISH Text in this language is understood ONLY by Horde Races.
|
||||
2 DARNASSIAN Text in this language is understood ONLY by the Night Elf Race.
|
||||
3 TAURAHE Text in this language is understood ONLY by the Tauren Race.
|
||||
6 DWARVISH Text in this language is understood ONLY by the Dwarf Race.
|
||||
7 COMMON Text in this language is understood ONLY by Alliance Races.
|
||||
8 DEMONIC Text in this language is understood ONLY by the Demon Race (Not Implimented).
|
||||
9 TITAN This language was used by Sargeras to speak with other Titians (Not Implemented).
|
||||
10 THALASSIAN Text in this language is understood ONLY by the Blood Elf Race.
|
||||
11 DRACONIC Text in this language is understood ONLY by the Dragon Race.
|
||||
12 KALIMAG Text will display as Kalimag (not readable by players, language of all elementals)
|
||||
13 GNOMISH Text in this language is understood ONLY by the Gnome Race.
|
||||
14 TROLL Text in this language is understood ONLY by the Troll Race.
|
||||
33 GUTTERSPEAK Text in this language is understood ONLY by the Undead Race.
|
||||
35 DRAENEI Text in this language is understood ONLY by the Draenai Race.
|
||||
36 ZOMBIE (not currently used?)
|
||||
37 GNOMISH BINARY Binary language used by Alliance when drinking Binary Brew
|
||||
38 GOBLIN BINARY Binary language used by Horce when drinking Binary Brew
|
||||
@@ -0,0 +1,12 @@
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid`=30407 AND `source_type`=0;
|
||||
INSERT INTO `smart_scripts`(`entryorguid`,`id`,`link`,`event_type`,`event_flags`,`event_phase_mask`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`target_type`,`comment`) VALUES
|
||||
(30407,0,1,11,0,0,0,0,0,0,11,56726,0,1,'Captured Crusader - On Respawn - Apply Nerubian Webs (56726)'),
|
||||
(30407,1,0,61,0,0,0,0,0,0,22,1,0,1,'Captured Crusader - Linked to id 0 - Set event phase to 1'),
|
||||
(30407,2,0, 1,0,1,4000,4000,4000,4000,10,70,22,1,'Captured Crusader - Out of combat - Random emote'),
|
||||
(30407,3,4, 8,0,1,56683,0,0,0,11,56687,0,7,'Captured Crusader - Spell hit of Grab Captured Crusader (56683) - Cast Ride Vehicle (56687)'),
|
||||
(30407,4,5,61,0,1,0,0,0,0,1,0,0,1,'Captured Crusader - Linked to id 3 - Talk'),
|
||||
(30407,5,0,61,0,1,0,0,0,0,22,2,0,1,'Captured Crusader - Linked to id 3 - Set event phase to 2'),
|
||||
(30407,6,0, 1,0,2,8000,8000,8000,8000,1,1,0,1,'Captured Crusader - Out of combat - Talk'),
|
||||
(30407,7,8,23,1,2,56687,0,0,0,1,2,0,1,'Captured Crusader - Aura Ride Vehicle (56687) removed - Talk'),
|
||||
(30407,8,9,61,0,2,0,0,0,0,41,5000,0,1,'Captured Crusader - Linked to id 7 - Despawn'),
|
||||
(30407,9,0,61,0,2,0,0,0,0,22,0,0,1,'Captured Crusader - Linked to id 7 - Set event phase to 0');
|
||||
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `trinity_string` where `entry`=363;
|
||||
INSERT INTO `trinity_string` (`entry`, `content_default`) VALUES
|
||||
(363, 'Player %s cannot whisper you any longer.');
|
||||
@@ -105,8 +105,8 @@ enum SMART_EVENT
|
||||
SMART_EVENT_REWARD_QUEST = 20, // QuestID(0any)
|
||||
SMART_EVENT_REACHED_HOME = 21, // NONE
|
||||
SMART_EVENT_RECEIVE_EMOTE = 22, // EmoteId, CooldownMin, CooldownMax, condition, val1, val2, val3
|
||||
SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Number of Time STacked, Param3/4 RepeatMin, RepeatMax
|
||||
SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Number of Time STacked, Param3/4 RepeatMin, RepeatMax
|
||||
SMART_EVENT_HAS_AURA = 23, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
|
||||
SMART_EVENT_TARGET_BUFFED = 24, // Param1 = SpellID, Param2 = Stack amount, Param3/4 RepeatMin, RepeatMax
|
||||
SMART_EVENT_RESET = 25, // Called after combat, when the creature respawn and spawn.
|
||||
SMART_EVENT_IC_LOS = 26, // NoHostile, MaxRnage, CooldownMin, CooldownMax
|
||||
SMART_EVENT_PASSENGER_BOARDED = 27, // CooldownMin, CooldownMax
|
||||
|
||||
@@ -2484,6 +2484,7 @@ class Player : public Unit, public GridObject<Player>
|
||||
void ClearWhisperWhiteList() { WhisperList.clear(); }
|
||||
void AddWhisperWhiteList(uint64 guid) { WhisperList.push_back(guid); }
|
||||
bool IsInWhisperWhiteList(uint64 guid);
|
||||
void RemoveFromWhisperWhiteList(uint64 guid) { WhisperList.remove(guid); }
|
||||
|
||||
/*! These methods send different packets to the client in apply and unapply case.
|
||||
These methods are only sent to the current unit.
|
||||
|
||||
@@ -16362,7 +16362,7 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
|
||||
Player* player = ToPlayer();
|
||||
|
||||
// If player is on mouted duel and exits the mount should immediatly lose the duel
|
||||
// If the player is on mounted duel and exits the mount, he should immediatly lose the duel
|
||||
if (player && player->duel && player->duel->isMounted)
|
||||
player->DuelComplete(DUEL_FLED);
|
||||
|
||||
@@ -16390,14 +16390,19 @@ void Unit::_ExitVehicle(Position const* exitPosition)
|
||||
SendMessageToSet(&data, false);
|
||||
}
|
||||
|
||||
float height = pos.GetPositionZ();
|
||||
|
||||
Movement::MoveSplineInit init(this);
|
||||
init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), false);
|
||||
|
||||
// Creatures without inhabit type air should begin falling after exiting the vehicle
|
||||
if (GetTypeId() == TYPEID_UNIT && !CanFly() && height > GetMap()->GetWaterOrGroundLevel(pos.GetPositionX(), pos.GetPositionY(), pos.GetPositionZ(), &height) + 0.1f)
|
||||
init.SetFall();
|
||||
|
||||
init.MoveTo(pos.GetPositionX(), pos.GetPositionY(), height, false);
|
||||
init.SetFacing(GetOrientation());
|
||||
init.SetTransportExit();
|
||||
init.Launch();
|
||||
|
||||
//GetMotionMaster()->MoveFall(); // Enable this once passenger positions are calculater properly (see above)
|
||||
|
||||
if (player)
|
||||
player->ResummonPetTemporaryUnSummonedIfAny();
|
||||
|
||||
|
||||
@@ -314,12 +314,6 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
} break;
|
||||
case CHAT_MSG_WHISPER:
|
||||
{
|
||||
if (sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ))
|
||||
{
|
||||
SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!normalizePlayerName(to))
|
||||
{
|
||||
SendPlayerNotFoundNotice(to);
|
||||
@@ -327,16 +321,18 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
Player* receiver = sObjectAccessor->FindPlayerByName(to);
|
||||
if (!receiver || (!HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) &&
|
||||
!receiver->isAcceptWhispers() && !receiver->IsInWhisperWhiteList(sender->GetGUID())))
|
||||
if (!receiver)
|
||||
{
|
||||
SendPlayerNotFoundNotice(to);
|
||||
return;
|
||||
}
|
||||
if (!sender->isGameMaster() && sender->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
|
||||
{
|
||||
SendNotification(GetTrinityString(LANG_WHISPER_REQ), sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ));
|
||||
return;
|
||||
}
|
||||
|
||||
// @todo: check only sender permission and add receiver to whiteList if receiver does not have the permission
|
||||
if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT) &&
|
||||
!receiver->GetSession()->HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT))
|
||||
if (GetPlayer()->GetTeam() != receiver->GetTeam() && !HasPermission(RBAC_PERM_TWO_SIDE_INTERACTION_CHAT) && !receiver->IsInWhisperWhiteList(sender->GetGUID()))
|
||||
{
|
||||
SendWrongFactionNotice();
|
||||
return;
|
||||
@@ -349,7 +345,9 @@ void WorldSession::HandleMessagechatOpcode(WorldPacket& recvData)
|
||||
}
|
||||
|
||||
// If player is a Gamemaster and doesn't accept whisper, we auto-whitelist every player that the Gamemaster is talking to
|
||||
if (HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) && !sender->isAcceptWhispers() && !sender->IsInWhisperWhiteList(receiver->GetGUID()))
|
||||
// We also do that if a player is under the required level for whispers.
|
||||
if (receiver->getLevel() < sWorld->getIntConfig(CONFIG_CHAT_WHISPER_LEVEL_REQ) ||
|
||||
(HasPermission(RBAC_PERM_CAN_FILTER_WHISPERS) && !sender->isAcceptWhispers() && !sender->IsInWhisperWhiteList(receiver->GetGUID())))
|
||||
sender->AddWhisperWhiteList(receiver->GetGUID());
|
||||
|
||||
GetPlayer()->Whisper(msg, lang, receiver->GetGUID());
|
||||
|
||||
@@ -384,7 +384,8 @@ enum TrinityStrings
|
||||
LANG_COMMAND_CHEAT_CD = 360,
|
||||
LANG_COMMAND_CHEAT_POWER = 361,
|
||||
LANG_COMMAND_CHEAT_WW = 362,
|
||||
// Room for more level 2 363-399 not used
|
||||
LANG_COMMAND_WHISPEROFFPLAYER = 363,
|
||||
// Room for more level 2 364-399 not used
|
||||
|
||||
// level 3 chat
|
||||
LANG_SCRIPTS_RELOADED = 400,
|
||||
|
||||
@@ -516,6 +516,9 @@ void WorldSession::LogoutPlayer(bool save)
|
||||
///- Remove pet
|
||||
_player->RemovePet(NULL, PET_SAVE_AS_CURRENT, true);
|
||||
|
||||
///- Clear whisper whitelist
|
||||
_player->ClearWhisperWhiteList();
|
||||
|
||||
///- empty buyback items and save the player in the database
|
||||
// some save parts only correctly work in case player present in map/player_lists (pets, etc)
|
||||
if (save)
|
||||
|
||||
@@ -27,6 +27,7 @@ EndScriptData */
|
||||
#include "ChannelMgr.h"
|
||||
#include "Language.h"
|
||||
#include "Player.h"
|
||||
#include "ObjectMgr.h"
|
||||
|
||||
class message_commandscript : public CommandScript
|
||||
{
|
||||
@@ -186,7 +187,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string argStr = (char*)args;
|
||||
std::string argStr = strtok((char*)args, " ");
|
||||
// whisper on
|
||||
if (argStr == "on")
|
||||
{
|
||||
@@ -205,6 +206,23 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
if (argStr == "remove")
|
||||
{
|
||||
std::string name = strtok(NULL, " ");
|
||||
if (normalizePlayerName(name))
|
||||
if (Player* player = sObjectAccessor->FindPlayerByName(name))
|
||||
{
|
||||
handler->GetSession()->GetPlayer()->RemoveFromWhisperWhiteList(player->GetGUID());
|
||||
handler->PSendSysMessage(LANG_COMMAND_WHISPEROFFPLAYER, name);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
handler->PSendSysMessage(LANG_PLAYER_NOT_FOUND, name);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
handler->SendSysMessage(LANG_USE_BOL);
|
||||
handler->SetSentErrorMessage(true);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user