mirror of
https://gitcode.com/GitHub_Trending/az/azerothcore-wotlk.git
synced 2026-07-11 03:13:10 +00:00
Merge branch 'master' of gitlab.com:azerothshard/azerothcore
This commit is contained in:
@@ -6,10 +6,10 @@ INSERT INTO `creature_loot_template` (`Entry`, `Item`, `ChanceOrQuestChance`, `L
|
||||
(26536, 26011, 1, 1, 1, -26011, 1),
|
||||
(26536, 26012, 1, 1, 1, -26012, 1),
|
||||
(26536, 26040, 21.4, 1, 0, -26040, 1),
|
||||
(26536, 33370, 3.6, 0, 1, 1, 1),
|
||||
(26536, 33399, 3.6, 0, 1, 1, 1),
|
||||
(26536, 33370, 3.6, 1, 1, 1, 1),
|
||||
(26536, 33399, 3.6, 1, 1, 1, 1),
|
||||
(26536, 33454, 35.5, 1, 0, 1, 1),
|
||||
(26536, 37068, 0.69, 0, 1, 1, 1),
|
||||
(26536, 37069, 0.69, 0, 1, 1, 1),
|
||||
(26536, 37070, 0.69, 0, 1, 1, 1),
|
||||
(26536, 45912, 0.1, 0, 1, 1, 1);
|
||||
(26536, 37068, 0.69, 1, 1, 1, 1),
|
||||
(26536, 37069, 0.69, 1, 1, 1, 1),
|
||||
(26536, 37070, 0.69, 1, 1, 1, 1),
|
||||
(26536, 45912, 0.1, 1, 1, 1, 1);
|
||||
@@ -1,4 +1,8 @@
|
||||
UPDATE npc_vendor SET extendedcost = 2440 WHERE item IN (41088,41158,41206,41679,41668,41662,40791,40830,40851,41994,41999,42006,41322,41299,41311,41673,41656,41651,41082,41152,41200,40995,41020,41034,41855,41865,41860,40910,40934,40940,40790,40829,40850,40994,41014,41028,41916,41928,41922,40792,40831,40852,41947,41954,41960,41328,41305,41317);
|
||||
UPDATE npc_vendor SET extendedcost = 2445 WHERE item IN (41218,41716,40871,42012,41276,41684,41212,41045,41870,40964,40870,41039,41935,40872,41966,41282);
|
||||
UPDATE npc_vendor SET extendedcost = 2443 WHERE item IN (41144,41774,40811,42018,41288,41768,41138,41008,41875,40928,40810,41002,41941,40812,41972,41294);
|
||||
UPDATE npc_vendor SET extendedcost = 2444 WHERE item IN (42591,42585,42580,42854,42616,42622,42609,42604,42599);
|
||||
UPDATE npc_vendor SET extendedcost = 2444 WHERE item IN (42591,42585,42580,42854,42616,42622,42609,42604,42599);
|
||||
|
||||
UPDATE npc_vendor SET extendedcost = 2742 WHERE item IN (41088,41158,41206,41679,41668,41662,40791,40830,40851,41994,41999,42006,41322,41299,41311,41673,41656,41651,41082,41152,41200,40995,41020,41034,41855,41865,41860,40910,40934,40940,40790,40829,40850,40994,41014,41028,41916,41928,41922,40792,40831,40852,41947,41954,41960,41328,41305,41317) AND entry IN (37941, 37942, 38858);;
|
||||
UPDATE npc_vendor SET extendedcost = 2740 WHERE item IN (41218,41716,40871,42012,41276,41684,41212,41045,41870,40964,40870,41039,41935,40872,41966,41282) AND entry IN (37941, 37942, 38858);;
|
||||
UPDATE npc_vendor SET extendedcost = 2740 WHERE item IN (41144,41774,40811,42018,41288,41768,41138,41008,41875,40928,40810,41002,41941,40812,41972,41294) AND entry IN (37941, 37942, 38858);;
|
||||
@@ -0,0 +1,3 @@
|
||||
UPDATE npc_vendor SET extendedcost = 2742 WHERE item IN (41088,41158,41206,41679,41668,41662,40791,40830,40851,41994,41999,42006,41322,41299,41311,41673,41656,41651,41082,41152,41200,40995,41020,41034,41855,41865,41860,40910,40934,40940,40790,40829,40850,40994,41014,41028,41916,41928,41922,40792,40831,40852,41947,41954,41960,41328,41305,41317) AND entry IN (37941, 37942, 38858);;
|
||||
UPDATE npc_vendor SET extendedcost = 2740 WHERE item IN (41218,41716,40871,42012,41276,41684,41212,41045,41870,40964,40870,41039,41935,40872,41966,41282) AND entry IN (37941, 37942, 38858);;
|
||||
UPDATE npc_vendor SET extendedcost = 2740 WHERE item IN (41144,41774,40811,42018,41288,41768,41138,41008,41875,40928,40810,41002,41941,40812,41972,41294) AND entry IN (37941, 37942, 38858);;
|
||||
@@ -87,7 +87,7 @@ void CrossFaction::UpdateGroupLeaderMap(uint64 leaderGuid, bool remove)
|
||||
void CrossFaction::UpdateAllGroups()
|
||||
{
|
||||
for (UNORDERED_MAP<uint64, uint8>::iterator itr = LeaderRaceMap.begin(); itr != LeaderRaceMap.end(); itr++)
|
||||
if (Player* leader = ObjectAccessor::ObjectAccessor::FindPlayer(itr->first))
|
||||
if (Player* leader = ObjectAccessor::FindPlayer(itr->first))
|
||||
if(Group* group = leader->GetGroup())
|
||||
{
|
||||
sLog->outError("Updating faction for group of leader %s", leader->GetName().c_str());
|
||||
|
||||
@@ -101,6 +101,7 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
|
||||
Creature* unit = NULL;
|
||||
GameObject* go = NULL;
|
||||
Item* item = NULL;
|
||||
if (IS_CRE_OR_VEH_GUID(guid))
|
||||
{
|
||||
unit = GetPlayer()->GetNPCIfCanInteractWith(guid, UNIT_NPC_FLAG_NONE);
|
||||
@@ -119,6 +120,23 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (IS_ITEM_GUID(guid))
|
||||
{
|
||||
item = _player->GetItemByGuid(guid);
|
||||
if (!item || _player->IsBankPos(item->GetPos()))
|
||||
{
|
||||
//TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (IS_PLAYER_GUID(guid))
|
||||
{
|
||||
if (guid != _player->GetGUID() || menuId != _player->PlayerTalkClass->GetGossipMenu().GetMenuId())
|
||||
{
|
||||
//TC_LOG_DEBUG("network", "WORLD: HandleGossipSelectOptionOpcode - %s not found.", guid.ToString().c_str());
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
;//sLog->outDebug(LOG_FILTER_NETWORKIO, "WORLD: HandleGossipSelectOptionOpcode - unsupported GUID type for highguid %u. lowpart %u.", uint32(GUID_HIPART(guid)), uint32(GUID_LOPART(guid)));
|
||||
@@ -147,11 +165,19 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
if (!sScriptMgr->OnGossipSelectCode(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str()))
|
||||
_player->OnGossipSelect(unit, gossipListId, menuId);
|
||||
}
|
||||
else
|
||||
else if (go)
|
||||
{
|
||||
go->AI()->GossipSelectCode(_player, menuId, gossipListId, code.c_str());
|
||||
sScriptMgr->OnGossipSelectCode(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
|
||||
}
|
||||
else if (item)
|
||||
{
|
||||
sScriptMgr->OnGossipSelectCode(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnGossipSelectCode(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId), code.c_str());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -161,12 +187,20 @@ void WorldSession::HandleGossipSelectOptionOpcode(WorldPacket & recv_data)
|
||||
if (!sScriptMgr->OnGossipSelect(_player, unit, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
|
||||
_player->OnGossipSelect(unit, gossipListId, menuId);
|
||||
}
|
||||
else
|
||||
else if (go)
|
||||
{
|
||||
go->AI()->GossipSelect(_player, menuId, gossipListId);
|
||||
if (!sScriptMgr->OnGossipSelect(_player, go, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId)))
|
||||
_player->OnGossipSelect(go, gossipListId, menuId);
|
||||
}
|
||||
else if (item)
|
||||
{
|
||||
sScriptMgr->OnGossipSelect(_player, item, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
|
||||
}
|
||||
else
|
||||
{
|
||||
sScriptMgr->OnGossipSelect(_player, menuId, _player->PlayerTalkClass->GetGossipOptionSender(gossipListId), _player->PlayerTalkClass->GetGossipOptionAction(gossipListId));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -703,6 +703,34 @@ bool ScriptMgr::OnItemExpire(Player* player, ItemTemplate const* proto)
|
||||
return tmpscript->OnExpire(player, proto);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGossipSelect(Player* player, Item* item, uint32 sender, uint32 action)
|
||||
{
|
||||
ASSERT(player);
|
||||
ASSERT(item);
|
||||
|
||||
GET_SCRIPT(ItemScript, item->GetScriptId(), tmpscript);
|
||||
tmpscript->OnGossipSelect(player, item, sender, action);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code)
|
||||
{
|
||||
ASSERT(player);
|
||||
ASSERT(item);
|
||||
|
||||
GET_SCRIPT(ItemScript, item->GetScriptId(), tmpscript);
|
||||
tmpscript->OnGossipSelectCode(player, item, sender, action, code);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnGossipSelect(player, menu_id, sender, action);
|
||||
}
|
||||
|
||||
void ScriptMgr::OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code)
|
||||
{
|
||||
FOREACH_SCRIPT(PlayerScript)->OnGossipSelectCode(player, menu_id, sender, action, code);
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnGossipHello(Player* player, Creature* creature)
|
||||
{
|
||||
ASSERT(player);
|
||||
|
||||
@@ -422,6 +422,15 @@ class ItemScript : public ScriptObject
|
||||
|
||||
// Called when the item expires (is destroyed).
|
||||
virtual bool OnExpire(Player* /*player*/, ItemTemplate const* /*proto*/) { return false; }
|
||||
|
||||
|
||||
// <AZTH
|
||||
// Called when a player selects an option in an item gossip window
|
||||
virtual void OnGossipSelect(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/) { }
|
||||
|
||||
// Called when a player selects an option in an item gossip window
|
||||
virtual void OnGossipSelectCode(Player* /*player*/, Item* /*item*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { }
|
||||
// >AZTH
|
||||
};
|
||||
|
||||
class CreatureScript : public ScriptObject, public UpdatableScript<Creature>
|
||||
@@ -767,6 +776,15 @@ class PlayerScript : public ScriptObject
|
||||
virtual void OnAchiSave(SQLTransaction& /*trans*/, Player* /*player*/, uint16 /*achId*/, CompletedAchievementData /*achiData*/) { }
|
||||
|
||||
virtual void OnCriteriaSave(SQLTransaction& /*trans*/, Player* /*player*/, uint16 /*achId*/, CriteriaProgress /*criteriaData*/) { }
|
||||
|
||||
|
||||
// Called when a player selects an option in a player gossip window
|
||||
virtual void OnGossipSelect(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/) { }
|
||||
|
||||
// Called when a player selects an option in a player gossip window
|
||||
virtual void OnGossipSelectCode(Player* /*player*/, uint32 /*menu_id*/, uint32 /*sender*/, uint32 /*action*/, const char* /*code*/) { }
|
||||
|
||||
|
||||
//[/AZTH]
|
||||
};
|
||||
|
||||
@@ -924,6 +942,12 @@ class ScriptMgr
|
||||
bool OnItemUse(Player* player, Item* item, SpellCastTargets const& targets);
|
||||
bool OnItemExpire(Player* player, ItemTemplate const* proto);
|
||||
|
||||
// <AZTH
|
||||
void OnGossipSelect(Player* player, Item* item, uint32 sender, uint32 action);
|
||||
void OnGossipSelectCode(Player* player, Item* item, uint32 sender, uint32 action, const char* code);
|
||||
// >AZTH
|
||||
|
||||
|
||||
public: /* CreatureScript */
|
||||
|
||||
bool OnGossipHello(Player* player, Creature* creature);
|
||||
@@ -1044,6 +1068,8 @@ class ScriptMgr
|
||||
void OnCriteriaProgress(Player *player, AchievementCriteriaEntry const* criteria);
|
||||
void OnAchievementSave(SQLTransaction& trans, Player* player, uint16 achiId, CompletedAchievementData achiData);
|
||||
void OnCriteriaSave(SQLTransaction& trans, Player* player, uint16 critId, CriteriaProgress criteriaData);
|
||||
void OnGossipSelect(Player* player, uint32 menu_id, uint32 sender, uint32 action);
|
||||
void OnGossipSelectCode(Player* player, uint32 menu_id, uint32 sender, uint32 action, const char* code);
|
||||
// [/AZTH]
|
||||
|
||||
public: /* GuildScript */
|
||||
|
||||
Reference in New Issue
Block a user