int CMoveCommand::Load(char* Buffer, int iSize) { this->Init(); CWzMemScript WzMemScript; int Token; int counter; WzMemScript.SetBuffer(Buffer, iSize); counter=0; while ( true ) { Token=WzMemScript.GetToken(); if ( Token == 2) { break; } if ( Token == 1) { this->m_MoveCommandData[counter].Index = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); strcpy(this->m_MoveCommandData[counter].Name, WzMemScript.GetString()); Token = WzMemScript.GetToken(); strcpy(this->m_MoveCommandData[counter].EngName, WzMemScript.GetString()); Token = WzMemScript.GetToken(); this->m_MoveCommandData[counter].NeedZen = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MoveCommandData[counter].NeedLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MoveCommandData[counter].GateNumber = WzMemScript.GetNumber(); counter++; } else { this->Init(); MsgBox("MoveCommand script load fail"); return FALSE; } } return TRUE; }
void CMonsterAttr::LoadAttr(char* Buffer, int iSize) { CWzMemScript WzMemScript; WzMemScript.SetBuffer(Buffer, iSize); int Token; int n=0; while ( true ) { Token = WzMemScript.GetToken(); if ( Token == END ) break; if ( Token == 1 ) { this->m_MonsterAttr[n].m_Index = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Rate = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); strcpy_s(this->m_MonsterAttr[n].m_Name, sizeof(this->m_MonsterAttr[n].m_Name), WzMemScript.GetString()); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Level = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Hp = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Mp = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_DamageMin = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_DamageMax = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Defense = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MagicDefense = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_AttackRating = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Successfulblocking = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MoveRange = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_AttackType = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_AttackRange = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_ViewRange = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MoveSpeed = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_AttackSpeed = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_RegenTime = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Attribute = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_ItemRate = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MoneyRate = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MaxItemLevel = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_MonsterSkill = (DWORD)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Resistance[R_ICE] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Resistance[R_POISON] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Resistance[R_LIGHTNING] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_MonsterAttr[n].m_Resistance[R_FIRE] = (BYTE)WzMemScript.GetNumber(); this->m_MonsterAttr[n].m_Hp = this->m_MonsterAttr[n].m_Hp - (INT)(this->m_MonsterAttr[n].m_Hp / 100.0f * gMonsterHp); this->m_MonsterAttr[n].m_iScriptHP = this->m_MonsterAttr[n].m_Hp; if ( this->m_MonsterAttr[n].m_Level <= 24 && this->m_MonsterAttr[n].m_Index < 50) { if ( this->m_MonsterAttr[n].m_Level == 13 || this->m_MonsterAttr[n].m_Level == 14 || this->m_MonsterAttr[n].m_Level == 17 || this->m_MonsterAttr[n].m_Level == 18 || this->m_MonsterAttr[n].m_Level == 19 || this->m_MonsterAttr[n].m_Level == 24 ) { int modiryvalue = this->m_MonsterAttr[n].m_Hp*20/100; modiryvalue-= modiryvalue*gMonsterHPAdjust/100; this->m_MonsterAttr[n].m_Hp -= modiryvalue; } else if ( this->m_MonsterAttr[n].m_Level == 20 || this->m_MonsterAttr[n].m_Level == 22 ) { int modiryvalue = this->m_MonsterAttr[n].m_Hp*30/100; modiryvalue-= modiryvalue*gMonsterHPAdjust/100; this->m_MonsterAttr[n].m_Hp -= modiryvalue; } else { int modiryvalue = this->m_MonsterAttr[n].m_Hp/2; modiryvalue-= modiryvalue*gMonsterHPAdjust/100; this->m_MonsterAttr[n].m_Hp -= modiryvalue; } } if ( this->m_MonsterAttr[n].m_Level <= 19 && this->m_MonsterAttr[n].m_Index < 50 ) { if ( this->m_MonsterAttr[n].m_Level == 13 || this->m_MonsterAttr[n].m_Level == 14 || this->m_MonsterAttr[n].m_Level == 17 || this->m_MonsterAttr[n].m_Level == 18 || this->m_MonsterAttr[n].m_Level == 19 ) { int modiryvaluemin = this->m_MonsterAttr[n].m_DamageMin*30/100; int modiryvaluemax = this->m_MonsterAttr[n].m_DamageMax*30/100; modiryvaluemin -= modiryvaluemin*gMonsterHPAdjust/100; modiryvaluemax -= modiryvaluemax*gMonsterHPAdjust/100; this->m_MonsterAttr[n].m_DamageMin -= modiryvaluemin; this->m_MonsterAttr[n].m_DamageMax -= modiryvaluemax; } else { int modiryvaluemin = this->m_MonsterAttr[n].m_DamageMin/2; int modiryvaluemax = this->m_MonsterAttr[n].m_DamageMax/2; modiryvaluemin -= modiryvaluemin*gMonsterHPAdjust/100; modiryvaluemax -= modiryvaluemax*gMonsterHPAdjust/100; this->m_MonsterAttr[n].m_DamageMin -= modiryvaluemin; this->m_MonsterAttr[n].m_DamageMax -= modiryvaluemax; } } n++; if ( n> MAX_MONSTER_TYPE-1 ) { MsgBox("Monster attribute max over %s %d", __FILE__, __LINE__); return; } } } }
void CMagicDamage::LogSkillList(char* Buffer, int iSize) { this->Init(); CWzMemScript WzMemScript; WzMemScript.SetBuffer(Buffer, iSize); int Token; int n=0; int number; char name[50]; int requireLevel; int damage; int mana; int bp=0; int dis; int rEnergy; int iSkillType; int rLeadership; int rDelay; int attr; int iSkillUseType; int iSkillBrand; int iKillCount; int RequireStatus[MAX_REQ_SKILL_STATUS] = {0}; BYTE RequireClass[MAX_TYPE_PLAYER]; while ( true ) { Token = WzMemScript.GetToken(); if ( Token == 2 ) { break; } if ( Token == 1 ) { number = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); strcpy_s(name, sizeof(name), WzMemScript.GetString() ); Token = WzMemScript.GetToken(); requireLevel = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); damage = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); mana = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); bp = (int)WzMemScript.GetNumber(); // Agility Gauge Token = WzMemScript.GetToken(); dis = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); rDelay = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); rEnergy = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); rLeadership = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); attr = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); iSkillType = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); iSkillUseType = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); iSkillBrand = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); iKillCount = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireStatus[0] = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireStatus[1] = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireStatus[2] = (int)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireClass[0] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireClass[1] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireClass[2] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireClass[3] = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); RequireClass[4] = (BYTE)WzMemScript.GetNumber(); this->Set(name, number,damage, requireLevel, mana, bp, dis, attr, iSkillType, RequireClass, rEnergy, rLeadership, rDelay); this->SetEx(number, iSkillUseType, iSkillBrand, iKillCount, RequireStatus); DefMagicInf[number].Set(number, 0); } } LogAdd("(%s) Skill information data load complete", "Skill"); }
BOOL CQuestInfo::LoadQuestInfo(char* Buffer, int iSize) { CWzMemScript WzMemScript; int Token; int n; WzMemScript.SetBuffer(Buffer, iSize); this->Init(); n = 0; while ( true ) { Token = WzMemScript.GetToken(); if ( Token == 2 ) { break; } else { if ( Token == 1 ) { int Type = WzMemScript.GetNumber(); if ( Type == 0 ) { Token = WzMemScript.GetToken(); auto int iQuestIndex = WzMemScript.GetNumber(); this->QuestInfo[iQuestIndex].QuestIndex = iQuestIndex; Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestStartType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestStartSubType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); strcpy( this->QuestInfo[iQuestIndex].Name, WzMemScript.GetString()); this->QuestInfo[iQuestIndex].QuestSubInfoCount = 0; while ( true ) { int iSubInfoCount = this->QuestInfo[iQuestIndex].QuestSubInfoCount; Token = WzMemScript.GetToken(); if ( Token == 0 ) { if ( strcmp("end", WzMemScript.GetString()) == 0 ) { break; } } this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].QuestType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedSubType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ItemLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedNumber = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedTargetMinLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedTargetMaxLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].NeedDropRate = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardSubType = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RewardCount = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].LinkConditionIndex = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextBeforeReg = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextAfterReg = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextCompleteQuest = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].ContextQuestClear = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[0] = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[1] = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[2] = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[3] = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestSubInfo[iSubInfoCount].RequireClass[4] = WzMemScript.GetNumber(); this->QuestInfo[iQuestIndex].QuestSubInfoCount++; } LogAdd("[Quest] (%s) Load : Index %d, SubInfoCount %d", this->QuestInfo[iQuestIndex].Name, iQuestIndex, this->QuestInfo[iQuestIndex].QuestSubInfoCount ); this->m_QuestCount++; } else if ( Type == 1 ) { Token = WzMemScript.GetToken(); auto int iQuestIndex = WzMemScript.GetNumber(); while ( true ) { auto int iFailInfoCount = this->QuestInfo[iQuestIndex].QuestConditionCount; Token = WzMemScript.GetToken(); if ( Token == 0 ) { if ( strcmp("end", WzMemScript.GetString()) == 0 ) { break; } } this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].Index = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedQuestIndex = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MinLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].MaxLevel = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].ReqStr = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].NeedZen = WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->QuestInfo[iQuestIndex].QuestCondition[iFailInfoCount].StartContext = WzMemScript.GetNumber(); this->QuestInfo[iQuestIndex].QuestConditionCount++; } } else { MsgBox("Quest Info Read Fail"); fclose(SMDFile); return false; } } } } this->InitQuestItem(); return true; }
void CMonsterSetBase::LoadSetBase(char* Buffer, int iSize) { CWzMemScript WzMemScript; int Token; int rcount; int copycount; BYTE Sdir; WzMemScript.SetBuffer(Buffer, iSize); this->m_Count = 0; while ( true ) { Token = WzMemScript.GetToken(); if ( Token == 2 ) break; if ( Token == 1 ) { int Type = (int)WzMemScript.GetNumber(); while ( true ) { Token = WzMemScript.GetToken(); if ( strcmp("end", WzMemScript.GetString()) == 0 ) break; this->m_Mp[this->m_Count].m_Type = (WORD)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_MapNumber = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_Dis = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_X = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_Y = (BYTE)WzMemScript.GetNumber(); this->m_Mp[this->m_Count].m_ArrangeType = Type; if ( Type == 1 || Type == 3 ) { Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_W = (BYTE)WzMemScript.GetNumber(); Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_H = (BYTE)WzMemScript.GetNumber(); } else if ( Type == 2 ) { this->m_Mp[this->m_Count].m_W = 0; this->m_Mp[this->m_Count].m_H = 0; int w = this->m_Mp[this->m_Count].m_X - 3; int h = this->m_Mp[this->m_Count].m_Y - 3; w += Random(0,6); h += Random(0,6); this->m_Mp[this->m_Count].m_X = w; this->m_Mp[this->m_Count].m_Y = h; } else if ( Type == 4 ) { this->m_Mp[this->m_Count].m_W = 0; this->m_Mp[this->m_Count].m_H = 0; } else { this->m_Mp[this->m_Count].m_W = 0; this->m_Mp[this->m_Count].m_H = 0; } Token = WzMemScript.GetToken(); this->m_Mp[this->m_Count].m_Dir = (BYTE)WzMemScript.GetNumber(); Sdir = this->m_Mp[this->m_Count].m_Dir; if ( this->m_Mp[this->m_Count].m_Dir == (BYTE)-1 ) { this->m_Mp[this->m_Count].m_Dir = Random(0,7); } if ( Type == 1 || Type == 3 ) { BYTE w = this->m_Mp[this->m_Count].m_X; BYTE h = this->m_Mp[this->m_Count].m_Y; Token = WzMemScript.GetToken(); rcount = (int)WzMemScript.GetNumber(); copycount = this->m_Count; if ( rcount > 1 ) { for ( int k = 0; k<rcount-1 ; k++ ) { if ( g_MapServerManager.CheckMapCanMove(this->m_Mp[copycount].m_MapNumber) == FALSE ) break; this->m_Count++; if ( this->m_Count > OBJ_MAXMONSTER-1 ) { MsgBox("Monster attribute max over %s %d", __FILE__, __LINE__); return; } this->m_Mp[this->m_Count].m_Dis = this->m_Mp[copycount].m_Dis; this->m_Mp[this->m_Count].m_Type = this->m_Mp[copycount].m_Type; this->m_Mp[this->m_Count].m_MapNumber = this->m_Mp[copycount].m_MapNumber; this->m_Mp[this->m_Count].m_W = this->m_Mp[copycount].m_W; this->m_Mp[this->m_Count].m_H = this->m_Mp[copycount].m_H; this->m_Mp[this->m_Count].m_X = this->m_Mp[copycount].m_X; this->m_Mp[this->m_Count].m_Y = this->m_Mp[copycount].m_Y; this->m_Mp[this->m_Count].m_ArrangeType = this->m_Mp[copycount].m_ArrangeType; if ( Sdir == (BYTE)-1 ) this->m_Mp[this->m_Count].m_Dir = Random(0,7); else this->m_Mp[this->m_Count].m_Dir = this->m_Mp[copycount].m_Dir; } } } if ( g_MapServerManager.CheckMapCanMove(this->m_Mp[this->m_Count].m_MapNumber) == FALSE ) continue; this->m_Count++; if ( this->m_Count > OBJ_MAXMONSTER-1 ) { MsgBox("Monster attribute max over %d (%s %d)", this->m_Count, __FILE__, __LINE__); //fclose(SMDFile); return; } } } } //fclose(SMDFile); }
//005b47d0 -> int CSetItemOption::LoadOptionInfo(LPSTR Buffer, int iSize) { CWzMemScript WzMemScript; int i; int Token; WzMemScript.SetBuffer(Buffer, iSize); memset(&this->m_SetItemOptionInfo, 0, sizeof(this->m_SetItemOptionInfo)); for ( i=0;i<MAX_SETITEM_OPTION;i++) { memset(&this->m_SetItemOptionInfo[i].SetOptionTable[0], -1, sizeof(this->m_SetItemOptionInfo[0].SetOptionTable) ); memset(&this->m_SetItemOptionInfo[i].SetExPOptionTable, -1, sizeof(this->m_SetItemOptionInfo[0].SetExPOptionTable) ); memset(&this->m_SetItemOptionInfo[i].SetFullOtionTable[0], -1, sizeof(this->m_SetItemOptionInfo[0].SetFullOtionTable) ); } while ( true ) { Token=WzMemScript.GetToken(); int number=WzMemScript.GetNumber(); if (Token==0 && strcmp("end", WzMemScript.GetString()) == 0) { break; } else { LPSETITEM_OPTIONINFO p; p=&this->m_SetItemOptionInfo[number]; Token=WzMemScript.GetToken(); strcpy(&p->Name[0], WzMemScript.GetString()); for (i=0;i<OPTION_TABLE_SIZE;i++) { Token=WzMemScript.GetToken(); p->SetOptionTable[i][0] = WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetOptionTableValue[i][0] =WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetOptionTable[i][1] = WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetOptionTableValue[i][1] =WzMemScript.GetNumber(); if ( (p->SetOptionTable[i][0] != -1) || (p->SetOptionTable[i][1] != -1) ) { p->SetOptionCount++; } } // Special Set Item Options Token=WzMemScript.GetToken(); p->SetExPOptionTable[0] = WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetExPOptionTableValue[0] = WzMemScript.GetNumber(); if ( p->SetExPOptionTable[0] != -1) { p->SetOptionCount ++; } Token=WzMemScript.GetToken(); p->SetExPOptionTable[1] = WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetExPOptionTableValue[1] = WzMemScript.GetNumber(); if ( p->SetExPOptionTable[1] != -1) { p->SetOptionCount ++; } // Full Type Set Item Token=WzMemScript.GetToken(); p->SetFullOtionTable[0]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTableValue[0]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTable[1]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTableValue[1]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTable[2]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTableValue[2]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTable[3]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTableValue[3]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTable[4]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->SetFullOtionTableValue[4]=WzMemScript.GetNumber(); // Save Character Class Disponibility Token=WzMemScript.GetToken(); p->RequireClass[CLASS_WIZARD]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->RequireClass[CLASS_KNIGHT]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->RequireClass[CLASS_ELF]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->RequireClass[CLASS_MAGUMSA]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->RequireClass[CLASS_DARKLORD]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); p->RequireClass[CLASS_SUMMONER]=WzMemScript.GetNumber(); // //#ifdef SEASON6DOT3_ENG Token=WzMemScript.GetToken(); p->RequireClass[CLASS_MONK]=WzMemScript.GetNumber(); //#endif // Active SetItem p->IsLoad=TRUE; } } return 1; }
//005b4500 -> int CSetItemOption::LoadTypeInfo(LPSTR Buffer, int iSize) { CWzMemScript WzMemScript; int i; int Token; WzMemScript.SetBuffer(Buffer, iSize); memset(this->m_SetItemTypeInfo , -1, sizeof(this->m_SetItemTypeInfo) ); for ( i=0; i<MAX_ITEMS; i++) { this->m_SetItemTypeInfo[i].IsLoad =FALSE; } while ( true ) { int number; Token=WzMemScript.GetToken(); if (Token == 2) { break; } if (Token == 1) { number = WzMemScript.GetNumber(); while ( true ) { int number2; LPSETITEM_TYPEINFO pointer; Token = WzMemScript.GetToken(); number2=WzMemScript.GetNumber(); if ( ( Token== 0) && (strcmp("end", WzMemScript.GetString() )== 0)) { break; } else { pointer = &this->m_SetItemTypeInfo[number*MAX_SUBTYPE_ITEMS+number2]; Token=WzMemScript.GetToken(); pointer->OptionIndex[0]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); pointer->OptionIndex[1]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); pointer->ChaosMixLevel[0]=WzMemScript.GetNumber(); Token=WzMemScript.GetToken(); pointer->ChaosMixLevel[1]=WzMemScript.GetNumber(); pointer->IsLoad=TRUE; } } } } return 1; }