fix(premium): send auction menu from temporary spawned auctioneer
instead of squire
This commit is contained in:
@@ -3,7 +3,6 @@ local PLAYER_EVENT_ON_SPELL_CAST = 5
|
||||
local PLAYER_EVENT_ON_LOGOUT = 4
|
||||
local PLAYER_EVENT_ON_COMMAND = 42
|
||||
|
||||
local PREMIUM_FLAG_INDEX = 100
|
||||
|
||||
local ACCOUNT_FLAG_RECURRING_BILLING = 8192
|
||||
|
||||
@@ -11,6 +10,9 @@ local SUMMON_SQUIRE_SPELL_ID = 80000
|
||||
|
||||
local SQUIRE_CREATURE_TEMPLATE_ID = 9000001
|
||||
|
||||
local ALLIANCE_AUCTIONEER_CREATURE_TEMPLATE_ID = 15659
|
||||
local HORDE_AUCTIONEER_CREATURE_TEMPLATE_ID = 8673
|
||||
|
||||
local NPC_TEXT_ID = 10000000
|
||||
|
||||
local premiums_table = {}
|
||||
@@ -120,7 +122,6 @@ local function OnSummonSquireCast(player)
|
||||
|
||||
local squire = player:SpawnCreature(SQUIRE_CREATURE_TEMPLATE_ID, x + 1, y + 1, z, o, 1, 30000)
|
||||
squires_table[player:GetGUIDLow()] = squire:GetGUID()
|
||||
print(squires_table[player:GetGUIDLow()])
|
||||
|
||||
if squire then
|
||||
squire:SetFaction(player:GetFaction())
|
||||
@@ -159,7 +160,14 @@ local function OnGossipSelect(event, player, creature, sender, intid, code)
|
||||
end
|
||||
|
||||
if intid == 3 then
|
||||
player:SendAuctionMenu(creature)
|
||||
local x, y, z, o = player:GetLocation()
|
||||
local auctioneer_template = player:GetTeam() == 0 and ALLIANCE_AUCTIONEER_CREATURE_TEMPLATE_ID or
|
||||
HORDE_AUCTIONEER_CREATURE_TEMPLATE_ID
|
||||
local auctioneer = player:SpawnCreature(auctioneer_template, x, y, z, o, 1, 30000)
|
||||
auctioneer:SetDisplayId(11686)
|
||||
|
||||
player:SendAuctionMenu(auctioneer)
|
||||
|
||||
player:GossipComplete()
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user