L2UI.utx/nwindowХорошая работа
Вопрос: где лежат данные текстуры (выделение)? Слишком чопорно выглядят, хочу изменить.
Посмотреть вложение 92942
Now its fixed with the MultiSellWnd.uc you uploaded earlier.я ставил такое на интерлюд но я не понимаю работает ли оно
MulltiSellWnd.uc
that's true, in Lucera forum, one guy sell this xdThat was just a suggestion because lately people do very shady stuff reselling other people work etc but keep it up looks amazing.
А это прописано ?Посмотреть вложение 93009
в шапках в которых пропадает причёска , задняя часть головы пропадает и картинка.
Я тестил на капишонах которые оставляли только лицо всё работало, скорее всего твоя шапка в engine занимает какой-то отдельный слотда есть.Посмотреть вложение 93011
это происходит со шлемами у которых задняя часть головы с волосами вообще пропадает. На скрине прозрачный перс видно башки нет ток лицо.
class StatusWnd extends UICommonAPI;
var int m_UserID;
var bool m_bReceivedUserInfo;
var string m_WindowName;
var string hairAh;
var string hairBh;
var string faceStr;
var string hoodStr;
var Array<string> faceSubSplit;
var WindowHandle Me;
var TextureHandle statusPawnFace;
var TextureHandle statusPawnHairAh;
var TextureHandle statusPawnHairBh;
function OnLoad()
{
RegisterEvent( EV_RegenStatus );
RegisterEvent( EV_UpdateUserInfo );
RegisterEvent( EV_UpdateHP );
RegisterEvent( EV_UpdateMaxHP );
RegisterEvent( EV_UpdateMP );
RegisterEvent( EV_UpdateMaxMP );
RegisterEvent( EV_UpdateCP );
RegisterEvent( EV_UpdateMaxCP );
Me = GetHandle(m_WindowName);
statusPawnFace = TextureHandle(GetHandle(m_WindowName$".status_pawn_face"));
statusPawnHairAh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairah"));
statusPawnHairBh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairbh"));
}
function OnEnterState( name a_PreStateName )
{
local Array<string> cleanFaceSubSplit;
m_bReceivedUserInfo = False;
UpdateUserInfo();
statusPawnFace.SetTexture("");
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("");
hairAh = "";
hairBh = "";
faceStr = "";
hoodStr = "";
faceSubSplit = cleanFaceSubSplit;
}
function OnLButtonDown( WindowHandle a_WindowHandle, int X, int Y )
{
local Rect rectWnd;
class'UIAPI_WINDOW'.static.SetResizeFrameSize(m_WindowName$".CPBarTex.CPBarName", 20, 9);
rectWnd = Me.GetRect();
if ( X > (rectWnd.nX + 84) && X < (rectWnd.nX + rectWnd.nWidth - 18) )
RequestSelfTarget();
else if ( a_WindowHandle == GetHandle(m_WindowName$".UserInfo") )
Me.SetDraggable(True);
else
Me.SetDraggable(False);
}
function OnEvent( int a_EventID, string a_Param )
{
switch ( a_EventID )
{
case EV_UpdateUserInfo:
UpdateUserInfo();
break;
case EV_UpdateHP:
case EV_UpdateMaxHP:
case EV_UpdateMP:
case EV_UpdateMaxMP:
case EV_UpdateCP:
case EV_UpdateMaxCP:
HandleUpdateInfo( a_Param );
break;
case EV_RegenStatus:
HandleRegenStatus( a_Param );
break;
}
}
function OnTick()
{
local Actor MyActor;
local string newHairBh;
local string newHoodStr;
local string newFaceStr;
local Array<string> faceSplit;
local Array<string> hairBhSplit;
local Array<string> hairBhSubSplit;
if ( !GetPlayerActor(MyActor) )
return;
newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type
newHoodStr = string(MyActor.Instigator.SubSkins[3]); //
newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color)
hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color)
SetDebugMsg("0: "$MyActor.Instigator.SubSkins[0]);
SetDebugMsg("1: "$MyActor.Instigator.SubSkins[1]);
SetDebugMsg("2: "$MyActor.Instigator.SubSkins[2]);
SetDebugMsg("3: "$MyActor.Instigator.SubSkins[3]);
SetDebugMsg("4: "$MyActor.Instigator.SubSkins[4]);
SetDebugMsg("5: "$MyActor.Instigator.SubSkins[5]);
SetDebugMsg("6: "$MyActor.Instigator.SubSkins[6]);
SetDebugMsg("7: "$MyActor.Instigator.SubSkins[7]);
SetDebugMsg("8: "$MyActor.Instigator.SubSkins[8]);
if ( Right(newFaceStr, 1) != "1" ) // моргание
{
if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" )
{
faceStr = newFaceStr;
SetDebugMsg("FACE: "$faceStr);
Split(faceStr, ".", faceSplit);
Split(faceSplit[2], "_", faceSubSplit);
statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]);
}
}
if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh )
{
hairBh = newHairBh;
//SetDebugMsg("BH: "$hairBh);
Split(hairBh, ".", hairBhSplit);
Split(hairBhSplit[2], "_", hairBhSubSplit);
if ( hairBhSubSplit[1] == "m008" )
hairBhSubSplit[1] = "m009";
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh");
if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) )
{
//SetDebugMsg("Have AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah");
}
}
else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr )
{
if ( faceSubSplit[0] != "" )
hoodStr = newHoodStr;
//SetDebugMsg("hoodStr: "$hoodStr);
statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh");
if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" )
{
//SetDebugMsg("hood AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah");
}
}
}
function bool isDrawenAh( Array<string> hairBh )
{
if ( hairBh[1] == "m009" && hairBh[0] != "MShaman" && hairBh[0] != "FShaman" && hairBh[0] != "MOrc" && hairBh[0] != "FOrc" )
return True;
switch ( hairBh[0] )
{
case "MDarkElf":
if ( hairBh[1] == "m002" )
return True;
break;
case "FDarkElf":
if ( hairBh[1] == "m006" )
return True;
break;
case "FMagic":
if ( hairBh[1] == "m001" )
return True;
break;
case "FShaman":
if ( hairBh[1] == "m000" || hairBh[1] == "m006" )
return True;
break;
case "MDwarf":
return True;
break;
default:
return False;
break;
}
return False;
}
function HandleUpdateInfo( string param )
{
local int ServerID;
ParseInt( param, "ServerID", ServerID );
if ( m_UserID == ServerID || !m_bReceivedUserInfo )
UpdateUserInfo();
}
function HandleRegenStatus( string param )
{
local int type;
local int duration;
local int ticks;
local float amount;
ParseInt( param, "Type", type );
if ( type == 1 )
{
ParseInt( param, "Duration", duration );
ParseInt( param, "Ticks", ticks );
ParseFloat( param, "Amount", amount );
//class'UIAPI_STATUSBARCTRL'.static.SetRegenInfo(m_WindowName$".HPBar", duration, ticks, amount);
}
}
function UpdateUserInfo()
{
local UserInfo userinfo;
local string level;
if ( GetPlayerInfo( userinfo ) )
{
m_bReceivedUserInfo = True;
m_UserID = userinfo.nID;
UpdateGaugeBarTex("CP", userinfo.nCurCP, userinfo.nMaxCP);
UpdateGaugeBarTex("HP", userinfo.nCurHP, userinfo.nMaxHP);
UpdateGaugeBarTex("MP", userinfo.nCurMP, userinfo.nMaxMP);
level = string(userinfo.nLevel);
if ( Len(userinfo.nLevel) == 1 )
level = "0"$level;
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$".UserInfo.txtStatusLevel", level);
}
}
function UpdateGaugeBarTex( string type, float curVal, float maxVal )
{
class'UIAPI_WINDOW'.static.SetWindowSizeRel(m_WindowName$"."$type$"BarTex."$type$"Tex_center", curVal / maxVal, 1.0, 0, 0);
if ( type == "HP" || type == "MP" )
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValueShadow", int(curVal)$"/"$int(maxVal));
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValue", int(curVal)$"/"$int(maxVal));
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left");
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right");
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail");
if ( curVal > 0.0 )
{
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left");
if ( curVal == maxVal )
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right");
else
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail");
}
}
defaultproperties
{
m_WindowName="StatusWnd"
}
Я тестил на капишонах которые оставляли только лицо всё работало, скорее всего твоя шапка в engine занимает какой-то отдельный слот
замени код StatusWnd на этот и попробуй посмотреть в debug окне (alt+g -> debug) на какой цифре не пустая строка
C-подобный:class StatusWnd extends UICommonAPI; var int m_UserID; var bool m_bReceivedUserInfo; var string m_WindowName; var string hairAh; var string hairBh; var string faceStr; var string hoodStr; var Array<string> faceSubSplit; var WindowHandle Me; var TextureHandle statusPawnFace; var TextureHandle statusPawnHairAh; var TextureHandle statusPawnHairBh; function OnLoad() { RegisterEvent( EV_RegenStatus ); RegisterEvent( EV_UpdateUserInfo ); RegisterEvent( EV_UpdateHP ); RegisterEvent( EV_UpdateMaxHP ); RegisterEvent( EV_UpdateMP ); RegisterEvent( EV_UpdateMaxMP ); RegisterEvent( EV_UpdateCP ); RegisterEvent( EV_UpdateMaxCP ); Me = GetHandle(m_WindowName); statusPawnFace = TextureHandle(GetHandle(m_WindowName$".status_pawn_face")); statusPawnHairAh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairah")); statusPawnHairBh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairbh")); } function OnEnterState( name a_PreStateName ) { local Array<string> cleanFaceSubSplit; m_bReceivedUserInfo = False; UpdateUserInfo(); statusPawnFace.SetTexture(""); statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture(""); hairAh = ""; hairBh = ""; faceStr = ""; hoodStr = ""; faceSubSplit = cleanFaceSubSplit; } function OnLButtonDown( WindowHandle a_WindowHandle, int X, int Y ) { local Rect rectWnd; class'UIAPI_WINDOW'.static.SetResizeFrameSize(m_WindowName$".CPBarTex.CPBarName", 20, 9); rectWnd = Me.GetRect(); if ( X > (rectWnd.nX + 84) && X < (rectWnd.nX + rectWnd.nWidth - 18) ) RequestSelfTarget(); else if ( a_WindowHandle == GetHandle(m_WindowName$".UserInfo") ) Me.SetDraggable(True); else Me.SetDraggable(False); } function OnEvent( int a_EventID, string a_Param ) { switch ( a_EventID ) { case EV_UpdateUserInfo: UpdateUserInfo(); break; case EV_UpdateHP: case EV_UpdateMaxHP: case EV_UpdateMP: case EV_UpdateMaxMP: case EV_UpdateCP: case EV_UpdateMaxCP: HandleUpdateInfo( a_Param ); break; case EV_RegenStatus: HandleRegenStatus( a_Param ); break; } } function OnTick() { local Actor MyActor; local string newHairBh; local string newHoodStr; local string newFaceStr; local Array<string> faceSplit; local Array<string> hairBhSplit; local Array<string> hairBhSubSplit; if ( !GetPlayerActor(MyActor) ) return; newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type newHoodStr = string(MyActor.Instigator.SubSkins[3]); // newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color) hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color) SetDebugMsg("0: "$MyActor.Instigator.SubSkins[0]); SetDebugMsg("1: "$MyActor.Instigator.SubSkins[1]); SetDebugMsg("2: "$MyActor.Instigator.SubSkins[2]); SetDebugMsg("3: "$MyActor.Instigator.SubSkins[3]); SetDebugMsg("4: "$MyActor.Instigator.SubSkins[4]); SetDebugMsg("5: "$MyActor.Instigator.SubSkins[5]); SetDebugMsg("6: "$MyActor.Instigator.SubSkins[6]); SetDebugMsg("7: "$MyActor.Instigator.SubSkins[7]); SetDebugMsg("8: "$MyActor.Instigator.SubSkins[8]); if ( Right(newFaceStr, 1) != "1" ) // моргание { if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" ) { faceStr = newFaceStr; SetDebugMsg("FACE: "$faceStr); Split(faceStr, ".", faceSplit); Split(faceSplit[2], "_", faceSubSplit); statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]); } } if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh ) { hairBh = newHairBh; //SetDebugMsg("BH: "$hairBh); Split(hairBh, ".", hairBhSplit); Split(hairBhSplit[2], "_", hairBhSubSplit); if ( hairBhSubSplit[1] == "m008" ) hairBhSubSplit[1] = "m009"; statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh"); if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) ) { //SetDebugMsg("Have AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah"); } } else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr ) { if ( faceSubSplit[0] != "" ) hoodStr = newHoodStr; //SetDebugMsg("hoodStr: "$hoodStr); statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh"); if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" ) { //SetDebugMsg("hood AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah"); } } } function bool isDrawenAh( Array<string> hairBh ) { if ( hairBh[1] == "m009" && hairBh[0] != "MShaman" && hairBh[0] != "FShaman" && hairBh[0] != "MOrc" && hairBh[0] != "FOrc" ) return True; switch ( hairBh[0] ) { case "MDarkElf": if ( hairBh[1] == "m002" ) return True; break; case "FDarkElf": if ( hairBh[1] == "m006" ) return True; break; case "FMagic": if ( hairBh[1] == "m001" ) return True; break; case "FShaman": if ( hairBh[1] == "m000" || hairBh[1] == "m006" ) return True; break; case "MDwarf": return True; break; default: return False; break; } return False; } function HandleUpdateInfo( string param ) { local int ServerID; ParseInt( param, "ServerID", ServerID ); if ( m_UserID == ServerID || !m_bReceivedUserInfo ) UpdateUserInfo(); } function HandleRegenStatus( string param ) { local int type; local int duration; local int ticks; local float amount; ParseInt( param, "Type", type ); if ( type == 1 ) { ParseInt( param, "Duration", duration ); ParseInt( param, "Ticks", ticks ); ParseFloat( param, "Amount", amount ); //class'UIAPI_STATUSBARCTRL'.static.SetRegenInfo(m_WindowName$".HPBar", duration, ticks, amount); } } function UpdateUserInfo() { local UserInfo userinfo; local string level; if ( GetPlayerInfo( userinfo ) ) { m_bReceivedUserInfo = True; m_UserID = userinfo.nID; UpdateGaugeBarTex("CP", userinfo.nCurCP, userinfo.nMaxCP); UpdateGaugeBarTex("HP", userinfo.nCurHP, userinfo.nMaxHP); UpdateGaugeBarTex("MP", userinfo.nCurMP, userinfo.nMaxMP); level = string(userinfo.nLevel); if ( Len(userinfo.nLevel) == 1 ) level = "0"$level; class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$".UserInfo.txtStatusLevel", level); } } function UpdateGaugeBarTex( string type, float curVal, float maxVal ) { class'UIAPI_WINDOW'.static.SetWindowSizeRel(m_WindowName$"."$type$"BarTex."$type$"Tex_center", curVal / maxVal, 1.0, 0, 0); if ( type == "HP" || type == "MP" ) class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValueShadow", int(curVal)$"/"$int(maxVal)); class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValue", int(curVal)$"/"$int(maxVal)); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left"); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right"); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail"); if ( curVal > 0.0 ) { ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left"); if ( curVal == maxVal ) ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right"); else ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail"); } } defaultproperties { m_WindowName="StatusWnd" }
попробуй пока что этот код, если не поможет то сутра буду ставить себе украшения и теститьчутка не понял про непустые строки )
class StatusWnd extends UICommonAPI;
var int m_UserID;
var bool m_bReceivedUserInfo;
var string m_WindowName;
var string hairAh;
var string hairBh;
var string faceStr;
var string hoodStr;
var string maskStr;
var Array<string> faceSubSplit;
var WindowHandle Me;
var TextureHandle statusPawnFace;
var TextureHandle statusPawnHairAh;
var TextureHandle statusPawnHairBh;
function OnLoad()
{
RegisterEvent( EV_RegenStatus );
RegisterEvent( EV_UpdateUserInfo );
RegisterEvent( EV_UpdateHP );
RegisterEvent( EV_UpdateMaxHP );
RegisterEvent( EV_UpdateMP );
RegisterEvent( EV_UpdateMaxMP );
RegisterEvent( EV_UpdateCP );
RegisterEvent( EV_UpdateMaxCP );
Me = GetHandle(m_WindowName);
statusPawnFace = TextureHandle(GetHandle(m_WindowName$".status_pawn_face"));
statusPawnHairAh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairah"));
statusPawnHairBh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairbh"));
}
function OnEnterState( name a_PreStateName )
{
local Array<string> cleanFaceSubSplit;
m_bReceivedUserInfo = False;
UpdateUserInfo();
statusPawnFace.SetTexture("");
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("");
hairAh = "";
hairBh = "";
faceStr = "";
hoodStr = "";
faceSubSplit = cleanFaceSubSplit;
}
function OnLButtonDown( WindowHandle a_WindowHandle, int X, int Y )
{
local Rect rectWnd;
class'UIAPI_WINDOW'.static.SetResizeFrameSize(m_WindowName$".CPBarTex.CPBarName", 20, 9);
rectWnd = Me.GetRect();
if ( X > (rectWnd.nX + 84) && X < (rectWnd.nX + rectWnd.nWidth - 18) )
RequestSelfTarget();
else if ( a_WindowHandle == GetHandle(m_WindowName$".UserInfo") )
Me.SetDraggable(True);
else
Me.SetDraggable(False);
}
function OnEvent( int a_EventID, string a_Param )
{
switch ( a_EventID )
{
case EV_UpdateUserInfo:
UpdateUserInfo();
break;
case EV_UpdateHP:
case EV_UpdateMaxHP:
case EV_UpdateMP:
case EV_UpdateMaxMP:
case EV_UpdateCP:
case EV_UpdateMaxCP:
HandleUpdateInfo( a_Param );
break;
case EV_RegenStatus:
HandleRegenStatus( a_Param );
break;
}
}
function OnTick()
{
local Actor MyActor;
local string newHairBh;
local string newHoodStr;
local string newFaceStr;
local string newMaskStr;
local Array<string> faceSplit;
local Array<string> hairBhSplit;
local Array<string> hairBhSubSplit;
if ( !GetPlayerActor(MyActor) )
return;
newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type
newHoodStr = string(MyActor.Instigator.SubSkins[3]); //
newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color)
hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color)
newMaskStr = string(MyActor.Instigator.SubSkins[7]); //
if ( Right(newFaceStr, 1) != "1" ) // моргание
{
if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" )
{
faceStr = newFaceStr;
SetDebugMsg("FACE: "$faceStr);
Split(faceStr, ".", faceSplit);
Split(faceSplit[2], "_", faceSubSplit);
statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]);
}
}
if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh )
{
hairBh = newHairBh;
//SetDebugMsg("BH: "$hairBh);
Split(hairBh, ".", hairBhSplit);
Split(hairBhSplit[2], "_", hairBhSubSplit);
if ( hairBhSubSplit[1] == "m008" )
hairBhSubSplit[1] = "m009";
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh");
if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) )
{
//SetDebugMsg("Have AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah");
}
}
else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr )
{
if ( faceSubSplit[0] != "" )
hoodStr = newHoodStr;
//SetDebugMsg("hoodStr: "$hoodStr);
statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh");
if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" )
{
//SetDebugMsg("hood AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah");
}
}
else if ( newHairBh == "None" && newMaskStr != "" && newMaskStr != "None" && maskStr != newMaskStr )
{
if ( faceSubSplit[0] != "" )
maskStr = newMaskStr;
//SetDebugMsg("hoodStr: "$hoodStr);
statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh");
if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" )
{
//SetDebugMsg("hood AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah");
}
}
}
function bool isDrawenAh( Array<string> hairBh )
{
if ( hairBh[1] == "m009" && hairBh[0] != "MShaman" && hairBh[0] != "FShaman" && hairBh[0] != "MOrc" && hairBh[0] != "FOrc" )
return True;
switch ( hairBh[0] )
{
case "MDarkElf":
if ( hairBh[1] == "m002" )
return True;
break;
case "FDarkElf":
if ( hairBh[1] == "m006" )
return True;
break;
case "FMagic":
if ( hairBh[1] == "m001" )
return True;
break;
case "FShaman":
if ( hairBh[1] == "m000" || hairBh[1] == "m006" )
return True;
break;
case "MDwarf":
return True;
break;
default:
return False;
break;
}
return False;
}
function HandleUpdateInfo( string param )
{
local int ServerID;
ParseInt( param, "ServerID", ServerID );
if ( m_UserID == ServerID || !m_bReceivedUserInfo )
UpdateUserInfo();
}
function HandleRegenStatus( string param )
{
local int type;
local int duration;
local int ticks;
local float amount;
ParseInt( param, "Type", type );
if ( type == 1 )
{
ParseInt( param, "Duration", duration );
ParseInt( param, "Ticks", ticks );
ParseFloat( param, "Amount", amount );
//class'UIAPI_STATUSBARCTRL'.static.SetRegenInfo(m_WindowName$".HPBar", duration, ticks, amount);
}
}
function UpdateUserInfo()
{
local UserInfo userinfo;
local string level;
if ( GetPlayerInfo( userinfo ) )
{
m_bReceivedUserInfo = True;
m_UserID = userinfo.nID;
UpdateGaugeBarTex("CP", userinfo.nCurCP, userinfo.nMaxCP);
UpdateGaugeBarTex("HP", userinfo.nCurHP, userinfo.nMaxHP);
UpdateGaugeBarTex("MP", userinfo.nCurMP, userinfo.nMaxMP);
level = string(userinfo.nLevel);
if ( Len(userinfo.nLevel) == 1 )
level = "0"$level;
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$".UserInfo.txtStatusLevel", level);
}
}
function UpdateGaugeBarTex( string type, float curVal, float maxVal )
{
class'UIAPI_WINDOW'.static.SetWindowSizeRel(m_WindowName$"."$type$"BarTex."$type$"Tex_center", curVal / maxVal, 1.0, 0, 0);
if ( type == "HP" || type == "MP" )
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValueShadow", int(curVal)$"/"$int(maxVal));
class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValue", int(curVal)$"/"$int(maxVal));
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left");
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right");
HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail");
if ( curVal > 0.0 )
{
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left");
if ( curVal == maxVal )
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right");
else
ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail");
}
}
defaultproperties
{
m_WindowName="StatusWnd"
}
не помоглопопробуй пока что этот код, если не поможет то сутра буду ставить себе украшения и тестить
C-подобный:class StatusWnd extends UICommonAPI; var int m_UserID; var bool m_bReceivedUserInfo; var string m_WindowName; var string hairAh; var string hairBh; var string faceStr; var string hoodStr; var string maskStr; var Array<string> faceSubSplit; var WindowHandle Me; var TextureHandle statusPawnFace; var TextureHandle statusPawnHairAh; var TextureHandle statusPawnHairBh; function OnLoad() { RegisterEvent( EV_RegenStatus ); RegisterEvent( EV_UpdateUserInfo ); RegisterEvent( EV_UpdateHP ); RegisterEvent( EV_UpdateMaxHP ); RegisterEvent( EV_UpdateMP ); RegisterEvent( EV_UpdateMaxMP ); RegisterEvent( EV_UpdateCP ); RegisterEvent( EV_UpdateMaxCP ); Me = GetHandle(m_WindowName); statusPawnFace = TextureHandle(GetHandle(m_WindowName$".status_pawn_face")); statusPawnHairAh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairah")); statusPawnHairBh = TextureHandle(GetHandle(m_WindowName$".status_pawn_hairbh")); } function OnEnterState( name a_PreStateName ) { local Array<string> cleanFaceSubSplit; m_bReceivedUserInfo = False; UpdateUserInfo(); statusPawnFace.SetTexture(""); statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture(""); hairAh = ""; hairBh = ""; faceStr = ""; hoodStr = ""; faceSubSplit = cleanFaceSubSplit; } function OnLButtonDown( WindowHandle a_WindowHandle, int X, int Y ) { local Rect rectWnd; class'UIAPI_WINDOW'.static.SetResizeFrameSize(m_WindowName$".CPBarTex.CPBarName", 20, 9); rectWnd = Me.GetRect(); if ( X > (rectWnd.nX + 84) && X < (rectWnd.nX + rectWnd.nWidth - 18) ) RequestSelfTarget(); else if ( a_WindowHandle == GetHandle(m_WindowName$".UserInfo") ) Me.SetDraggable(True); else Me.SetDraggable(False); } function OnEvent( int a_EventID, string a_Param ) { switch ( a_EventID ) { case EV_UpdateUserInfo: UpdateUserInfo(); break; case EV_UpdateHP: case EV_UpdateMaxHP: case EV_UpdateMP: case EV_UpdateMaxMP: case EV_UpdateCP: case EV_UpdateMaxCP: HandleUpdateInfo( a_Param ); break; case EV_RegenStatus: HandleRegenStatus( a_Param ); break; } } function OnTick() { local Actor MyActor; local string newHairBh; local string newHoodStr; local string newFaceStr; local string newMaskStr; local Array<string> faceSplit; local Array<string> hairBhSplit; local Array<string> hairBhSubSplit; if ( !GetPlayerActor(MyActor) ) return; newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type newHoodStr = string(MyActor.Instigator.SubSkins[3]); // newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color) hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color) newMaskStr = string(MyActor.Instigator.SubSkins[7]); // if ( Right(newFaceStr, 1) != "1" ) // моргание { if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" ) { faceStr = newFaceStr; SetDebugMsg("FACE: "$faceStr); Split(faceStr, ".", faceSplit); Split(faceSplit[2], "_", faceSubSplit); statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]); } } if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh ) { hairBh = newHairBh; //SetDebugMsg("BH: "$hairBh); Split(hairBh, ".", hairBhSplit); Split(hairBhSplit[2], "_", hairBhSubSplit); if ( hairBhSubSplit[1] == "m008" ) hairBhSubSplit[1] = "m009"; statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh"); if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) ) { //SetDebugMsg("Have AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah"); } } else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr ) { if ( faceSubSplit[0] != "" ) hoodStr = newHoodStr; //SetDebugMsg("hoodStr: "$hoodStr); statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh"); if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" ) { //SetDebugMsg("hood AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah"); } } else if ( newHairBh == "None" && newMaskStr != "" && newMaskStr != "None" && maskStr != newMaskStr ) { if ( faceSubSplit[0] != "" ) maskStr = newMaskStr; //SetDebugMsg("hoodStr: "$hoodStr); statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh"); if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" ) { //SetDebugMsg("hood AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah"); } } } function bool isDrawenAh( Array<string> hairBh ) { if ( hairBh[1] == "m009" && hairBh[0] != "MShaman" && hairBh[0] != "FShaman" && hairBh[0] != "MOrc" && hairBh[0] != "FOrc" ) return True; switch ( hairBh[0] ) { case "MDarkElf": if ( hairBh[1] == "m002" ) return True; break; case "FDarkElf": if ( hairBh[1] == "m006" ) return True; break; case "FMagic": if ( hairBh[1] == "m001" ) return True; break; case "FShaman": if ( hairBh[1] == "m000" || hairBh[1] == "m006" ) return True; break; case "MDwarf": return True; break; default: return False; break; } return False; } function HandleUpdateInfo( string param ) { local int ServerID; ParseInt( param, "ServerID", ServerID ); if ( m_UserID == ServerID || !m_bReceivedUserInfo ) UpdateUserInfo(); } function HandleRegenStatus( string param ) { local int type; local int duration; local int ticks; local float amount; ParseInt( param, "Type", type ); if ( type == 1 ) { ParseInt( param, "Duration", duration ); ParseInt( param, "Ticks", ticks ); ParseFloat( param, "Amount", amount ); //class'UIAPI_STATUSBARCTRL'.static.SetRegenInfo(m_WindowName$".HPBar", duration, ticks, amount); } } function UpdateUserInfo() { local UserInfo userinfo; local string level; if ( GetPlayerInfo( userinfo ) ) { m_bReceivedUserInfo = True; m_UserID = userinfo.nID; UpdateGaugeBarTex("CP", userinfo.nCurCP, userinfo.nMaxCP); UpdateGaugeBarTex("HP", userinfo.nCurHP, userinfo.nMaxHP); UpdateGaugeBarTex("MP", userinfo.nCurMP, userinfo.nMaxMP); level = string(userinfo.nLevel); if ( Len(userinfo.nLevel) == 1 ) level = "0"$level; class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$".UserInfo.txtStatusLevel", level); } } function UpdateGaugeBarTex( string type, float curVal, float maxVal ) { class'UIAPI_WINDOW'.static.SetWindowSizeRel(m_WindowName$"."$type$"BarTex."$type$"Tex_center", curVal / maxVal, 1.0, 0, 0); if ( type == "HP" || type == "MP" ) class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValueShadow", int(curVal)$"/"$int(maxVal)); class'UIAPI_TEXTBOX'.static.SetText(m_WindowName$"."$type$"BarTex."$type$"BarValue", int(curVal)$"/"$int(maxVal)); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left"); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right"); HideWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail"); if ( curVal > 0.0 ) { ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_left"); if ( curVal == maxVal ) ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_right"); else ShowWindow(m_WindowName$"."$type$"BarTex."$type$"Tex_trail"); } } defaultproperties { m_WindowName="StatusWnd" }
Не понимаю чего-то) Попробовал свой последний код всё вроде воркает, что за маски у тебя и какие прописаны у них слоты в инвентаре?не помогло
HEIR или HEIR_ALL оба проверил.Не понимаю чего-то) Попробовал свой последний код всё вроде воркает, что за маски у тебя и какие прописаны у них слоты в инвентаре?
Попробуй в коде последнем что я давал замени функциюHEIR или HEIR_ALL оба проверил.
Пак от сюда качал Пак костюмов от wizard
Мож в орках трабла.
Petr да на эльфах проверил работает
function OnTick()
{
local Actor MyActor;
local string newHairBh;
local string newHoodStr;
local string newFaceStr;
local string newMaskStr;
local Array<string> faceSplit;
local Array<string> hairBhSplit;
local Array<string> hairBhSubSplit;
if ( !GetPlayerActor(MyActor) )
return;
newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type
newHoodStr = string(MyActor.Instigator.SubSkins[3]); //
newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color)
hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color)
newMaskStr = string(MyActor.Instigator.SubSkins[7]); //
if ( Right(newFaceStr, 1) != "1" ) // моргание
{
if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" )
{
faceStr = newFaceStr;
SetDebugMsg("FACE: "$faceStr);
Split(faceStr, ".", faceSplit);
Split(faceSplit[2], "_", faceSubSplit);
statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]);
}
}
if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh )
{
hairBh = newHairBh;
SetDebugMsg("BH: "$hairBh);
Split(hairBh, ".", hairBhSplit);
Split(hairBhSplit[2], "_", hairBhSubSplit);
if ( hairBhSubSplit[1] == "m008" )
hairBhSubSplit[1] = "m009";
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh");
if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) )
{
SetDebugMsg("Have AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah");
}
}
else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr )
{
if ( faceSubSplit[0] != "" )
hoodStr = newHoodStr;
SetDebugMsg("hoodStr: "$hoodStr);
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh");
if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" )
{
SetDebugMsg("hood AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah");
}
}
else if ( newHairBh == "None" && newMaskStr != "" && newMaskStr != "None" && maskStr != newMaskStr )
{
if ( faceSubSplit[0] != "" )
maskStr = newMaskStr;
SetDebugMsg("newMaskStr: "$newMaskStr);
statusPawnHairAh.SetTexture("");
statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh");
if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" )
{
SetDebugMsg("hood AH: "$hairAh);
statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah");
}
}
}
Попробуй в коде последнем что я давал замени функцию
Тут из изменений только сброс текстуры чёлки перед прорисовкойC-подобный:function OnTick() { local Actor MyActor; local string newHairBh; local string newHoodStr; local string newFaceStr; local string newMaskStr; local Array<string> faceSplit; local Array<string> hairBhSplit; local Array<string> hairBhSubSplit; if ( !GetPlayerActor(MyActor) ) return; newFaceStr = string(MyActor.Skins[0]); // Fighter.face.MFighter_m000_t00_f // t00_t02 - face type newHoodStr = string(MyActor.Instigator.SubSkins[3]); // newHairBh = string(MyActor.Instigator.SubSkins[4]); // Fighter.hair_color.MFighter_m004_t00_m00_bh (backhead- m000-m004 hair style | t00_t02 - hair color) hairAh = string(MyActor.Instigator.SubSkins[5]); // Fighter.hair_color.MFighter_m004_t00_m00_ah (ahead - m000-m004 hair style | t00_t02 - hair color) newMaskStr = string(MyActor.Instigator.SubSkins[7]); // if ( Right(newFaceStr, 1) != "1" ) // моргание { if ( faceStr != newFaceStr && newFaceStr != "None" && newFaceStr != "" ) { faceStr = newFaceStr; SetDebugMsg("FACE: "$faceStr); Split(faceStr, ".", faceSplit); Split(faceSplit[2], "_", faceSubSplit); statusPawnFace.SetTexture("L2_Pawn."$faceSubSplit[0]$"."$faceSplit[2]); } } if ( newHairBh != "" && newHairBh != "None" && hairBh != newHairBh ) { hairBh = newHairBh; SetDebugMsg("BH: "$hairBh); Split(hairBh, ".", hairBhSplit); Split(hairBhSplit[2], "_", hairBhSubSplit); if ( hairBhSubSplit[1] == "m008" ) hairBhSubSplit[1] = "m009"; statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_bh"); if ( (hairAh != "None" && hairAh != "") || isDrawenAh(hairBhSubSplit) ) { SetDebugMsg("Have AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$hairBhSplit[0]$"."$hairBhSubSplit[0]$"_"$hairBhSubSplit[1]$"_"$hairBhSubSplit[2]$"_m00_ah"); } } else if ( newHairBh == "None" && newHoodStr != "" && newHoodStr != "None" && hoodStr != newHoodStr ) { if ( faceSubSplit[0] != "" ) hoodStr = newHoodStr; SetDebugMsg("hoodStr: "$hoodStr); statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh"); if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" ) { SetDebugMsg("hood AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah"); } } else if ( newHairBh == "None" && newMaskStr != "" && newMaskStr != "None" && maskStr != newMaskStr ) { if ( faceSubSplit[0] != "" ) maskStr = newMaskStr; SetDebugMsg("newMaskStr: "$newMaskStr); statusPawnHairAh.SetTexture(""); statusPawnHairBh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_bh"); if ( !isDrawenAh(faceSubSplit) && statusPawnHairAh.GetTextureName() == "" ) { SetDebugMsg("hood AH: "$hairAh); statusPawnHairAh.SetTexture("L2_Pawn."$faceSubSplit[0]$"_m009_t00_m00_ah"); } } }
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?