CvMinorCivAI::AddNotification(CvString, CvString, PlayerTypes, int, int)
- Defined in
- CvMinorCivAI.cpp, line 3160
- Class
- CvMinorCivAI
- Hook name
CivHooks::CvMinorCivAI_AddNotification
Hooks
static bool BeforeCvMinorCivAI_AddNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void AfterCvMinorCivAI_AddNotification(CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);static void ReplaceCvMinorCivAI_AddNotification(void (*original)(CvMinorCivAI*, CvString, CvString, PlayerTypes, int, int), CvMinorCivAI* self, CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY);CivRegisterBefore<CivHooks::CvMinorCivAI_AddNotification>(host, &BeforeCvMinorCivAI_AddNotification);CivRegisterAfter<CivHooks::CvMinorCivAI_AddNotification>(host, &AfterCvMinorCivAI_AddNotification);CivRegisterReplace<CivHooks::CvMinorCivAI_AddNotification>(host, &ReplaceCvMinorCivAI_AddNotification);
Code
3159/// Notifications3160void CvMinorCivAI::AddNotification(CvString sString, CvString sSummaryString, PlayerTypes ePlayer, int iX, int iY)3161{3162 if(iX == -1 && iY == -1)3163 {3164 CvCity* capCity = GetPlayer()->getCapitalCity();31653166 if(capCity != NULL)3167 {3168 iX = capCity->getX();3169 iY = capCity->getY();3170 }3171 }31723173 CvNotifications* pNotifications = GET_PLAYER(ePlayer).GetNotifications();3174 if(pNotifications)3175 {3176 pNotifications->Add(NOTIFICATION_MINOR, sString, sSummaryString, iX, iY, GetPlayer()->GetID());3177 }3178}
Calls
- CvCity::getX() const
- CvCity::getY() const
- CvMinorCivAI::GetPlayer()
- CvNotifications::Add(NotificationTypes, const char *, const char *, int, int, int, int)
- CvPlayer::getCapitalCity()
- CvPlayer::GetID() const
- CvPlayer::GetNotifications() const
- CvPlayerAI::getPlayer(PlayerTypes)
CvString::operator const char *
Called by
- CvMinorCivAI::DoFriendship()
- CvMinorCivAI::DoIntrusion()
- CvMinorCivAI::DoLiberationByMajor(PlayerTypes, TeamTypes)
- CvMinorCivAI::DoSetBonus(PlayerTypes, bool, bool, bool, bool, bool, PlayerTypes)
- CvMinorCivAI::DoSpawnUnit(PlayerTypes, bool, bool)
- CvMinorCivAI::DoTeamDeclaredWarOnMe(TeamTypes)
- CvMinorCivAI::DoTestThreatenedAnnouncementForPlayer(PlayerTypes)
- CvMinorCivAI::DoThreateningBarbKilled(PlayerTypes, int, int)