EmperorFool
Deity
I'm heading out for the weekend, returning Monday, but off the top of my head I'm guessing that you need to put the target Civ into the TradeData.iData field.
Sorry for the lack of detail. Check MoreCiv4lerts for examples of checking the status of a trade. I think that's all you're missing.
BTW, if you want to match your naming style with the rest of the BUG code (and most mods I've seen so far), here are a few changes.
PHP:
tradeData.iData = iLoopLeader
# Check if it will trade, and if not, grab the DenialType
BTW, if you want to match your naming style with the rest of the BUG code (and most mods I've seen so far), here are a few changes.
- Use "p" as a prefix when "pointing" at an object instead of "gc".
- Technically, iLoopLeader is actually a player #; you'll see iLoopPlayer a lot. The pPlayer you get from gc.getPlayer(iLoopPlayer) has a method, getLeaderType() which returns a LeaderHeadType, technically the Leader #.