const TIMER_ID1 = 691;
const TIMER_DELAY1 = 2000;
const HIGHLIGHT_ACCESSORY = "LineageEffectWD27.pnt_drop_accessary";
const HIGHLIGHT_ARMOR = "LineageEffectWD27.pnt_drop_armor";
const HIGHLIGHT_WEAPON = "LineageEffectWD27.pnt_drop_weapon";
var class<Emitter> HLEmitterClassWeapon;
var class<Emitter> HLEmitterClassArmor;
var class<Emitter> HLEmitterClassAccessory;
var WindowHandle wnd_RadarMap;
function OnLoad()
{
wnd_RadarMap = GetWindowHandle("RadarMapWnd");
HLEmitterClassWeapon = class<Emitter>(DynamicLoadObject(HIGHLIGHT_WEAPON, class'Class'));
HLEmitterClassArmor = class<Emitter>(DynamicLoadObject(HIGHLIGHT_ARMOR, class'Class'));
HLEmitterClassAccessory = class<Emitter>(DynamicLoadObject(HIGHLIGHT_ACCESSORY, class'Class'));
}
function OnEvent( int a_EventID, String a_Param )
{
switch( a_EventID )
{
case EV_UpdateUserInfo:
if (my_ID <= 0)
{
my_ID = class'UIDATA_PLAYER'.static.GetPlayerID();
if (my_ID > 0)
{
wnd_RadarMap.SetTimer(TIMER_ID1, TIMER_DELAY1);
}
}
else
{
}
break;
}
}
function OnTimer(int TimerID)
{
switch (TimerID)
{
case TIMER_ID1:
HandleOntimer();
break;
}
}
function HandleOntimer()
{
local Actor PlayerActor;
local Actor A;
if (inGamingState)
{
PlayerActor = GetPlayerActor();
foreach PlayerActor.CollidingActors( class 'Actor', A, 2000, PlayerActor.Location)
{
if (A.Tag == 'L2Pickup')
{
if (CheckDropActors(A))
{
continue;
}
}
}
}
}
function bool CheckDropActors(Actor DropActor)
{
local L2Pickup L2P;
local string MeshName;
local int dropType;
L2P = L2Pickup(DropActor);
if (L2P.DropEffectActor.Initialized == 1)
{
if (L2P.DropEffectActor.Tag == 'e_u056_b') // Tag - editable, Name - const
{
MeshName = DropActor.GetMeshName();
if (MeshName == "drop_ring_m00" || MeshName == "drop_earring_m00" || MeshName == "drop_necklace_m00")
{
dropType = 1;
}
else if (InStr(MeshName, "drop") == -1)
{
if (InStr(MeshName, "hield") == -1 && InStr(MeshName, "igil") == -1) // sShield sSigil
dropType = 2;
else
dropType = 3;
}
else if (MeshName == "drop_highlight_helmet" || (InStr(meshName, "_vamprbic_") == -1 && InStr(meshName, "_move_") == -1 && InStr(meshName, "_critical_") == -1 && InStr(meshName, "_speed_") == -1 //herbs
&& isArmorName(MeshName))) // if "_" >= 4
{
dropType = 3;
}
else
{
L2P.DropEffectActor.Tag = 'S'; //skip
return true;
}
L2P.DropEffectActor.Kill();
switch (dropType)
{
case 1:
L2P.DropEffectActor = DropActor.Spawn(HLEmitterClassAccessory, DropActor, , DropActor.Location, defaultRotion);
break;
case 2:
L2P.DropEffectActor = DropActor.Spawn(HLEmitterClassWeapon, DropActor, , DropActor.Location, defaultRotion);
break;
case 3:
L2P.DropEffectActor = DropActor.Spawn(HLEmitterClassArmor, DropActor, , DropActor.Location, defaultRotion);
break;
}
return true;
}
else
{
return true;
}
}
else
{
return true;
}
}