Рейтинг темы:
  • 4 Голос(ов) - 5 в среднем
  • 1
  • 2
  • 3
  • 4
  • 5
Работа над Goddess of Destruction (part 5)
Gaikotsu Написал:не подскажете, чего нибудь в пакете ExMentorList в линдвиоре менялось?

Код:
CSocketOLD::Send(pSocket,"chddddSddd", aOPCODE(OP_EXTENDED),OP_ExMentorList_EXT,
                        
                        CSharedDat->m_nSex+1, //1 for mentor, 2 for mentee
                        0, //lindwior unknown

                        1, //mentors(1 max) or metees(3 max)
                        CSharedDat2->nObjectID,
                        CSharedDat2->wszName,
                        CSharedDat2->m_nClass,
                        CSharedDat2->nLevel,
                        CSharedDat2->m_bIsOnline
                        );
хм, значит походу в 531 протоколе поменяли, а то если я понял правильно данные в дампе 527 протокола (последнее что есть у меня) - там еще структура "chdddSddd", какая и в глори была
Gaikotsu Написал:хм, значит походу в 531 протоколе поменяли, а то если я понял правильно данные в дампе 527 протокола (последнее что есть у меня) - там еще структура "chdddSddd", какая и в глори была

я даже 527 неимею на руках, работаю с более ранними Smile
how about the new BeautyShop
face,hairstyle,haircolor ( example id 10004,20004,106 )sendpacket in ? UserInfo and CharInfo?
send in old fileds of this packets

example:
[SRC="java"]hair_style = player.getNewHairStyle() > 0 ? player.getNewHairStyle() : player.getHairStyle();
hair_color = player.getNewHairColor() > 0 ? player.getNewHairColor() : player.getHairColor();
face = player.getNewFace() > 0 ? player.getNewFace() : player.getFace(); [/SRC]

P.S. also send this in packet CharacterSelectionInfo
iquelite Написал:how about the new BeautyShop
face,hairstyle,haircolor ( example id 10004,20004,106 )sendpacket in ? UserInfo and CharInfo?

share english system folder, please
smeli Написал:share english system folder, please
http://rghost.net/46296483
Возникла тут с салоном красоты небольшая траблочка - может кто сталкивался уже, если конечно уже кто тоже его реализовал.

собственно саму механику этого всего я полностью сделал, благо в реализации все очень просто (всего-то одну ночку потратил на реализацию), но вот есть небольшой визуальный косячок, и я не знаю - то ли я что-то не учел, то ли такой глюк изначально в клиенте заложен.

вобщем так: в режиме выбора новой внешности как полагается выбираем новую внешность, далее шлем свой выбор серверу и после установки им новой внешности сервер в ответ шлет пакет ExResponseBeautyRegistReset с результатами работы. вроде все как надо, но после того как клиент получает данный пакет, он автоматически переключает в интерфейсе салона на список лиц и при этом в этом списке остается только одно лицо, то что у игрока и задано.

есть у кого идеи как это побороть?
напрашивающийся самым первым вариант, слать вместе с ExResponseBeautyRegistReset еще и ExResponseBeautyList, отправляющий список доступных причесок или лиц, не предлагать - уже пробовал, в результате возникает другой глюк - смена внешности происходит без анимации.

З.Ы. и еще, кто подскажет для чего служит в пакете ExResponseBeautyList второе d в списке доступных причесок/лиц, а то какое бы я туда значение не подставлял - эффекта никакого не увидел. или это опять поле из рода "добавлено чисто чтобы было, но реально не используется"?

если кто не понял я о об этом в структуре пакета: chQQdd(dd)
RequestRegistBeauty:

В конец runImpl() пишем:

activeChar.sendPacket(new ExResponseBeautyListPacket(activeChar, 0));

И анимация есть, и прически сразу открываются.
[Изображение: Z.png][Изображение: S.gif]
Почти вся работа салона красоты в клиенте.
[PHP]
package beautyShop.data
{
public class BeautyShopData extends Object
{
public function BeautyShopData()
{
super();
if (_instance)
{
throw new Error("싱글톤이라 인스턴스 생성 금지");
}
return;
}

public function sumAdenaHair():Array
{
var loc1:*=0;
var loc2:*=0;
if (beautyShop.data.BeautyShopData.bHairCheck == true && !(beautyShop.data.BeautyShopData.objSelectHairData == null))
{
loc1 = beautyShop.data.BeautyShopData.objSelectHairData["itemAdenaNum"] + beautyShop.data.BeautyShopData.objSelectHairColorData["colorAdenaNum"];
loc2 = beautyShop.data.BeautyShopData.objSelectHairData["itemCoin"] + beautyShop.data.BeautyShopData.objSelectHairColorData["colorCoin"];
}
return [loc1, loc2];
}

public function sumAdenaFace():Array
{
var loc1:*=0;
var loc2:*=0;
if (beautyShop.data.BeautyShopData.bFaceCheck == true && !(beautyShop.data.BeautyShopData.objSelectFaceData == null))
{
loc1 = beautyShop.data.BeautyShopData.objSelectFaceData["itemAdenaNum"];
loc2 = beautyShop.data.BeautyShopData.objSelectFaceData["itemCoin"];
}
return [loc1, loc2];
}

public function sumResetAdenaHair():Number
{
var loc1:*=0;
if (beautyShop.data.BeautyShopData.bResetHairCheck == true && !(beautyShop.data.BeautyShopData.objResetHairData["itemAdenaNum"] == undefined))
{
loc1 = beautyShop.data.BeautyShopData.objResetHairData["itemAdenaNum"];
}
return loc1;
}

public function sumResetAdenaFace():Number
{
var loc1:*=0;
if (beautyShop.data.BeautyShopData.bResetFaceCheck == true && !(beautyShop.data.BeautyShopData.objResetFaceData["itemAdenaNum"] == undefined))
{
loc1 = beautyShop.data.BeautyShopData.objResetFaceData["itemAdenaNum"];
}
return loc1;
}


{
objSelectHairData = null;
objSelectHairColorData = null;
objSelectFaceData = null;
objResetHairData = null;
objResetFaceData = null;
nResetCount = 0;
_instance = new BeautyShopData();
}

public static function getInstance():beautyShop.data.BeautyShopData
{
return _instance;
}

public static const SHOPWINNDOW:Number=0;

public static const RESETWINDOW:Number=1;

public static const HAIRNUM:Number=0;

public static const FACENUM:Number=1;

public static const ALLNUM:Number=2;

public static const HAIR:String="hair";

public static const HAIRCOLOR:String="hairColor";

public static const FACE:String="face";

public static const POP:String="pop";

public static const RESET:String="reset";

public static const ROTATE_LEFT:Number=0;

public static const ROTATE_RIGHT:Number=1;

public static const ROTATE_STOP:Number=2;

public static const ZOOMIN:Number=0;

public static const ZOOMOUT:Number=1;

public static const CURSOR_DEFAULT:Number=0;

public static const CURSOR_ROTATE:Number=1;

public static const TOOLTIPLEFT:Number=0;

public static const TOOLTIPRIGHT:Number=1;

public static const ALERTBUYCOMPLETE:String="alert_buy_complete";

public static const ALERTRESET:String="alert_reset";

public static var currentHairColor:Number;

public static var currentFaceType:Number;

public static var bHairCheck:Boolean;

public static var bFaceCheck:Boolean;

public static var strHair:String;

public static var strHairColor:String;

public static var strFace:String;

public static var objSelectHairData:Object=null;

public static var objSelectHairColorData:Object=null;

public static var objSelectFaceData:Object=null;

public static var objResetHairData:Object=null;

public static var nOpenType:Number;

public static var resetHairType:Number;

public static var resetHairColor:Number;

public static var resetFaceType:Number;

public static var strResetHair:String;

public static var strResetHairColor:String;

public static var objResetFaceData:Object=null;

public static var bResetHairCheck:Boolean;

public static var bResetFaceCheck:Boolean;

public static var nResetCount:int=0;

internal static var _instance:beautyShop.data.BeautyShopData;

public static var currentHairType:Number;

public static var strResetFace:String;
}
}


// package event
// class BeautyEvent
package beautyShop.event
{
import flash.events.*;

public class BeautyEvent extends flash.events.Event
{
public function BeautyEvent(arg1:String, arg2:Object=null, arg3:Number=-1, arg4:Boolean=true, arg5:Boolean=false)
{
super(arg1, arg4, arg5);
this.data = arg2;
this.select = arg3;
return;
}

public override function clone():flash.events.Event
{
return new beautyShop.event.BeautyEvent(type, this.data, this.select, bubbles, cancelable);
}

public static const TOOLTIP_MSG_LEFT:String="tooltip_msg_left";

public static const TOOLTIP_MSG_RIGHT:String="tooltip_msg_right";

public static const SHOW:String="beauty_show";

public static const UPDATE_LIST:String="update_list";

public static const UPDATE_HAVEMONEY:String="update_havemoney";

public static const UPDATE_RESET:String="update_reset";

public static const SUM_ITEMPRICE:String="sum_itemprice";

public static const SUM_ITEMPRICE_UPDATE:String="sum_itemprice_update";

public static const RESET_UPDATE_LIST:String="reset_update_list";

public static const RESET_SUM_ITEMPRICE:String="reset_sum_itemprice";

public static const RESET_SUM_ITEMPRICE_UPDATE:String="reset_sum_itemprice_update";

public static const LIST_SELECT:String="list_select";

public static const COLOR_SELECT:String="color_select";

public static const SHOW_SYSTEMMSG:String="show_systemmsg";

public static const POPUP_CLOSE:String="popup_close";

public static const POPUP_CANCEL:String="popup_cancel";

public static const BUY_START:String="buy_start";

public static const POPUP_BUY:String="popup_buy";

public static const ALERT_PROGRESS:String="alert_progress";

public static const BUY_COMPLETE:String="buy_complete";

public static const RESET_START:String="reset_start";

public static const POPUP_RESET:String="popup_reset";

public static const RESET_COMPLETE:String="reset_complete";

public static const EXIT:String="exit";

public static const TOOLTIP_OPEN:String="tooltip_open";

public static const TOOLTIP_CLOSE:String="tooltip_close";

public static const TOOLTIP_ITEM_LEFT:String="tooltip_item_left";

public static const TOOLTIP_ITEM_RIGHT:String="tooltip_item_right";

public static const TOOLTIP_COLOR_LEFT:String="tooltip_color_left";

public static const TOOLTIP_COLOR_RIGHT:String="tooltip_color_right";

public static const TOOLTIP_ADENA_RIGHT:String="tooltip_adena_right";

public var data:Object;

public var select:Number;
}
}


// package native
// class BeautySystem
package beautyShop.native
{
import flash.external.*;
import ncsoft.l2.native.*;

public class BeautySystem extends Object
{
public function BeautySystem()
{
super();
return;
}

public static function requestItemList(arg1:Number=0):void
{
flash.external.ExternalInterface.call("RequestBeautyItemList", arg1);
return;
}

public static function init():void
{
HAIR = ncsoft.l2.native.L2UIConfig.LOCAL ? "헤어" : ncsoft.l2.native.L2UISystem.getSystemString(2991);
HAIRCOLOR = ncsoft.l2.native.L2UIConfig.LOCAL ? "색상" : ncsoft.l2.native.L2UISystem.getSystemString(2992);
VIEW_ORIGINAL = ncsoft.l2.native.L2UIConfig.LOCAL ? "이전 모습 보기" : ncsoft.l2.native.L2UISystem.getSystemString(2997);
VIEW_BEFORE = ncsoft.l2.native.L2UIConfig.LOCAL ? "현재 모습 보기" : ncsoft.l2.native.L2UISystem.getSystemString(2998);
FACE = ncsoft.l2.native.L2UIConfig.LOCAL ? "얼굴" : ncsoft.l2.native.L2UISystem.getSystemString(2999);
BEAUTIITEM = ncsoft.l2.native.L2UIConfig.LOCAL ? "로얄 뷰티 아이템" : ncsoft.l2.native.L2UISystem.getSystemString(3002);
EVENT = ncsoft.l2.native.L2UIConfig.LOCAL ? "이벤트" : ncsoft.l2.native.L2UISystem.getSystemString(3004);
TIP_BUY_NOMONEY = ncsoft.l2.native.L2UIConfig.LOCAL ? "필요 아이템이 부족합니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(701);
TIP_HAIR = ncsoft.l2.native.L2UIConfig.LOCAL ? "캐릭터의 헤어 스타일을 변경할 수 있습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4001);
TIP_FACE = ncsoft.l2.native.L2UIConfig.LOCAL ? "캐릭터의 얼굴을 변경할 수 있습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4002);
TIP_BUY_RESET = ncsoft.l2.native.L2UIConfig.LOCAL ? "선택한 스타일이 초기화됩니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4003);
POP_BUY_SUCCESS = ncsoft.l2.native.L2UIConfig.LOCAL ? "새로운 스타일 구매에 성공하였습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4004);
POP_BUY_FAILURE = ncsoft.l2.native.L2UIConfig.LOCAL ? "새로운 스타일 구매에 실패하였습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4005);
TIP_BUY = ncsoft.l2.native.L2UIConfig.LOCAL ? "선택한 스타일을 구매합니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4008);
TIP_RESET_ORIGINAL = ncsoft.l2.native.L2UIConfig.LOCAL ? "뷰티샵을 이용하기 전의 모습을 보여드립니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4013);
TIP_RESET_BEFORE = ncsoft.l2.native.L2UIConfig.LOCAL ? "현재의 모습을 보여드립니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4014);
TIP_RESET = ncsoft.l2.native.L2UIConfig.LOCAL ? "뷰티샵을 이용하기 전의 모습으로 복원합니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4015);
POP_RESET = ncsoft.l2.native.L2UIConfig.LOCAL ? "복원 후에는 되돌릴 수 없습니다. 계속 진행하시겠습니까?" : ncsoft.l2.native.L2UISystem.getSystemMessage(4016);
POP_RESET_SUCCESS = ncsoft.l2.native.L2UIConfig.LOCAL ? "이전 스타일로의 복원을 성공적으로 완료하였습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4017);
POP_RESET_FAILURE = ncsoft.l2.native.L2UIConfig.LOCAL ? "이전 스타일로의 복원을 실패하였습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4018);
TIP_SHOP_EXIT = ncsoft.l2.native.L2UIConfig.LOCAL ? "뷰티샵을 나갑니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4019);
TIP_RESET_EXIT = ncsoft.l2.native.L2UIConfig.LOCAL ? "외형 복원을 종료합니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4026);
POP_BUY = ncsoft.l2.native.L2UIConfig.LOCAL ? "구매하시겠습니까?" : ncsoft.l2.native.L2UISystem.getSystemMessage(4020);
TIP_BUY_NOITEM = ncsoft.l2.native.L2UIConfig.LOCAL ? "구매한 아이템이 없습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4021);
POP_RESET_PROGRESS = ncsoft.l2.native.L2UIConfig.LOCAL ? "복원중입니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4022);
TIP_RESET_NOMONEY = ncsoft.l2.native.L2UIConfig.LOCAL ? "필요 아데나가 부족합니다" : ncsoft.l2.native.L2UISystem.getSystemMessage(279);
POP_BUY_PROGRESS = ncsoft.l2.native.L2UIConfig.LOCAL ? "구매 요청 중입니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4024);
TIP_RESET_NOITEM = ncsoft.l2.native.L2UIConfig.LOCAL ? "복원할 스타일이 없습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4025);
HAVE_ITEM = ncsoft.l2.native.L2UIConfig.LOCAL ? "이미 구매한 스타일 입니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4027);
POP_NPC_FAILURE = ncsoft.l2.native.L2UIConfig.LOCAL ? "NPC 서버가 작동 중지 상태인 관계로 뷰티샵을 이용할 수 없습니다." : ncsoft.l2.native.L2UISystem.getSystemMessage(4121);
ADENA = ncsoft.l2.native.L2UIConfig.LOCAL ? "아데나" : ncsoft.l2.native.L2UISystem.getSystemString(469);
return;
}

public static function open(arg1:Number, arg2:Number=0):void
{
flash.external.ExternalInterface.call("OpenBeautyshop", arg1, arg2);
return;
}

public static function exit():void
{
flash.external.ExternalInterface.call("ExitBeautyshop");
return;
}

public static function getAdenaString(arg1:Number):String
{
return flash.external.ExternalInterface.call("GetAdenaString", String(arg1));
}

public static function buy(arg1:Number=-1, arg2:Number=-1, arg3:Number=-1):void
{
flash.external.ExternalInterface.call("IsSuccessSettingBeautyItem", arg1, arg2, arg3);
return;
}

public static function pickedStyle(arg1:Number=-1, arg2:Number=-1, arg3:Number=-1):void
{
flash.external.ExternalInterface.call("PickedStyle", arg1, arg2, arg3);
return;
}

public static function reset(arg1:Number):void
{
flash.external.ExternalInterface.call("RequestResetBeauty", arg1);
return;
}

public static function zoomInOut(arg1:Number):void
{
flash.external.ExternalInterface.call("ZoomInOut", arg1);
return;
}

public static function rotate(arg1:Number):void
{
flash.external.ExternalInterface.call("TurnTo", arg1);
return;
}

public static function useSocoalAction():void
{
flash.external.ExternalInterface.call("UseSocialAction", Number(89));
return;
}

public static var POP_BUY_SUCCESS:String;

public static var POP_BUY_FAILURE:String;

public static var TIP_BUY:String;

public static var TIP_RESET_ORIGINAL:String;

public static var TIP_RESET_BEFORE:String;

public static var TIP_RESET:String;

public static var POP_RESET:String;

public static var POP_RESET_SUCCESS:String;

public static var POP_RESET_FAILURE:String;

public static var FACE:String;

public static var TIP_SHOP_EXIT:String;

public static var POP_BUY:String;

public static var TIP_BUY_NOITEM:String;

public static var POP_RESET_PROGRESS:String;

public static var TIP_RESET_NOMONEY:String;

public static var POP_BUY_PROGRESS:String;

public static var TIP_RESET_NOITEM:String;

public static var HAVE_ITEM:String;

public static var POP_NPC_FAILURE:String;

public static var ADENA:String;

public static var HAIR:String;

public static var HAIRCOLOR:String;

public static var VIEW_ORIGINAL:String;

public static var VIEW_BEFORE:String;

public static var BEAUTIITEM:String;

public static var TIP_RESET_EXIT:String;

public static var EVENT:String;

public static var TIP_BUY_NOMONEY:String;

public static var TIP_HAIR:String;

public static var TIP_FACE:String;

public static var TIP_BUY_RESET:String;
}
}


// class MainItemMoneyView
package beautyShop.native
{
import beautyShop.event.*;
import flash.events.*;
import flash.text.*;
import ncsoft.l2.core.*;
import org.casalib.utils.*;

public class MainItemMoneyView extends ncsoft.l2.core.L2UIBase
{
public function MainItemMoneyView()
{
super();
this.init();
return;
}

protected function init():void
{
this.clear();
this.adena_txt.addEventListener(flash.events.MouseEvent.MOUSE_OVER, this.adenaOver);
this.adena_txt.addEventListener(flash.events.MouseEvent.MOUSE_OUT, this.adenaOut);
return;
}

internal function adenaOver(arg1:flash.events.MouseEvent):void
{
if (this.nAdena != 0)
{
dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.TOOLTIP_ADENA_RIGHT, beautyShop.native.BeautySystem.getAdenaString(this.nAdena)));
}
return;
}

internal function adenaOut(arg1:flash.events.MouseEvent):void
{
dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.TOOLTIP_CLOSE));
return;
}

public function clear():void
{
this.adena = 0;
this.coin = 0;
this.idx = -1;
this.adena_txt.text = "0";
this.coin_txt.text = "0";
this.objItemValue = new Object();
return;
}

public function get adena():Number
{
return this.nAdena;
}

public function set adena(arg1:Number):void
{
this.nAdena = arg1;
if (this.nAdena != 0)
{
this.adena_txt.textColor = 14540253;
}
else
{
this.adena_txt.textColor = 6710886;
}
this.adena_txt.text = org.casalib.utils.NumberUtil.format(arg1, String(arg1).length, ",", "0");
return;
}

public function get coin():int
{
return this.nCoin;
}

public function set coin(arg1:int):void
{
this.nCoin = arg1;
if (this.nCoin != 0)
{
this.coin_txt.textColor = 14540253;
}
else
{
this.coin_txt.textColor = 6710886;
}
this.coin_txt.text = org.casalib.utils.NumberUtil.format(arg1, String(arg1).length, ",", "0");
return;
}

public function get idx():int
{
return this.nIdx;
}

public function set idx(arg1:int):void
{
this.nIdx = arg1;
return;
}

public function get itemValue():Object
{
return this.objItemValue;
}

public function set itemValue(arg1:Object):void
{
this.objItemValue = arg1;
this.adena = arg1.itemAdenaNum;
this.coin = arg1.itemCoin;
this.idx = arg1.itemIdx;
return;
}

public function setNamePrefix(arg1:String):void
{
this.strNamePrefix = "[" + arg1 + "] ";
return;
}

public function setNameSuffix(arg1:String):void
{
this.strNameSuffix = " " + arg1;
return;
}

public function setName(arg1:String):String
{
this.strName = this.strNamePrefix + arg1 + this.strNameSuffix;
return this.strName;
}

public var adena_txt:flash.text.TextField;

public var coin_txt:flash.text.TextField;

protected var objItemValue:Object;

protected var nAdena:Number=0;

protected var nCoin:int=0;

internal var nIdx:int=-1;

internal var strName:String;

internal var strNamePrefix:String="";

internal var strNameSuffix:String="";
}
}


// package test
// class Test
package beautyShop.test
{
import beautyShop.event.*;
import flash.events.*;
import ncsoft.l2.controls.*;
import ncsoft.l2.core.*;
import ncsoft.l2.events.*;

public class Test extends ncsoft.l2.core.L2UIComponentBase
{
public function Test()
{
super();
return;
}

protected override function init():void
{
return;
}

public override function addEvent():void
{
super.addEvent();
addEventListener(flash.events.Event.ENTER_FRAME, initUI, false, 0, true);
return;
}

protected override function configUI():void
{
trace("초기화 및 기본 셋팅 후 시작. TestView");
this.makeDataHair();
this.makeDataFace();
this.listupHair.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateHair);
this.listupFace.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateFace);
this.listuphave.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateHave);
this.listupfalse.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateFalse);
this.listuptrue.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateTrue);
this.listupso.addEventListener(flash.events.MouseEvent.CLICK, this.listupdateSocialAction);
this.close.addEventListener(flash.events.MouseEvent.CLICK, this.closeEvent);
return;
}

internal function makeDataHair():void
{
var loc1:*=null;
var loc2:*=null;
var loc3:*=null;
var loc4:*=null;
var loc5:*=null;
this.listupHairData = new Object();
loc3 = new Array();
this.listupHairData["type"] = ncsoft.l2.events.L2UIClientString.EV_ReceiveBeautyItemList;
loc1 = new Object();
loc1["itemType"] = 0;
loc1["currentColor"] = 101;
loc1["currentType"] = 10010;
this.listupHairData["data"] = loc1;
var loc6:*=0;
while (loc6 < 13)
{
(loc4 = new Array())["colorIdx"] = 100000 + loc6;
loc4["colorName"] = "헤어색상이름" + loc6;
loc4["colorDesc"] = "헤어설명" + loc6;
loc4["colorAdena"] = "10만 아데나";
loc4["colorAdenaNum"] = 20000;
loc4["colorCoin"] = loc6;
loc4["colorValue"] = 4281167005;
loc4["isDefaultColor"] = false;
loc4["isNew"] = false;
(loc5 = new Array())["colorIdx"] = 200000 + loc6;
loc5["colorName"] = "헤어색상이름2" + loc6;
loc5["colorDesc"] = "헤어설명2" + loc6 + "<br><FONT_RED>테스트임.</FONT_RED>";
loc5["colorAdena"] = "10만 아데나2";
loc5["colorAdenaNum"] = 30000;
loc5["colorCoin"] = 4;
loc5["colorValue"] = 4278190080;
loc5["isDefaultColor"] = false;
loc5["isNew"] = false;
loc2 = new Array();
loc2["itemIdx"] = 1000 + loc6;
loc2["sortingOrder"] = loc6;
loc2["itemName"] = "헤어이름" + loc6;
loc2["itemDesc"] = "헤어설명" + loc6;
loc2["itemAdena"] = "10만 아데나";
loc2["itemAdenaNum"] = 100000;
loc2["itemCoin"] = loc6;
loc2["iconName"] = "";
loc2["useColor"] = false;
loc2["isEvent"] = true;
loc2["isEnable"] = false;
loc2["isNew"] = true;
loc2["isCashItem"] = true;
loc2["Elements"] = [loc4, loc5, loc4, loc4, loc4];
loc3.push(loc2);
++loc6;
}
this.listupHairData["data"]["Elements"] = loc3;
return;
}

internal function makeDataFace():void
{
var loc1:*=null;
var loc2:*=null;
var loc3:*=null;
var loc4:*=null;
var loc5:*=null;
var loc6:*=null;
var loc7:*=null;
this.listupFaceData = new Object();
this.listupFaceData["type"] = ncsoft.l2.events.L2UIClientString.EV_ReceiveBeautyItemList;
loc1 = new Object();
loc1["itemType"] = 1;
loc1["currentColor"] = 101;
loc1["currentType"] = 10010;
this.listupFaceData["data"] = loc1;
loc2 = new Array();
loc2["itemIdx"] = 10010;
loc2["sortingOrder"] = 0;
loc2["itemName"] = "얼굴이름0";
loc2["itemDesc"] = "얼굴설명0";
loc2["itemAdena"] = "10만 아데나";
loc2["itemAdenaNum"] = 10000;
loc2["itemCoin"] = 40;
loc2["iconName"] = "";
loc2["useColor"] = false;
loc2["isEvent"] = false;
loc2["isEnable"] = false;
loc2["isNew"] = false;
loc2["Elements"] = [];
loc3 = loc2;
loc4 = loc2;
loc5 = loc2;
loc6 = loc2;
loc7 = loc2;
this.listupFaceData["data"]["Elements"] = [loc2, loc3, loc4, loc5, loc6, loc7];
return;
}

internal function listupdateHair(arg1:flash.events.MouseEvent):void
{
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, this.listupHairData));
return;
}

internal function listupdateFace(arg1:flash.events.MouseEvent):void
{
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, this.listupFaceData));
return;
}

internal function listupdateHave(arg1:flash.events.MouseEvent):void
{
var loc1:*=new Object();
var loc2:*=new Object();
loc1.type = ncsoft.l2.events.L2UIClientString.EV_SendUserAdenaAndCoin;
loc2.adena = "7000만 아데나";
loc2.adenaNum = "70000000";
loc2.coin = "700";
loc1.data = loc2;
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, loc1));
return;
}

internal function listupdateFalse(arg1:flash.events.MouseEvent):void
{
var loc1:*=new Object();
var loc2:*=new Object();
loc1.type = ncsoft.l2.events.L2UIClientString.EV_IsSuccessBuyingStyle;
loc2.isSuccess = false;
loc1.data = loc2;
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, loc1));
return;
}

internal function listupdateTrue(arg1:flash.events.MouseEvent):void
{
var loc1:*=new Object();
var loc2:*=new Object();
loc1.type = ncsoft.l2.events.L2UIClientString.EV_IsSuccessBuyingStyle;
loc2.isSuccess = true;
loc1.data = loc2;
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, loc1));
return;
}

internal function listupdateSocialAction(arg1:flash.events.MouseEvent):void
{
var loc1:*=new Object();
loc1.type = ncsoft.l2.events.L2UIClientString.EV_EndSocialAction;
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, loc1));
return;
}

internal function closeEvent(arg1:flash.events.MouseEvent):void
{
getDispacher().dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.POPUP_CLOSE));
return;
}

public var listupHair:ncsoft.l2.controls.L2UIButton;

public var listupFace:ncsoft.l2.controls.L2UIButton;

public var listuphave:ncsoft.l2.controls.L2UIButton;

public var listupfalse:ncsoft.l2.controls.L2UIButton;

public var listuptrue:ncsoft.l2.controls.L2UIButton;

public var listupso:ncsoft.l2.controls.L2UIButton;

public var close:ncsoft.l2.controls.L2UIButton;

internal var listupHairData:Object;

internal var listupFaceData:Object;
}
}


// package tooltip
// class BeautyToolTipView
package beautyShop.tooltip
{
import beautyShop.data.*;
import beautyShop.event.*;
import beautyShop.native.*;
import flash.display.*;
import flash.text.*;
import ncsoft.l2.core.*;
import ncsoft.l2.data.*;
import org.casalib.utils.*;
import scaleform.gfx.*;

public class BeautyToolTipView extends ncsoft.l2.core.L2UIBase
{
public function BeautyToolTipView()
{
super();
scaleform.gfx.InteractiveObjectEx.setHitTestDisable(this.bg_mc, true);
scaleform.gfx.InteractiveObjectEx.setHitTestDisable(this.txtField, true);
this.visible = false;
return;
}

public function setTooltip(arg1:Object, arg2:String=""):void
{
var loc1:*=null;
var loc2:*=true;
var loc3:*=arg2;
switch (loc3)
{
case beautyShop.event.BeautyEvent.TOOLTIP_ADENA_RIGHT:
case beautyShop.event.BeautyEvent.TOOLTIP_MSG_RIGHT:
{
this.setPosition(beautyShop.data.BeautyShopData.TOOLTIPRIGHT);
loc1 = String(arg1);
break;
}
case beautyShop.event.BeautyEvent.TOOLTIP_COLOR_LEFT:
{
this.setPosition(beautyShop.data.BeautyShopData.TOOLTIPLEFT);
if (arg1["colorAdena"] == 0 && arg1["colorCoin"] == 0 && arg1["colorDesc"] == "")
{
loc2 = false;
}
if (loc2)
{
loc1 = ["<YELLOW03>", arg1.colorName, "</YELLOW03><br>", "<GRAY02>", this.getAdenaString(arg1.colorAdena), this.getCoinString(arg1.colorCoin), "</GRAY02>", "<br>" + arg1.colorDesc].join("");
}
else
{
loc1 = ["<YELLOW03>", arg1.colorName, "</YELLOW03>"].join("");
}
break;
}
case beautyShop.event.BeautyEvent.TOOLTIP_COLOR_RIGHT:
{
this.setPosition(beautyShop.data.BeautyShopData.TOOLTIPRIGHT);
if (arg1["colorAdena"] == 0 && arg1["colorCoin"] == 0 && arg1["colorDesc"] == "")
{
loc2 = false;
}
if (loc2)
{
loc1 = ["<YELLOW03>", arg1.colorName, "</YELLOW03><br>", "<GRAY02>", this.getAdenaString(arg1.colorAdena), this.getCoinString(arg1.colorCoin), "</GRAY02>", "<br>" + arg1.colorDesc].join("");
}
else
{
loc1 = ["<YELLOW03>", arg1.colorName, "</YELLOW03>"].join("");
}
break;
}
case beautyShop.event.BeautyEvent.TOOLTIP_ITEM_LEFT:
{
this.setPosition(beautyShop.data.BeautyShopData.TOOLTIPLEFT);
loc1 = ["<YELLOW03>", this.getNameString(arg1), "</YELLOW03><br>", "<GRAY02>", this.getAdenaString(arg1.itemAdena), this.getCoinString(arg1.itemCoin), "</GRAY02>", "<br>" + arg1.itemDesc].join("");
break;
}
case beautyShop.event.BeautyEvent.TOOLTIP_ITEM_RIGHT:
{
this.setPosition(beautyShop.data.BeautyShopData.TOOLTIPRIGHT);
loc1 = ["<YELLOW03>", this.getNameString(arg1), "</YELLOW03><br>", "<GRAY02>", this.getAdenaString(arg1.itemAdena), this.getCoinString(arg1.itemCoin), "</GRAY02>", "<br>" + arg1.itemDesc].join("");
break;
}
}
this.txtField.styleSheet = ncsoft.l2.data.L2UIFontStyleSheetData.getInstance().getStyleSheet();
this.txtField.htmlText = loc1;
this.txtField.autoSize = flash.text.TextFieldAutoSize.LEFT;
if (this.bg_mc.width < this.txtField.width)
{
this.bg_mc.width = this.txtField.width + 6;
}
this.bg_mc.height = this.txtField.height + 12;
loc1 = null;
return;
}

internal function setPosition(arg1:int=1):void
{
if (arg1 != beautyShop.data.BeautyShopData.TOOLTIPLEFT)
{
if (arg1 == beautyShop.data.BeautyShopData.TOOLTIPRIGHT)
{
this.x = this.parent["rightView"].x + 10;
this.y = this.parent["rightView"].y + this.parent["rightView"].height + 5;
}
}
else
{
this.x = this.parent["leftView"].x + 16;
this.y = this.parent["leftView"].y + this.parent["leftView"].bg_mc.height + 10;
}
return;
}

internal function getNameString(arg1:Object):String
{
var loc2:*=NaN;
var loc3:*=null;
var loc1:*=arg1.itemName;
if (arg1.isEvent)
{
loc2 = arg1.maxNum - arg1.usedNum;
loc3 = "(" + beautyShop.native.BeautySystem.EVENT + ":" + org.casalib.utils.NumberUtil.format(loc2, String(loc2).length, ",", "0") + ")";
loc1 = loc1 + " " + loc3;
loc2 = -1;
loc3 = null;
}
return loc1;
}

internal function getAdenaString(arg1:String):String
{
if (arg1 == "")
{
return "";
}
return "<br>" + arg1;
}

internal function getCoinString(arg1:Number):String
{
if (isNaN(arg1))
{
arg1 = 0;
}
if (arg1 == 0)
{
return "";
}
return "<br>" + beautyShop.native.BeautySystem.BEAUTIITEM + " x " + org.casalib.utils.NumberUtil.format(arg1, String(arg1).length, ",", "0");
}

public var txtField:flash.text.TextField;

public var bg_mc:flash.display.MovieClip;
}
}


// package view
// package bottom
// class BeautyBottomView
package beautyShop.view.bottom
{
import beautyShop.data.*;
import beautyShop.event.*;
import beautyShop.native.*;
import flash.display.*;
import flash.events.*;
import ncsoft.l2.anchor.*;
import ncsoft.l2.controls.*;
import ncsoft.l2.core.*;
import ncsoft.l2.data.*;
import ncsoft.l2.events.*;
import ncsoft.l2.native.*;
import scaleform.clik.events.*;
import scaleform.gfx.*;

public class BeautyBottomView extends ncsoft.l2.core.L2UIComponentBase
{
public function BeautyBottomView()
{
super();
return;
}

protected override function init():void
{
super.init();
this.rotate_mc.zoom_btn.selected = true;
this.hideTooltip();
return;
}

public override function addEvent():void
{
super.addEvent();
this.rotate_mc.addEventListener(scaleform.clik.events.ButtonEvent.PRESS, this.onPressRotateBtn, false, 0, true);
this.rotate_mc.addEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.onClickRotateBtn, false, 0, true);
this.rotate_mc.addEventListener(scaleform.clik.events.ButtonEvent.RELEASE_OUTSIDE, this.onClickRotateBtn, false, 0, true);
this.leave_btn.addEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.onClickLeaveBtn, false, 0, true);
this.leave_btn.addEventListener(flash.events.MouseEvent.ROLL_OVER, this.onRollOverLeaveBtn, false, 0, true);
this.leave_btn.addEventListener(flash.events.MouseEvent.ROLL_OUT, this.onRollOutLeaveBtn, false, 0, true);
this.beautyBack_btn.addEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.onClickBeautyBackBtn, false, 0, true);
this.addEventListener(beautyShop.event.BeautyEvent.TOOLTIP_OPEN, this.showTooltip, false, 0, true);
this.addEventListener(beautyShop.event.BeautyEvent.TOOLTIP_CLOSE, this.hideTooltip, false, 0, true);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.BUY_START, this.handleBuyStart);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.BUY_COMPLETE, this.handleBuyComplete);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.POPUP_CANCEL, this.handleBuyComplete);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.RESET_START, this.handleResetStart);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.RESET_COMPLETE, this.handleResetComplete);
return;
}

public override function removeEvent():void
{
super.removeEvent();
this.rotate_mc.removeEventListener(scaleform.clik.events.ButtonEvent.PRESS, this.onPressRotateBtn);
this.rotate_mc.removeEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.onClickRotateBtn);
this.leave_btn.removeEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.onClickLeaveBtn);
this.leave_btn.removeEventListener(flash.events.MouseEvent.ROLL_OVER, this.onRollOverLeaveBtn);
this.leave_btn.removeEventListener(flash.events.MouseEvent.ROLL_OUT, this.onRollOutLeaveBtn);
this.removeEventListener(beautyShop.event.BeautyEvent.TOOLTIP_OPEN, this.showTooltip);
this.removeEventListener(beautyShop.event.BeautyEvent.TOOLTIP_CLOSE, this.hideTooltip);
return;
}

protected override function configUI():void
{
scaleform.gfx.InteractiveObjectEx.setHitTestDisable(this.bg_mc, true);
this.setAlign = new ncsoft.l2.anchor.L2UISetAlign();
this.setAlign.setAnchor("bg_mc", this.bg_mc, null, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomLeft, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomLeft, 0, 0);
this.setAlign.setAnchor("beautyBack_btn", this.beautyBack_btn, null, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomLeft, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomLeft, 4, -5);
this.setAlign.setAnchor("leave_btn", this.leave_btn, null, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomRight, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomRight, -4, -5);
this.setAlign.setAnchor("rotate_mc", this.rotate_mc, null, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomCenter, ncsoft.l2.data.L2UIAnchorPointType.ANCHORPOINT_BottomCenter, 0, -68);
return;
}

internal function onRollOverLeaveBtn(arg1:flash.events.MouseEvent):void
{
return;
}

internal function onRollOutLeaveBtn(arg1:flash.events.MouseEvent):void
{
return;
}

internal function onPressRotateBtn(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
var loc1:*=arg1.target.name.split("_")[0];
var loc2:*=loc1;
switch (loc2)
{
case "left":
{
beautyShop.native.BeautySystem.rotate(beautyShop.data.BeautyShopData.ROTATE_LEFT);
break;
}
case "right":
{
beautyShop.native.BeautySystem.rotate(beautyShop.data.BeautyShopData.ROTATE_RIGHT);
break;
}
}
loc1 = null;
return;
}

internal function onClickRotateBtn(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
var loc1:*=arg1.target.name.split("_")[0];
var loc2:*=loc1;
switch (loc2)
{
case "zoom":
{
if (arg1.target.selected)
{
beautyShop.native.BeautySystem.zoomInOut(beautyShop.data.BeautyShopData.ZOOMIN);
}
else
{
beautyShop.native.BeautySystem.zoomInOut(beautyShop.data.BeautyShopData.ZOOMOUT);
}
break;
}
case "left":
case "right":
{
beautyShop.native.BeautySystem.rotate(beautyShop.data.BeautyShopData.ROTATE_STOP);
break;
}
}
loc1 = null;
return;
}

internal function onClickLeaveBtn(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
this.init();
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(beautyShop.event.BeautyEvent.EXIT, null));
beautyShop.native.BeautySystem.exit();
return;
}

internal function onClickBeautyBackBtn(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
this.init();
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(beautyShop.event.BeautyEvent.EXIT, null));
var loc1:*=new Object();
loc1.type = ncsoft.l2.events.L2UIClientString.EV_ReOpenBeautyshopWindow;
getDispacher().dispatchEvent(new ncsoft.l2.events.L2UIEvent(ncsoft.l2.events.L2UIEventString.CALLBACK_EVENT, loc1));
beautyShop.native.BeautySystem.requestItemList(beautyShop.data.BeautyShopData.HAIRNUM);
return;
}

internal function handleBuyStart(arg1:beautyShop.event.BeautyEvent):void
{
this.rotate_mc.visible = false;
this.leave_btn.enabled = false;
return;
}

internal function handleBuyComplete(arg1:beautyShop.event.BeautyEvent):void
{
this.leave_btn.enabled = true;
this.rotate_mc.visible = true;
this.rotate_mc.zoom_btn.selected = false;
return;
}

internal function handleResetStart(arg1:beautyShop.event.BeautyEvent):void
{
this.rotate_mc.visible = false;
this.leave_btn.enabled = false;
this.beautyBack_btn.enabled = false;
return;
}

internal function handleResetComplete(arg1:beautyShop.event.BeautyEvent):void
{
this.leave_btn.enabled = true;
this.rotate_mc.visible = true;
this.beautyBack_btn.enabled = true;
this.rotate_mc.zoom_btn.selected = false;
return;
}

internal function showTooltip(arg1:beautyShop.event.BeautyEvent):void
{
return;
}

internal function hideTooltip(arg1:beautyShop.event.BeautyEvent=null):void
{
return;
}

public override function destroy():void
{
super.destroy();
return;
}

public override function callbackEvent(arg1:ncsoft.l2.events.L2UIEvent):void
{
var loc1:*=null;
var loc2:*=null;
var loc3:*=arg1._parameter.type;
switch (loc3)
{
case ncsoft.l2.events.L2UIClientString.EV_OpenBeautyshopWindow:
case ncsoft.l2.events.L2UIClientString.EV_ReOpenBeautyshopWindow:
{
this.setAlign.update();
this._bIsShopOpen = true;
this.beautyBack_btn.visible = false;
this.beautyBack_btn.enabled = false;
loc1 = ncsoft.l2.native.L2UISystem.getCurrentResolution();
this.bg_mc.width = Math.round(Number(loc1[0]));
break;
}
case ncsoft.l2.events.L2UIClientString.EV_OpenBeautyshopResetWindow:
{
this.setAlign.update();
this._bIsShopOpen = false;
this.beautyBack_btn.visible = true;
this.beautyBack_btn.enabled = true;
loc2 = ncsoft.l2.native.L2UISystem.getCurrentResolution();
this.bg_mc.width = Math.round(Number(loc2[0]));
break;
}
case ncsoft.l2.events.L2UIClientString.EV_ResolutionChanged:
{
this.bg_mc.width = Math.round(arg1._parameter.data["NewWidth"]);
this.setAlign.update();
break;
}
}
return;
}

public var beautyBack_btn:ncsoft.l2.controls.L2UIButton;

public var leave_btn:ncsoft.l2.controls.L2UIButton;

public var rotate_mc:flash.display.MovieClip;

public var bg_mc:flash.display.MovieClip;

internal var setAlign:ncsoft.l2.anchor.L2UISetAlign;

internal var _bIsShopOpen:Boolean;
}
}


// package popup
// package alert
// class AlertPopView
package beautyShop.view.popup.alert
{
import beautyShop.data.*;
import beautyShop.event.*;
import flash.display.*;
import flash.events.*;
import flash.text.*;
import ncsoft.l2.controls.*;
import ncsoft.l2.core.*;
import scaleform.gfx.*;

public class AlertPopView extends ncsoft.l2.core.L2UIBase
{
public function AlertPopView()
{
super();
this.init();
return;
}

protected function init():void
{
this.hideAllBtn();
getDispacher().addEventListener(beautyShop.event.BeautyEvent.ALERT_PROGRESS, this.showAlertProgress);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.BUY_COMPLETE, this.buyComplete);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.RESET_COMPLETE, this.resetComplete);
this.close_btn.addEventListener(flash.events.MouseEvent.CLICK, this.listenerClose);
return;
}

internal function hideAllBtn():void
{
this.resetTime_mc.gotoAndStop(1);
var loc1:*;
this.resetTime_mc.visible = loc1 = false;
this.cancel_btn.visible = loc1 = loc1;
this.ok_btn.visible = loc1 = loc1;
this.close_btn.visible = loc1;
return;
}

internal function showAlertProgress(arg1:beautyShop.event.BeautyEvent):void
{
this.hideAllBtn();
this.resetTime_mc.visible = true;
this.resetTime_mc.play();
this.setMessage(String(arg1.data));
return;
}

internal function buyComplete(arg1:beautyShop.event.BeautyEvent):void
{
this.strType = beautyShop.data.BeautyShopData.ALERTBUYCOMPLETE;
this.hideAllBtn();
this.close_btn.visible = true;
this.setMessage(String(arg1.data));
return;
}

internal function resetComplete(arg1:beautyShop.event.BeautyEvent):void
{
this.strType = beautyShop.data.BeautyShopData.ALERTBUYCOMPLETE;
this.hideAllBtn();
this.close_btn.visible = true;
this.setMessage(String(arg1.data));
return;
}

internal function listenerClose(arg1:flash.events.MouseEvent):void
{
getDispacher().dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.POPUP_CLOSE));
return;
}

public function setMessage(arg1:String):void
{
this.msg_txt.htmlText = arg1;
scaleform.gfx.TextFieldEx.setVerticalAlign(this.msg_txt, scaleform.gfx.TextFieldEx.VALIGN_CENTER);
return;
}

public function clear():void
{
this.setMessage("");
this.hideAllBtn();
return;
}

public var close_btn:ncsoft.l2.controls.L2UIButton;

public var ok_btn:ncsoft.l2.controls.L2UIButton;

public var cancel_btn:ncsoft.l2.controls.L2UIButton;

public var resetTime_mc:flash.display.MovieClip;

public var msg_txt:flash.text.TextField;

internal var strType:String;
}
}


// package buypop
// class BuyPopMoney
package beautyShop.view.popup.buypop
{
import beautyShop.data.*;
import beautyShop.event.*;
import flash.text.*;
import ncsoft.l2.controls.*;
import ncsoft.l2.core.*;
import scaleform.clik.events.*;
import scaleform.gfx.*;

public class BuyPopMoney extends ncsoft.l2.core.L2UIBase
{
public function BuyPopMoney()
{
super();
this.init();
return;
}

internal function init():void
{
this.buy_btn.addEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.itemBuyOK);
this.cancel_btn.addEventListener(scaleform.clik.events.ButtonEvent.CLICK, this.itemBuyCancel);
scaleform.gfx.TextFieldEx.setVerticalAlign(this.msg_txt, scaleform.gfx.TextFieldEx.VALIGN_CENTER);
return;
}

internal function itemBuyOK(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
if (this.strPopType != beautyShop.data.BeautyShopData.POP)
{
if (this.strPopType == beautyShop.data.BeautyShopData.RESET)
{
getDispacher().dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.POPUP_RESET));
}
}
else
{
getDispacher().dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.POPUP_BUY));
}
return;
}

internal function itemBuyCancel(arg1Confusedcaleform.clik.events.ButtonEvent):void
{
getDispacher().dispatchEvent(new beautyShop.event.BeautyEvent(beautyShop.event.BeautyEvent.POPUP_CANCEL));
return;
}

public var adena_txt:flash.text.TextField;

public var coin_txt:flash.text.TextField;

public var msg_txt:flash.text.TextField;

public var buy_btn:ncsoft.l2.controls.L2UIButton;

public var cancel_btn:ncsoft.l2.controls.L2UIButton;

public var strPopType:String;
}
}


// class BuyPopView
package beautyShop.view.popup.buypop
{
import beautyShop.data.*;
import beautyShop.event.*;
import beautyShop.native.*;
import flash.display.*;
import ncsoft.l2.core.*;
import ncsoft.l2.data.*;
import org.casalib.utils.*;

public class BuyPopView extends ncsoft.l2.core.L2UIComponentBase
{
public function BuyPopView()
{
super();
return;
}

protected override function configUI():void
{
this.clear();
getDispacher().addEventListener(beautyShop.event.BeautyEvent.BUY_START, this.showBuyPopup);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.RESET_START, this.showResetPopup);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.POPUP_BUY, this.buyCallServer);
getDispacher().addEventListener(beautyShop.event.BeautyEvent.POPUP_RESET, this.resetCallServer);
return;
}

internal function showBuyPopup(arg1:beautyShop.event.BeautyEvent):void
{
var loc2:*=NaN;
this.clear();
if (!(beautyShop.data.BeautyShopData.objSelectHairData == null) && beautyShop.data.BeautyShopData.bHairCheck)
{
this.hair_mc.visible = true;
this.hair_mc.name_txt.text = beautyShop.data.BeautyShopData.strHair;
this.hair_mc.subName_txt.text = beautyShop.data.BeautyShopData.strHairColor;
}
if (!(beautyShop.data.BeautyShopData.objSelectFaceData == null) && beautyShop.data.BeautyShopData.bFaceCheck)
{
this.face_mc.visible = true;
this.face_mc.name_txt.text = beautyShop.data.BeautyShopData.strFace;
}
var loc1:*=Number(beautyShop.data.BeautyShopData.getInstance().sumAdenaHair()[0] + beautyShop.data.BeautyShopData.getInstance().sumAdenaFace()[0]);
this.money_mc.adena_txt.text = org.casalib.utils.NumberUtil.format(loc1, String(loc1).length, ",", "0") + " " + beautyShop.native.BeautySystem.ADENA;
this.money_mc.coin_txt.text = beautyShop.native.BeautySystem.BEAUTIITEM + " x " + Number(beautyShop.data.BeautyShopData.getInstance().sumAdenaHair()[1] + beautyShop.data.BeautyShopData.getInstance().sumAdenaFace()[1]);
if (Number(beautyShop.data.BeautyShopData.getInstance().sumAdenaHair()[1] + beautyShop.data.BeautyShopData.getInstance().sumAdenaFace()[1]) == 0)
{
this.money_mc.coin_txt.text = "";
}
this.money_mc.msg_txt.styleSheet = ncsoft.l2.data.L2UIFontStyleSheetData.getInstance().getStyleSheet();
this.money_mc.msg_txt.htmlText = beautyShop.native.BeautySystem.POP_BUY;
this.money_mc.strPopType = beautyShop.data.BeautyShopData.POP;
if (this.hair_mc.visible)
{
this.face_mc.y = 92;
if (this.face_mc.visible)
{
loc2 = this.face_mc.y + this.face_mc.height + 12;
this.bg.height = 352;
}
else
{
loc2 = this.hair_mc.y + this.hair_mc.height + 12;
this.bg.height = 352 - 68;
}
}
else
{
this.face_mc.y = 12;
loc2 = this.face_mc.y + this.face_mc.height + 12;
this.bg.height = 352 - 68;
}
this.money_mc.y = loc2;
return;
}

internal function showResetPopup(arg1:beautyShop.event.BeautyEvent):void
{
var loc2:*=NaN;
this.clear();
if (!(beautyShop.data.BeautyShopData.objResetHairData == null) && beautyShop.data.BeautyShopData.bResetHairCheck)
{
this.hair_mc.visible = true;
this.hair_mc.name_txt.text = beautyShop.data.BeautyShopData.strResetHair;
this.hair_mc.subName_txt.text = beautyShop.data.BeautyShopData.strResetHairColor;
}
if (!(beautyShop.data.BeautyShopData.objResetFaceData == null) && beautyShop.data.BeautyShopData.bResetFaceCheck)
{
this.face_mc.visible = true;
this.face_mc.name_txt.text = beautyShop.data.BeautyShopData.strResetFace;
}
var loc1:*=Number(beautyShop.data.BeautyShopData.getInstance().sumResetAdenaHair() + beautyShop.data.BeautyShopData.getInstance().sumResetAdenaFace());
this.money_mc.adena_txt.text = org.casalib.utils.NumberUtil.format(loc1, String(loc1).length, ",", "0") + " " + beautyShop.native.BeautySystem.ADENA;
this.money_mc.coin_txt.text = "";
this.money_mc.msg_txt.styleSheet = ncsoft.l2.data.L2UIFontStyleSheetData.getInstance().getStyleSheet();
this.money_mc.msg_txt.htmlText = beautyShop.native.BeautySystem.POP_RESET;
this.money_mc.strPopType = beautyShop.data.BeautyShopData.RESET;
if (this.hair_mc.visible)
{
this.face_mc.y = 92;
if (this.face_mc.visible)
{
loc2 = this.face_mc.y + this.face_mc.height + 12;
this.bg.height = 352;
}
else
{
loc2 = this.hair_mc.y + this.hair_mc.height + 12;
this.bg.height = 352 - 68;
}
}
else
{
this.face_mc.y = 12;
loc2 = this.face_mc.y + this.face_mc.height + 12;
this.bg.height = 352 - 68;
}
this.money_mc.y = loc2;
return;
}

internal function buyCallServer(arg1:beautyShop.event.BeautyEvent):void
{
var loc1:*=0;
var loc2:*=0;
var loc3:*=0;
if (!(beautyShop.data.BeautyShopData.objSelectHairData == null) && beautyShop.data.BeautyShopData.bHairCheck)
{
loc1 = beautyShop.data.BeautyShopData.objSelectHairData["itemIdx"];
loc2 = beautyShop.data.BeautyShopData.objSelectHairColorData["colorIdx"];
}
else
{
loc1 = -1;
loc2 = -1;
}
if (!(beautyShop.data.BeautyShopData.objSelectFaceData == null) && beautyShop.data.BeautyShopData.bFaceCheck)
{
loc3 = beautyShop.data.BeautyS...
Человек просто обязан ошибаться, раз другие учатся на его ошибках .......


Возможно похожие темы ...
Тема Автор Ответы Просмотры Последний пост
  Работа над Goddess of Destruction (part 7) n3k0nation 459 174,258 03-21-2022, 04:21 PM
Последний пост: TieLay
  Помогите с Сервером L2Dream версии 439 для Lineage 2 Gracia Part 2 CAHTEX 4 3,379 10-01-2021, 02:40 PM
Последний пост: tenor
  Работа с камерой и Энтер чат FriendlyGhost 0 1,301 04-29-2018, 06:07 AM
Последний пост: FriendlyGhost
  Goddess of Destruction ( новая ветка от NcSoft ) Bacek 180 58,996 08-22-2017, 12:32 PM
Последний пост: BadStealth
  EmuRT Gracia part 2 ? knaif 3 1,622 02-08-2016, 01:19 PM
Последний пост: knaif
  Gracia Part 1 от l2emu исходы TFH 6 1,964 10-05-2015, 07:53 PM
Последний пост: G1ta0
  Ищу исходы L2-Dream gracia part 2 knaif 1 1,385 10-05-2015, 07:51 PM
Последний пост: G1ta0
  Оплачиваемая работа Grek1993 1 1,349 08-01-2015, 11:29 AM
Последний пост: ztaecz
  Работа над Goddess of Destruction (part 6) Ashe 1,274 471,560 07-11-2015, 08:00 PM
Последний пост: n3k0nation
  Работа с мультиселлом Evencelance 11 2,446 09-19-2014, 12:43 PM
Последний пост: Evencelance

Перейти к форуму:


Пользователи, просматривающие эту тему: 1 Гость(ей)