3 static const int GEAR_COUNT = 3;
4 static string m_FullGear[GEAR_COUNT] = {
"Shoulder",
"Melee",
"Back"};
8 ClientData.SyncEvent_OnEntityKilled.Insert(Event_OnEntityKilled);
9 ClientData.SyncEvent_OnPlayerIgnitedFireplace.Insert(Event_OnPlayerIgnitedFireplace);
12 void UnregisterEvents()
14 ClientData.SyncEvent_OnEntityKilled.Remove(Event_OnEntityKilled);
15 ClientData.SyncEvent_OnPlayerIgnitedFireplace.Remove(Event_OnPlayerIgnitedFireplace);
37 void OnActionCookedSteak()
45 void OnActionFinishedShaveSelf()
53 void OnActionFinishedGutDeer()
61 void OnActionRestrain()
69 void OnActionBandageTarget()
77 void OnItemAttachedAtPlayer(
EntityAI item,
string slot_name)
81 bool backpack_present;
84 if (
GetDayZGame().GetGameState() != DayZGameState.IN_GAME )
89 Man player =
GetGame().GetPlayer();
95 inventory = player.GetHumanInventory();
97 if ( player && inventory )
99 for (
int i = 0; i < GEAR_COUNT; ++i )
102 EntityAI att_item = inventory.FindAttachment( slot_id );
111 if (att_item.IsWeapon())
112 weapon_present =
true;
114 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(
InventorySlots.GetSlotIdFromString(
"Melee")))
115 melee_present =
true;
117 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(
InventorySlots.GetSlotIdFromString(
"Back")))
118 backpack_present =
true;
123 att_item = inventory.GetEntityInHands();
127 if (att_item.IsWeapon())
128 weapon_present =
true;
130 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(
InventorySlots.GetSlotIdFromString(
"Melee")) )
131 melee_present =
true;
133 else if (!att_item.IsWeapon() && att_item.GetInventory().HasInventorySlot(
InventorySlots.GetSlotIdFromString(
"Back")))
134 backpack_present =
true;
137 if (weapon_present && melee_present && backpack_present)
150 switch ( ignite_type )
177 Achievements.OnPlayerKilled(victim, killer, source, is_headshot);