DanF5771
Emperor
- Joined
- Feb 21, 2008
- Messages
- 1,194
AI seems to refuse trades for Bonuses and Civics with a DENIAL_ATTITUDE although it should definitely trade according to the leader's XML thresholds.
I'm not really C++ savvy, but I think the problem is somehow connected to the method
AttitudeTypes CvPlayerAI::AI_getAttitude(PlayerTypes ePlayer, bool bForced).
This seems to return ATTITUDE_CAUTIOUS even though I was FRIENDLY in various tests.
This method is e.g. called in
DenialTypes CvPlayerAI::AI_bonusTrade(BonusTypes eBonus, PlayerTypes ePlayer) const
After changing
eAttitude = AI_getAttitude(ePlayer);
to
eAttitude = GET_TEAM(getTeam()).AI_getAttitude( GET_PLAYER(ePlayer).getTeam() );
which retrieves the Team Attitude the trades work fine!
This might cause a multitude of problems throughout the whole game, whenever the PlayerAI's attitude is taken into consideration.
What is / Where am I wrong here???
I'm not really C++ savvy, but I think the problem is somehow connected to the method
AttitudeTypes CvPlayerAI::AI_getAttitude(PlayerTypes ePlayer, bool bForced).
This seems to return ATTITUDE_CAUTIOUS even though I was FRIENDLY in various tests.
This method is e.g. called in
DenialTypes CvPlayerAI::AI_bonusTrade(BonusTypes eBonus, PlayerTypes ePlayer) const
After changing
eAttitude = AI_getAttitude(ePlayer);
to
eAttitude = GET_TEAM(getTeam()).AI_getAttitude( GET_PLAYER(ePlayer).getTeam() );
which retrieves the Team Attitude the trades work fine!
This might cause a multitude of problems throughout the whole game, whenever the PlayerAI's attitude is taken into consideration.
What is / Where am I wrong here???