копаясь в аи наткнулся на функцию GetDBSavingMap
судя из названия - мапка с инфой ключ-значение, подскажите что за инфа и откуда оно ее грузит
в наследниках данного аи не нашел записи подобных значений
используется например в аи ai_a_seed_elite_monster
судя из названия - мапка с инфой ключ-значение, подскажите что за инфа и откуда оно ее грузит
в наследниках данного аи не нашел записи подобных значений
используется например в аи ai_a_seed_elite_monster
C++:
set_compiler_opt base_event_type(@NTYPE_NPC_EVENT)
class ai_a_seed_elite_monster : combat_monster {
parameter:
int FieldCycle_ID = 0;
int FieldCycle_point = 0;
int max_desire = 10000000;
handler:
EventHandler NO_DESIRE() {
AddMoveAroundDesire(5, 5);
}
EventHandler PARTY_ATTACKED(attacker, damage, i10) {
if (myself.i_ai0 == 0) {
myself.i_ai0 = 1;
}
if (attacker.is_pc == 1) {
AddHateInfo(attacker, 1, 0, 1, 1);
} else if (attacker.is_pc == 0 && IsInCategory(@summon_npc_group, attacker.class_id) == 1) {
if (attacker.master.alive == 1) {
if (babble_mode == 1) {
Say("솬수한테 맞았습니다. 주인이 살아 있어 주인 헤이트값을 쌓습니다.");
}
AddHateInfo(attacker, 2, 0, 1, 1);
AddHateInfo(attacker.master, 1, 0, 1, 1);
i10 = GetHateInfoCount();
if (babble_mode == 1) {
Say("헤이트 인포에 있는 값들은 총 " + i10 + "개 입니다.");
}
} else if (attacker.master.alive == 0) {
AddAttackDesire(attacker, @AMT_MOVE_TO_TARGET, 100);
}
}
super;
}
EventHandler CREATED() {
myself.c_ai0 = GetNullCreature();
myself.c_ai1 = GetNullCreature();
super;
}
EventHandler ATTACKED(attacker, i0, skill_name_id, damage) {
if (FieldCycle_ID == 4) {
i0 = GetDBSavingMap(34);
if (i0 == 2 || i0 == 3) {
if (attacker.is_pc == 1) {
if (skill_name_id != 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 30), 0, 1, 1);
} else if (skill_name_id == 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 10), 0, 1, 1);
}
}
}
} else if (FieldCycle_ID == 5) {
i0 = GetDBSavingMap(36);
if (i0 == 2 || i0 == 3) {
if (attacker.is_pc == 1) {
if (skill_name_id != 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 30), 0, 1, 1);
} else if (skill_name_id == 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 10), 0, 1, 1);
}
}
}
} else if (FieldCycle_ID == 6) {
i0 = GetDBSavingMap(35);
if (i0 == 2 || i0 == 3) {
if (attacker.is_pc == 1) {
if (skill_name_id != 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 30), 0, 1, 1);
} else if (skill_name_id == 0 && IsInCategory(@tanker_group, attacker.occupation) == 1) {
AddHateInfo(attacker, FloatToInt(damage * 10), 0, 1, 1);
}
}
}
}
if (IsNullCreature(myself.c_ai0) == 1) {
if (IsInCategory(@wizard_group, attacker.occupation) == 1) {
myself.c_ai0 = attacker;
}
} else if (IsNullCreature(myself.c_ai1) == 1) {
if (IsInCategory(@wizard_group, attacker.occupation) == 1) {
myself.c_ai1 = attacker;
}
}
super;
}
EventHandler MY_DYING(pos0, c0, party0, c1, i0, i1, last_attacker) {
i0 = GetStep_FieldCycle(FieldCycle_ID);
i1 = FieldCycle_point;
if (i0 == 1) {
AddPoint_FieldCycle(FieldCycle_ID, FieldCycle_point, 1, myself.sm);
}
i0 = 0;
if (IsNullCreature(last_attacker) == 0) {
if (last_attacker.is_pc == 1) {
c0 = last_attacker;
} else if (IsInCategory(@summon_npc_group, last_attacker.class_id) == 1) {
c0 = last_attacker.master;
} else {
c0 = GetNullCreature();
}
if (IsNullCreature(c0) == 0) {
party0 = GetParty(c0);
if (IsNullParty(party0) == 0) {
c1 = GetMemberOfParty(party0, Rand(party0.member_count));
i0 = 10 + 10 * party0.member_count;
if (GetStep_FieldCycle(FieldCycle_ID) == 2) {
i0 = i0 * 2;
}
}
if (IsNullCreature(c1) == 0) {
if (DistFromMe(c0) < 2000 && DistFromMe(c1) < 2000 && Rand(1000) < i0) {
pos0 = GetRandomPosInCreature(c1, 10, 40);
CreateOnePrivateEx(@marguene, "ai_marguene", 0, 0, pos0.x, pos0.y, pos0.z, 0, 0, 0, GetIndexFromCreature(c1));
}
}
}
}
if (FieldCycle_ID == 4) {
i0 = GetDBSavingMap(34);
if (i0 == 3) {
if (IsNullCreature(myself.c_ai0) == 0 && IsNullCreature(myself.c_ai1) == 0) {
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) > 70) {
DropItem1(myself.sm, @greater_herb_of_mp_a, 1);
}
}
}
} else if (FieldCycle_ID == 5) {
i0 = GetDBSavingMap(36);
if (i0 == 3) {
if (IsNullCreature(myself.c_ai0) == 0 && IsNullCreature(myself.c_ai1) == 0) {
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) > 70) {
DropItem1(myself.sm, @greater_herb_of_mp_a, 1);
}
}
}
} else if (FieldCycle_ID == 6) {
i0 = GetDBSavingMap(35);
if (i0 == 3) {
if (IsNullCreature(myself.c_ai0) == 0 && IsNullCreature(myself.c_ai1) == 0) {
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) < 70) {
DropItem1(myself.sm, @herb_of_mp_a, 1);
}
if (Rand(100) > 70) {
DropItem1(myself.sm, @greater_herb_of_mp_a, 1);
}
}
}
}
super;
}
EventHandler USE_SKILL_FINISHED(skill_name_id, skill_id, target, i1, i2, i3, i4, i5) {
super;
}
}