Could someone please help me? I am trying to understand how the WoW interface and addons communicate with the MaNGOS emulator.
Blizzard_AuctionUI.xml shows this script on the Auction House BID button:
Code:
<OnClick>
PlaceAuctionBid("list", GetSelectedAuctionItem("list"), MoneyInputFrame_GetCopper(BrowseBidPrice));
self:Disable();
</OnClick>
Blizzard_AuctionUI.lua also calls the function, but does not define it (most likely because addons should not be able to add/remove money)
Code:
PlaceAuctionBid(AuctionFrame.type, GetSelectedAuctionItem(AuctionFrame.type), AuctionFrame.buyoutPrice);
And the MaNGOS file AuctionHouse.cpp has this function defined, which appears to execute the PlaceAuctionBid call:
Code:
void WorldSession::HandleAuctionPlaceBid( WorldPacket & recv_data ) { ... }
My question is, how does clicking the BID button on the auction house call the HandleAuctionPlaceBid function in MaNGOS? Where is the code that makes the call to PlaceAuctionBid execute the HandleAuctionPlaceBid function? And, in general, how do Lua and C++ communicate with each other?
Thanks!