WoW:API RollOnLoot: Difference between revisions

m
Edited Example, was "bad" coding style and wrong function name
(Starts or passes on a Loot roll started by WoW.)
 
m (Edited Example, was "bad" coding style and wrong function name)
Line 28: Line 28:


:Run the new function
:Run the new function
  function PartyLootCompanion_RollOnLoot(Rollid, roll)
  function YourAddon_RollOnLoot(Rollid, roll)
   if (roll ~= nil) then
   if (roll ~= nil) then
  DEFAULT_CHAT_FRAME:AddMessage("You rolled on the item with id: " .. Rollid );
    DEFAULT_CHAT_FRAME:AddMessage("You rolled on the item with id: " .. Rollid );
  Pre_WoW_Rollonloot(id, roll);
   else
   else
     DEFAULT_CHAT_FRAME:AddMessage("You passed on the item with id: " .. Rollid );
     DEFAULT_CHAT_FRAME:AddMessage("You passed on the item with id: " .. Rollid );
    Pre_WoW_Rollonloot(id, roll);
   end
   end
  Pre_WoW_Rollonloot(id, roll);
  end
  end


Anonymous user