1 #ifndef __GAME_EVENT_HOOK_H 2 #define __GAME_EVENT_HOOK_H 3 4 #include "Types.h" 5 6 enum StrategicEventKind 7 { 8 EVENT_CHANGELIGHTVAL = 1, 9 EVENT_CHECKFORQUESTS = 4, 10 EVENT_AMBIENT = 5, 11 EVENT_AIM_RESET_MERC_ANNOYANCE = 6, 12 EVENT_BOBBYRAY_PURCHASE = 7, 13 EVENT_DAILY_UPDATE_BOBBY_RAY_INVENTORY = 8, 14 EVENT_UPDATE_BOBBY_RAY_INVENTORY = 9, 15 EVENT_DAILY_UPDATE_OF_MERC_SITE = 10, 16 EVENT_DAY3_ADD_EMAIL_FROM_SPECK = 11, 17 EVENT_DELAYED_HIRING_OF_MERC = 12, 18 EVENT_HANDLE_INSURED_MERCS = 13, 19 EVENT_PAY_LIFE_INSURANCE_FOR_DEAD_MERC = 14, 20 EVENT_MERC_DAILY_UPDATE = 15, 21 EVENT_GROUP_ARRIVAL = 18, 22 EVENT_DAY2_ADD_EMAIL_FROM_IMP = 19, 23 EVENT_MERC_COMPLAIN_EQUIPMENT = 20, 24 EVENT_HOURLY_UPDATE = 21, 25 EVENT_HANDLE_MINE_INCOME = 22, 26 EVENT_SETUP_MINE_INCOME = 23, 27 EVENT_SET_BY_NPC_SYSTEM = 27, 28 EVENT_SECOND_AIRPORT_ATTENDANT_ARRIVED = 28, 29 EVENT_HELICOPTER_HOVER_TOO_LONG = 29, 30 EVENT_HELICOPTER_HOVER_WAY_TOO_LONG = 30, 31 EVENT_MERC_LEAVE_EQUIP_IN_OMERTA = 32, 32 EVENT_MERC_LEAVE_EQUIP_IN_DRASSEN = 33, 33 EVENT_DAILY_EARLY_MORNING_EVENTS = 34, 34 EVENT_GROUP_ABOUT_TO_ARRIVE = 35, 35 EVENT_PROCESS_TACTICAL_SCHEDULE = 36, 36 EVENT_BEGINRAINSTORM = 37, 37 EVENT_ENDRAINSTORM = 38, 38 EVENT_MAKE_CIV_GROUP_HOSTILE_ON_NEXT_SECTOR_ENTRANCE = 41, 39 EVENT_BEGIN_AIR_RAID = 42, /** unused **/ 40 EVENT_MEANWHILE = 44, 41 EVENT_CREATURE_SPREAD = 46, 42 EVENT_CREATURE_NIGHT_PLANNING = 48, 43 EVENT_CREATURE_ATTACK = 49, 44 EVENT_EVALUATE_QUEEN_SITUATION = 50, 45 EVENT_CHECK_ENEMY_CONTROLLED_SECTOR = 51, 46 EVENT_TURN_ON_NIGHT_LIGHTS = 52, 47 EVENT_TURN_OFF_NIGHT_LIGHTS = 53, 48 EVENT_TURN_ON_PRIME_LIGHTS = 54, 49 EVENT_TURN_OFF_PRIME_LIGHTS = 55, 50 EVENT_MERC_ABOUT_TO_LEAVE = 56, 51 EVENT_ENRICO_MAIL = 58, 52 EVENT_INSURANCE_INVESTIGATION_STARTED = 59, 53 EVENT_INSURANCE_INVESTIGATION_OVER = 60, 54 EVENT_MINUTE_UPDATE = 61, 55 EVENT_TEMPERATURE_UPDATE = 62, 56 EVENT_KEITH_GOING_OUT_OF_BUSINESS = 63, 57 EVENT_MERC_SITE_BACK_ONLINE = 64, 58 EVENT_CHECK_IF_MINE_CLEARED = 66, 59 EVENT_REMOVE_ASSASSIN = 67, 60 EVENT_BANDAGE_BLEEDING_MERCS = 68, 61 EVENT_BEGIN_CONTRACT_RENEWAL_SEQUENCE = 72, 62 EVENT_RPC_WHINE_ABOUT_PAY = 73, 63 EVENT_HAVENT_MADE_IMP_CHARACTER_EMAIL = 74, 64 EVENT_RAINSTORM = 75, 65 EVENT_QUARTER_HOUR_UPDATE = 76, 66 EVENT_MERC_MERC_WENT_UP_LEVEL_EMAIL_DELAY = 77, 67 EVENT_MERC_SITE_NEW_MERC_AVAILABLE = 78, 68 69 NUMBER_OF_EVENT_TYPES 70 }; 71 72 // This value is added to the param value for NPC-system-created events which are based on an 73 // action rather than a fact: 74 #define NPC_SYSTEM_EVENT_ACTION_PARAM_BONUS 10000 75 76 //One Time Events 77 //These events are scheduled to happen, and when their time is up, they are processed 78 //once, and deleted. The first prototype requires the actual world time in minutes 79 //included the current day, and the additional ones are wrappers which calculate the 80 //actual world time for you. 81 BOOLEAN AddStrategicEvent(StrategicEventKind, UINT32 uiMinStamp, UINT32 uiParam); 82 BOOLEAN AddSameDayStrategicEvent(StrategicEventKind, UINT32 uiMinStamp, UINT32 uiParam); 83 BOOLEAN AddFutureDayStrategicEvent(StrategicEventKind, UINT32 uiMinStamp, UINT32 uiParam, UINT32 uiNumDaysFromPresent); 84 //Same but uses seconds instead of minutes. 85 BOOLEAN AddStrategicEventUsingSeconds(StrategicEventKind, UINT32 uiSecondStamp, UINT32 uiParam); 86 87 //Ranged Events 88 //In certain cases, you may wish to create an event that has a start time and an end 89 //time. If this is used, then the execution of the event will happen once at the 90 //beginning of the event and once at the expiration time of the event. A flag, 91 //pEvent->fEndEvent is set for the second call. It is up to you process it 92 //separately. An example use of ranged events would be for ambient sounds. The 93 //start time would be called to define the sounds for use within the game. The end 94 //time would be used to remove the sound from the system. 95 BOOLEAN AddSameDayRangedStrategicEvent(StrategicEventKind, UINT32 uiStartMin, UINT32 uiLengthMin, UINT32 uiParam); 96 97 //EveryDay Events 98 //A second special case event, this event will get processed automatically at the 99 //same time every day. Time of day lighting is a perfect example. Other events 100 //such as checking for quests, can also be automated using this system. NOTE: 101 //Only specify the time of day in minutes (don't add the actual day to this value) 102 BOOLEAN AddEveryDayStrategicEvent(StrategicEventKind, UINT32 uiStartMin, UINT32 uiParam); 103 104 //Periodic Events 105 //Event will get processed automatically once every X minutes. The period is added to the current time for 106 //the time stamp. 107 BOOLEAN AddPeriodStrategicEvent(StrategicEventKind, UINT32 uiOnceEveryXMinutes, UINT32 uiParam); 108 //Hybrids that aren't based from the current time. They are offsetted from the current time first. 109 BOOLEAN AddPeriodStrategicEventWithOffset(StrategicEventKind, UINT32 uiOnceEveryXMinutes, UINT32 uiOffsetFromCurrent, UINT32 uiParam); 110 111 /* Search for and remove the first event matching the supplied information. 112 * There may very well be a need for more specific event removal, so let me know 113 * (Kris), of any support needs. */ 114 void DeleteStrategicEvent(StrategicEventKind, UINT32 param); 115 void DeleteAllStrategicEventsOfType(StrategicEventKind); 116 void DeleteAllStrategicEvents(void); 117 118 #endif 119