mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[8412] Update some new and old client supported shift-links to proper format.
* List all client and server side supported shift-link types updated in Chat.cpp * Now Henchant anf Hglyph links can be used in commands as spell links. * Hitem and Hquest links changed to client supported form.
This commit is contained in:
parent
89a84127eb
commit
261ad1c5df
6 changed files with 44 additions and 14 deletions
|
|
@ -24,7 +24,7 @@ CREATE TABLE `db_version` (
|
|||
`version` varchar(120) default NULL,
|
||||
`creature_ai_version` varchar(120) default NULL,
|
||||
`cache_id` int(10) default '0',
|
||||
`required_8399_01_mangos_spell_elixir` bit(1) default NULL
|
||||
`required_8412_01_mangos_mangos_string` bit(1) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Used DB version notes';
|
||||
|
||||
--
|
||||
|
|
@ -2831,8 +2831,8 @@ INSERT INTO `mangos_string` VALUES
|
|||
(509,'%d - sender: %s (guid: %u account: %u ) receiver: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(510,'%d - owner: %s (guid: %u account: %u ) %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(511,'Wrong link type!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(513,'%d - |cffffffff|Hquest:%d|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(513,'%d - |cffffffff|Hquest:%d:%d|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
(514,'%d - |cffffffff|Hcreature_entry:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(515,'%d - |cffffffff|Hcreature:%d|h[%s X:%f Y:%f Z:%f MapId:%d]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(516,'%d - |cffffffff|Hgameobject_entry:%d|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
|
|
|
|||
6
sql/updates/8412_01_mangos_mangos_string.sql
Normal file
6
sql/updates/8412_01_mangos_mangos_string.sql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
ALTER TABLE db_version CHANGE COLUMN required_8399_01_mangos_spell_elixir required_8412_01_mangos_mangos_string bit;
|
||||
|
||||
DELETE FROM mangos_string WHERE entry IN(512,513);
|
||||
INSERT INTO mangos_string VALUES
|
||||
(512,'%d - |cffffffff|Hitem:%d:0:0:0:0:0:0:0:0|h[%s]|h|r ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
|
||||
(513,'%d - |cffffffff|Hquest:%d:%d|h[%s]|h|r %s',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
|
||||
|
|
@ -93,6 +93,7 @@ pkgdata_DATA = \
|
|||
8402_01_characters_guild_eventlog.sql \
|
||||
8402_02_characters_guild_bank_eventlog.sql \
|
||||
8409_01_characters_guild.sql \
|
||||
8412_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
||||
## Additional files to include when running 'make dist'
|
||||
|
|
@ -166,4 +167,5 @@ EXTRA_DIST = \
|
|||
8402_01_characters_guild_eventlog.sql \
|
||||
8402_02_characters_guild_bank_eventlog.sql \
|
||||
8409_01_characters_guild.sql \
|
||||
8412_01_mangos_mangos_string.sql \
|
||||
README
|
||||
|
|
|
|||
|
|
@ -33,16 +33,21 @@
|
|||
#include "AccountMgr.h"
|
||||
|
||||
// Supported shift-links (client generated and server side)
|
||||
// |color|Hachievement:achievement_id:player_guid:0:0:0:0:0:0:0:0|h[name]|h|r
|
||||
// - client, item icon shift click, not used in server currently
|
||||
// |color|Harea:area_id|h[name]|h|r
|
||||
// |color|Hcreature:creature_guid|h[name]|h|r
|
||||
// |color|Hcreature_entry:creature_id|h[name]|h|r
|
||||
// |color|Henchant:recipe_spell_id|h[prof_name: recipe_name]|h|r - client, at shift click in recipes list dialog
|
||||
// |color|Hgameevent:id|h[name]|h|r
|
||||
// |color|Hgameobject:go_guid|h[name]|h|r
|
||||
// |color|Hgameobject_entry:go_id|h[name]|h|r
|
||||
// |color|Hitem:item_id:perm_ench_id:0:0|h[name]|h|r
|
||||
// |color|Hglyph:glyph_slot_id:glyph_prop_id|h[%s]|h|r - client, at shift click in glyphs dialog, GlyphSlot.dbc, GlyphProperties.dbc
|
||||
// |color|Hitem:item_id:perm_ench_id:gem1:gem2:gem3:0:0:0:reporter_level|h[name]|h|r
|
||||
// - client, item icon shift click
|
||||
// |color|Hitemset:itemset_id|h[name]|h|r
|
||||
// |color|Hplayer:name|h[name]|h|r - client, in some messages, at click copy only name instead link
|
||||
// |color|Hquest:quest_id|h[name]|h|r
|
||||
// |color|Hquest:quest_id:quest_level|h[name]|h|r - client, quest list name shift-click
|
||||
// |color|Hskill:skill_id|h[name]|h|r
|
||||
// |color|Hspell:spell_id|h[name]|h|r - client, spellbook spell icon shift-click
|
||||
// |color|Htalent:talent_id,rank|h[name]|h|r - client, talent icon shift-click
|
||||
|
|
@ -1359,7 +1364,9 @@ enum SpellLinkType
|
|||
{
|
||||
SPELL_LINK_SPELL = 0,
|
||||
SPELL_LINK_TALENT = 1,
|
||||
SPELL_LINK_TRADE = 2
|
||||
SPELL_LINK_TRADE = 2,
|
||||
SPELL_LINK_ENCHANT = 3,
|
||||
SPELL_LINK_GLYPH = 4
|
||||
};
|
||||
|
||||
static char const* const spellKeys[] =
|
||||
|
|
@ -1367,11 +1374,15 @@ static char const* const spellKeys[] =
|
|||
"Hspell", // normal spell
|
||||
"Htalent", // talent spell
|
||||
"Htrade", // profession/skill spell
|
||||
"Henchant", // enchanting recipe spell
|
||||
"Hglyph", // glyph
|
||||
0
|
||||
};
|
||||
|
||||
uint32 ChatHandler::extractSpellIdFromLink(char* text)
|
||||
{
|
||||
// number or [name] Shift-click form |color|Henchant:recipe_spell_id|h[prof_name: recipe_name]|h|r
|
||||
// number or [name] Shift-click form |color|Hglyph:glyph_slot_id:glyph_prop_id|h[%s]|h|r
|
||||
// number or [name] Shift-click form |color|Hspell:spell_id|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Htalent:talent_id,rank|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Htrade:spell_id,skill_id,max_value,cur_value|h[name]|h|r
|
||||
|
|
@ -1404,7 +1415,18 @@ uint32 ChatHandler::extractSpellIdFromLink(char* text)
|
|||
return talentEntry->RankID[rank];
|
||||
}
|
||||
case SPELL_LINK_TRADE:
|
||||
case SPELL_LINK_ENCHANT:
|
||||
return id;
|
||||
case SPELL_LINK_GLYPH:
|
||||
{
|
||||
uint32 glyph_prop_id = param1_str ? (uint32)atol(param1_str) : 0;
|
||||
|
||||
GlyphPropertiesEntry const* glyphPropEntry = sGlyphPropertiesStore.LookupEntry(glyph_prop_id);
|
||||
if(!glyphPropEntry)
|
||||
return 0;
|
||||
|
||||
return glyphPropEntry->SpellId;
|
||||
}
|
||||
}
|
||||
|
||||
// unknown type?
|
||||
|
|
|
|||
|
|
@ -2935,7 +2935,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),qinfo->GetQuestLevel(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
++counter;
|
||||
|
|
@ -2969,7 +2969,7 @@ bool ChatHandler::HandleLookupQuestCommand(const char* args)
|
|||
}
|
||||
|
||||
if (m_session)
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
PSendSysMessage(LANG_QUEST_LIST_CHAT,qinfo->GetQuestId(),qinfo->GetQuestId(),qinfo->GetQuestLevel(),title.c_str(),statusStr);
|
||||
else
|
||||
PSendSysMessage(LANG_QUEST_LIST_CONSOLE,qinfo->GetQuestId(),title.c_str(),statusStr);
|
||||
|
||||
|
|
@ -4686,7 +4686,7 @@ bool ChatHandler::HandleQuestAdd(const char* args)
|
|||
}
|
||||
|
||||
// .addquest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = extractKeyFromLink((char*)args,"Hquest");
|
||||
if(!cId)
|
||||
return false;
|
||||
|
|
@ -4740,7 +4740,7 @@ bool ChatHandler::HandleQuestRemove(const char* args)
|
|||
}
|
||||
|
||||
// .removequest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = extractKeyFromLink((char*)args,"Hquest");
|
||||
if(!cId)
|
||||
return false;
|
||||
|
|
@ -4790,7 +4790,7 @@ bool ChatHandler::HandleQuestComplete(const char* args)
|
|||
}
|
||||
|
||||
// .quest complete #entry
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
char* cId = extractKeyFromLink((char*)args,"Hquest");
|
||||
if(!cId)
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "8411"
|
||||
#define REVISION_NR "8412"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue