//00555810 -> 100% int CTemporaryUserManager::CheckInEventMap(int SlotIndex) // { if( !IS_TEMP_SLOT(SlotIndex) ) { return -1; } // ---- if( BC_MAP_RANGE(this->m_UserData[SlotIndex].MapNumber) ) { return TEMP_BLOODCASTLE; } // ---- if( IT_MAP_RANGE(m_UserData[SlotIndex].MapNumber) ) { return TEMP_ILLUSION; } // ---- if( this->m_UserData[SlotIndex].MapNumber >= 69 && this->m_UserData[SlotIndex].MapNumber <= 72 ) //-> Need define { return TEMP_IMPERIAL; } // ---- if( this->m_UserData[SlotIndex].MapNumber >= 65 && this->m_UserData[SlotIndex].MapNumber <= 68 ) //-> Need define { return TEMP_DOPPEL; } // ---- if( DS_MAP_RANGE(m_UserData[SlotIndex].MapNumber) ) { return TEMP_DEVILSQUARE; } // ---- return false; }
BOOL CMoveCommand::CheckMainToMove(LPOBJ lpObj) { if ( BC_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( CC_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( KALIMA_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( DS_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( DOPPELGANGER_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( IMPERIAL_MAP_RANGE(lpObj->MapNumber) != FALSE ) { return FALSE; } if ( lpObj->MapNumber == MAP_INDEX_KANTURU_BOSS ) { return FALSE; } if ( IT_MAP_RANGE(lpObj->MapNumber) != FALSE ) { if(g_IllusionTempleEvent.CheckTeleport(lpObj->m_Index) != FALSE) { return FALSE; } } return TRUE; }
//0051dcd0 -> BOOL CObjBaseAttack::PkCheck(LPOBJ lpObj, LPOBJ lpTargetObj) { if ( gLanguage == 0 || gLanguage == 2 || gLanguage == 4) { if ( lpObj->Type == OBJ_USER ) { BOOL bPlayerKiller = FALSE; //Season 2.5 add-on if(lpObj->PartyNumber >= 0) //Season 2.5 add-on { if(gParty.GetPKPartyPenalty(lpObj->PartyNumber) >= 6) { bPlayerKiller = TRUE; } } else if(lpObj->m_PK_Level >= 6) { bPlayerKiller = TRUE; } if(bPlayerKiller == TRUE) //Season 2.5 add-on { if (lpObj->PartyNumber >= 0 ) { if ( gPkLimitFree == FALSE ) { return FALSE; } } else if ( lpObj->m_PK_Count >= 3 ) { if ( gPkLimitFree == FALSE ) { return FALSE; } } } } } if ( lpObj->Type == OBJ_USER && lpTargetObj->Type == OBJ_USER) { if ( lpTargetObj->Level <= 5 || lpObj->Level <= 5 ) { return FALSE; } if ( gObjGetRelationShip(lpObj, lpTargetObj) == 2 ) // Rivals { if ( gNonPK == FALSE ) { return TRUE; } } if ( lpObj->lpGuild != NULL && lpTargetObj->lpGuild != NULL ) { if ( lpObj->lpGuild->WarState == 1 && lpTargetObj->lpGuild->WarState == 1 ) { if ( lpObj->lpGuild->Number == lpTargetObj->lpGuild->Number ) { return FALSE; } } } if ( gObjTargetGuildWarCheck(lpObj, lpTargetObj) == FALSE && lpTargetObj->lpGuild != NULL && lpTargetObj->lpGuild->WarState != 0) { if ( lpTargetObj->lpGuild->WarType == 1 ) { if ( lpTargetObj->MapNumber != 6 ) { if ( !gNonPK ) { return TRUE; } } } if ( CC_MAP_RANGE(lpTargetObj->MapNumber) == FALSE ) { return FALSE; } } if ( IT_MAP_RANGE(lpObj->MapNumber) != FALSE ) //season2.5 add-on { // } else if ( CC_MAP_RANGE(lpObj->MapNumber) != FALSE ) { if ( g_ChaosCastle.GetCurrentState(g_ChaosCastle.GetChaosCastleIndex(lpObj->MapNumber)) != 2 ) { return FALSE; } } else if ( gNonPK != FALSE ) { return FALSE; } if ( DS_MAP_RANGE(lpObj->MapNumber) ) // DEvil { return FALSE; } if ( BC_MAP_RANGE(lpObj->MapNumber) ) { return FALSE; } if ( gObjDuelCheck(lpObj, lpTargetObj) == FALSE ) { if ( gObjDuelCheck(lpTargetObj) ) { return FALSE; } } if ( gLanguage == 0 || gLanguage == 2 ) { BOOL bPlayerKiller = FALSE; //Season 2.5 add-on if(lpObj->PartyNumber >= 0) //Season 2.5 add-on { if(gParty.GetPKPartyPenalty(lpObj->PartyNumber) >= 6) { bPlayerKiller = TRUE; } } else if(lpObj->m_PK_Level >= 6) { bPlayerKiller = TRUE; } if(bPlayerKiller == TRUE) //Season 2.5 add-on { if (lpObj->PartyNumber >= 0 ) { if ( gPkLimitFree == FALSE ) { return FALSE; } } else if ( lpObj->m_PK_Count >= 3 ) { if ( gPkLimitFree == FALSE ) { return FALSE; } } } bPlayerKiller = FALSE; //Season 2.5 add-on if(lpTargetObj->PartyNumber >= 0) //Season 2.5 add-on { if(gParty.GetPKPartyPenalty(lpTargetObj->PartyNumber) >= 6) { bPlayerKiller = TRUE; } } else if(lpTargetObj->m_PK_Level >= 6) { bPlayerKiller = TRUE; } if(bPlayerKiller == 1) //Season 2.5 add-on { if (lpTargetObj->PartyNumber >= 0 ) { if ( gPkLimitFree == FALSE ) { if(g_CastleSiege.GetCastleState() != CASTLESIEGE_STATE_STARTSIEGE) { return FALSE; } } } else if ( lpTargetObj->m_PK_Count >= 3 ) { if ( gPkLimitFree == FALSE ) { if(g_CastleSiege.GetCastleState() != CASTLESIEGE_STATE_STARTSIEGE) { return FALSE; } } } } } } return TRUE; }
//00414B10 - identical BOOL CKalimaGate::CreateKalimaGate(int iIndex, BYTE btLevel, BYTE cTX, BYTE cTY) { BOOL bKalimaGateCreateSucceed=FALSE; int iMonsterIndex=-1; EnterCriticalSection(&this->m_critKalimaGate ); __try { int iKalimaGateLevel; int iMapNumber; BYTE btMapAttr; int iMonsterType; BYTE cX; BYTE cY; if ( gObjIsConnected(iIndex) == PLAYER_EMPTY ) { return false; } LogAddTD("[Kalima] [%s][%s] Try to Create Kalima Gate", gObj[iIndex].AccountID, gObj[iIndex].Name); iKalimaGateLevel = this->GetKalimaGateLevel(iIndex); if ( iKalimaGateLevel < btLevel-1 ) { return false; } iKalimaGateLevel = btLevel-1; if ( DS_MAP_RANGE(gObj[iIndex].MapNumber) ) { return false; } if ( BC_MAP_RANGE(gObj[iIndex].MapNumber) ) { return false; } if ( CC_MAP_RANGE(gObj[iIndex].MapNumber) ) { return false; } if ( CHECK_ILLUSIONTEMPLE(gObj[iIndex].MapNumber) )//NEW { return false; } #ifdef IMPERIAL if( CImperialGuardian::IsEventMap(gObj[iIndex].MapNumber) ) { return false; } #endif if ( KALIMA_FLOOR_RANGE(iKalimaGateLevel)== FALSE ) { LogAddTD("[Kalima] [%s][%s] Failed to Summon Kalima Gate - Gate Level Check Error : %d", gObj[iIndex].AccountID, gObj[iIndex].Name, iKalimaGateLevel+1); return false; } iMapNumber = gObj[iIndex].MapNumber; btMapAttr = MapC[iMapNumber].GetAttr(gObj[iIndex].X, gObj[iIndex].Y); if ( btMapAttr &1 != 0 ) { LogAddTD("[Kalima] [%s][%s] Failed to Summon Kalima Gate - Called in Saftey Area (Map:%d, X:%d, Y:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber, gObj[iIndex].X, gObj[iIndex].Y); return false; } if ( gObj[iIndex].m_cKalimaGateExist == TRUE ) { GCServerMsgStringSend(lMsg.Get( MSGGET( 4, 224)), iIndex, 1); LogAddTD("[Kalima] [%s][%s] Failed to Summon Kalima Gate - Already Have Gate (SummonIndex:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].m_iKalimaGateIndex); return false; } iMonsterType = iKalimaGateLevel+152; cX = cTX; cY = cTY; btMapAttr = MapC[iMapNumber].GetAttr(cX, cY); if ( btMapAttr != 0 ) { if (this->GetRandomLocation(iMapNumber, cX, cY) == 0) { LogAddTD("[Kalima] [%s][%s] Failed to Summon Kalima Gate - Failed to get Location (MapNumber:%d, X:%d, Y:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber, cX, cY); return false; } } if ( gObj[iIndex].MapNumber == 10 ) { LogAddTD("[Kalima] [%s][%s] Failed to Summon Kalima Gate - Uable to Summon in this Map (MapNumber:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iIndex].MapNumber); return false; } iMonsterIndex = gObjAddMonster(iMapNumber); if ( iMonsterIndex >= 0 ) { LPMONSTER_ATTRIBUTE lpMATTR = gMAttr.GetAttr(iMonsterType); if ( lpMATTR == NULL ) { gObjDel(iMonsterIndex); LogAddTD("[Kalima] [%s][%s] Kalima Gate Vanished - lpMATTR == NULL (SummonIndex:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, iMonsterIndex); return false; } gObjSetMonster(iMonsterIndex, iMonsterType); gObj[iMonsterIndex].Live = TRUE; gObj[iMonsterIndex].Life = 1000.0; gObj[iMonsterIndex].MaxLife = 1000.0; gObj[iMonsterIndex].m_PosNum = -1; gObj[iMonsterIndex].X = cX; gObj[iMonsterIndex].Y = cY; gObj[iMonsterIndex].MTX = cX; gObj[iMonsterIndex].MTY = cY; gObj[iMonsterIndex].TX = cX; gObj[iMonsterIndex].TY = cY; gObj[iMonsterIndex].m_OldX = cX; gObj[iMonsterIndex].m_OldY = cY; gObj[iMonsterIndex].StartX = cX; gObj[iMonsterIndex].StartY = cY; gObj[iMonsterIndex].MapNumber = iMapNumber; gObj[iMonsterIndex].m_MoveRange = 0; gObj[iMonsterIndex].m_cKalimaGateEnterCount = 0; gObj[iIndex].m_cKalimaGateExist = TRUE; gObj[iIndex].m_iKalimaGateIndex = iMonsterIndex; gObj[iMonsterIndex].Level = lpMATTR->m_Level; gObj[iMonsterIndex].Type = OBJ_MONSTER; gObj[iMonsterIndex].MaxRegenTime = 1000; gObj[iMonsterIndex].Dir = 1; gObj[iMonsterIndex].m_RecallMon = iIndex; gObj[iMonsterIndex].RegenTime = GetTickCount(); gObj[iMonsterIndex].m_Attribute = iKalimaGateLevel + 51; gObj[iMonsterIndex].DieRegen = FALSE; LogAddTD("[Kalima] [%s][%s] Create Kalima Gate Successfuly (Live:%d, GateTick:%u, DieRegen:%d, Map:%d, X:%d, Y:%d, SummonIndex:%d, OwnerIndex:%d, GateNo.:%d)", gObj[iIndex].AccountID, gObj[iIndex].Name, gObj[iMonsterIndex].Live, gObj[iMonsterIndex].RegenTime, gObj[iMonsterIndex].DieRegen, gObj[iMonsterIndex].MapNumber, gObj[iMonsterIndex].X, gObj[iMonsterIndex].Y, iMonsterIndex, iIndex, iKalimaGateLevel+1); bKalimaGateCreateSucceed = TRUE; } } __finally { LeaveCriticalSection(&this->m_critKalimaGate); } return true; }
void CDevilSquare::ProcOpen() { if ( this->m_iremainTimeSec != -1 ) { int lc2 = (GetTickCount() - this->m_iTime)/1000; if ( lc2 != 0 ) { this->m_iremainTimeSec -= lc2; this->m_iTime += lc2 * 1000; if ( this->m_iremainTimeSec <= 30 && this->m_bSendTimeCount == FALSE ) { PMSG_SET_DEVILSQUARE pMsg; PHeadSetB((LPBYTE)&pMsg, 0x92, sizeof(pMsg)); pMsg.Type = DevilSquare_OPEN; for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING && gObj[i].Type == OBJ_USER) { if ( BC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { if ( CC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { DataSend(i, (BYTE *)&pMsg, pMsg.h.size); } } } } this->m_bSendTimeCount = TRUE; } if (this->m_iremainTimeSec < 1 ) { this->SendEventStartMsg(); this->SetState(DevilSquare_PLAYING); } } } else { if ( this->m_iTime < GetTickCount() ) { this->ClearMonstr(); this->m_iRemainTime--; if ( this->m_iRemainTime > 0 ) { PMSG_NOTICE pNotice; TNotice::MakeNoticeMsgEx(&pNotice, 0, lMsg.Get(MSGGET(2, 193)), this->m_iRemainTime); for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING && gObj[i].Type == OBJ_USER) { if ( BC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { if ( CC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { DataSend(i, (BYTE *)&pNotice, pNotice.h.size); } } } } LogAddTD((char*)pNotice.Notice); this->m_iTime = GetTickCount(); } if (this->m_iRemainTime == 1 && this->m_iremainTimeSec == -1) { this->m_iremainTimeSec = 60; this->m_iTime = GetTickCount(); } else { this->m_iTime = GetTickCount() + 60000; } } } }
void CDevilSquare::ProcClose() { if ( this->m_iremainTimeSec != -1 ) { int lc2 = (GetTickCount() - this->m_iTime)/1000; if ( lc2 != 0 ) { this->m_iremainTimeSec -= lc2; this->m_iTime += lc2 * 1000; if ( this->m_iremainTimeSec <= 30 && this->m_bSendTimeCount == FALSE ) { PMSG_SET_DEVILSQUARE pMsg; PHeadSetB((LPBYTE)&pMsg, 0x92, sizeof(pMsg)); pMsg.Type = DevilSquare_CLOSE; for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING && gObj[i].Type == OBJ_USER) { if ( BC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { if ( CC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { DataSend(i, (BYTE *)&pMsg, pMsg.h.size); } } } } this->m_bSendTimeCount = TRUE; } if (this->m_iremainTimeSec < 1 ) { PMSG_NOTICE pNotice; TNotice::MakeNoticeMsg((TNotice *)&pNotice, 0, lMsg.Get(MSGGET(2, 191))); for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING && gObj[i].Type == OBJ_USER) { if ( BC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { if ( CC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { DataSend(i, (BYTE *)&pNotice, pNotice.h.size); } } } } LogAddTD(pNotice.Notice); this->SetState(DevilSquare_OPEN); } } } else if ( this->m_iTime < GetTickCount() ) { this->ClearMonstr(); this->m_iRemainTime--; if ( this->m_bFlag == 0 ) { for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING ) { if ( DS_MAP_RANGE(gObj[i].MapNumber) != FALSE ) { gObjMoveGate(i, 27); } } } this->ItemClear(); } else { this->CheckInvalidUser(); } if ( this->m_iRemainTime <= 15 ) { if ( (this->m_iRemainTime%5)== 0 ) { PMSG_NOTICE pNotice; TNotice::MakeNoticeMsgEx((TNotice *)&pNotice, 0, lMsg.Get(MSGGET(2, 192)), this->m_iRemainTime); for ( int i=OBJ_STARTUSERINDEX; i<OBJMAX; i++) { if ( gObj[i].Connected == PLAYER_PLAYING && gObj[i].Type == OBJ_USER) { if ( BC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { if ( CC_MAP_RANGE(gObj[i].MapNumber) == FALSE ) { DataSend(i, (BYTE *)&pNotice, pNotice.h.size); } } } } LogAddTD((char*)pNotice.Notice); } } if ( this->m_iRemainTime == 1 && this->m_iremainTimeSec == -1 ) { this->m_iremainTimeSec = 60; this->m_iTime = GetTickCount(); } else { this->m_iTime = GetTickCount() + 60000; } } }
void CHacktoolBlockEx::SetUseForceMove2Town(LPOBJ lpObj) { if( BC_MAP_RANGE(lpObj->MapNumber) ) { int iBridgeIndex = g_BloodCastle.GetBridgeIndexByMapNum(lpObj->MapNumber); // ---- if( g_BloodCastle.GetCurrentState(iBridgeIndex) == BC_STATE_PLAYING ) { g_BloodCastle.SearchUserDropQuestItem(lpObj->m_Index); } else { g_BloodCastle.SearchUserDeleteQuestItem(lpObj->m_Index); } } // ---- if( IT_MAP_RANGE(lpObj->MapNumber) ) { g_IllusionTempleEvent.DropRelicsItem(lpObj->MapNumber, lpObj->m_Index); } // ---- if( (lpObj->m_IfState.use) != 0 ) { if( lpObj->m_IfState.type == 3 ) { lpObj->TargetShopNumber = -1; lpObj->m_IfState.type = 0; lpObj->m_IfState.use = 0; } } // ---- if( lpObj->MapNumber == MAP_INDEX_DEVIAS ) { gObjMoveGate(lpObj->m_Index, 22); } else if( lpObj->MapNumber == MAP_INDEX_NORIA ) { gObjMoveGate(lpObj->m_Index, 27); } else if( lpObj->MapNumber == MAP_INDEX_LOSTTOWER ) { gObjMoveGate(lpObj->m_Index, 42); } else if( lpObj->MapNumber == MAP_INDEX_ATHLANSE ) { gObjMoveGate(lpObj->m_Index, 49); } else if( lpObj->MapNumber == MAP_INDEX_TARKAN ) { gObjMoveGate(lpObj->m_Index, 57); } else if( BC_MAP_RANGE(lpObj->MapNumber) ) { gObjMoveGate(lpObj->m_Index, 22); } else if( CC_MAP_RANGE(lpObj->MapNumber) ) { gObjMoveGate(lpObj->m_Index, 22); } else if( KALIMA_MAP_RANGE(lpObj->MapNumber) ) { gObjMoveGate(lpObj->m_Index, 22); } else if( CC_MAP_RANGE(lpObj->MapNumber) ) { gObjMoveGate(lpObj->m_Index, 22); } else if( lpObj->MapNumber == MAP_INDEX_AIDA ) { gObjMoveGate(lpObj->m_Index, 27); } else if( lpObj->MapNumber == MAP_INDEX_CRYWOLF_FIRSTZONE ) { gObjMoveGate(lpObj->m_Index, 27); } else if( lpObj->MapNumber == MAP_INDEX_ELBELAND ) { gObjMoveGate(lpObj->m_Index, 267); } else if( lpObj->MapNumber == MAP_INDEX_SWAMP_OF_CALMNESS ) { gObjMoveGate(lpObj->m_Index, 273); } else if( lpObj->MapNumber == MAP_INDEX_RAKLION_FIELD ) { gObjMoveGate(lpObj->m_Index, 286); } else if( g_NewPVP.IsVulcanusMap(lpObj->MapNumber) ) { gObjMoveGate(lpObj->m_Index, 294); } else if( g_NewPVP.IsPKFieldMap(lpObj->MapNumber) ) { g_NewPVP.Reset(*lpObj); gObjMoveGate(lpObj->m_Index, 294); } else { gObjMoveGate(lpObj->m_Index, 17); } }
BOOL MapClass::ItemGive(int aIndex, int item_num, bool bFailNotSend) { if ( ((item_num<0)?FALSE:(item_num>MAX_MAPITEM-1)?FALSE:TRUE) == FALSE ) { LogAdd(lMsg.Get(MSGGET(1, 206)), __FILE__, __LINE__); return FALSE; } if ( gObj[aIndex].MapNumber != this->thisMapNumber ) { LogAdd(lMsg.Get(MSGGET(1, 207)), __FILE__, __LINE__, gObj[aIndex].MapNumber, gObj[aIndex].Name); return FALSE; } if ( this->m_cItem[item_num].IsItem() == FALSE ) { LogAdd(lMsg.Get(MSGGET(1, 208)), __FILE__, __LINE__,gObj[aIndex].Name); // Apply Deathway Fix herw return FALSE; } if ( this->m_cItem[item_num].Give == true ) { return FALSE; } if ( this->m_cItem[item_num].live == false ) { return FALSE; } int disx = this->m_cItem[item_num].px - gObj[aIndex].X; int disy = this->m_cItem[item_num].py - gObj[aIndex].Y; if ( disx > 2 || disx < -2 ) { return FALSE; } if ( disy > 2 || disy < -2 ) { return FALSE; } int lootresult = 1; if ( gLootingTime > 0 ) { if ( this->m_cItem[item_num].m_UserIndex != -1 ) { if ( GetTickCount() < this->m_cItem[item_num].m_LootTime ) { if ( aIndex != this->m_cItem[item_num].m_UserIndex ) { lootresult = 0; if ( this->m_cItem[item_num].m_QuestItem == false ) { if ( gObj[aIndex].PartyNumber >= 0 ) { if ( gObj[aIndex].PartyNumber == gObj[this->m_cItem[item_num].m_UserIndex].PartyNumber ) { if ( BC_MAP_RANGE(gObj[aIndex].MapNumber) != FALSE ) { if ( this->m_cItem[item_num].m_Type == ITEMGET(12,15) ||( this->m_cItem[item_num].m_Type == ITEMGET(13,19) && ((this->m_cItem[item_num].m_Level < 0)?FALSE:(this->m_cItem[item_num].m_Level > 2)?FALSE:TRUE) != FALSE ) ) { lootresult = 0; } else { lootresult = 1; } } else { lootresult = 1; } } } } } } } } if ( lootresult == 0 ) { if ( bFailNotSend == false ) { char szTemp[256]; wsprintf(szTemp, lMsg.Get(MSGGET(4, 128)), gObj[aIndex].Name ); ::GCServerMsgStringSend(szTemp, aIndex, 1); } return FALSE; } else { this->m_cItem[item_num].m_State = 8; this->m_cItem[item_num].Give = true; this->m_cItem[item_num].live = false; return TRUE; } }
BOOL MapClass::ItemDrop(int type, int level, float dur, int x, int y, BYTE Option1, BYTE Option2, BYTE Option3, BYTE NOption, BYTE SOption, DWORD number, int aIndex, int PetLevel, int PetExp, BYTE ItemEffectEx, BYTE* SOCKETOPT) { int count; int counttot = 0; BYTE attr = this->GetAttr(x, y); if ( (attr&4) == 4 || (attr&8) == 8 ) { return FALSE; } count = this->m_ItemCount; while ( true ) { if ( this->m_cItem[count].IsItem() == FALSE ) { this->m_cItem[count].DropCreateItem(type, level, x, y, dur, Option1, Option2, Option3, NOption, SOption, number, PetLevel, PetExp, ItemEffectEx, &SOCKETOPT[0]); this->m_cItem[count].m_UserIndex = aIndex; this->m_ItemCount++; if ( this->m_ItemCount > MAX_MAPITEM-1 ) { this->m_ItemCount = 0; } if ( BC_MAP_RANGE(this->thisMapNumber) != FALSE ) { if ( type == ITEMGET(13,19) ) { if ( ((level<0)?FALSE:(level>2)?FALSE:TRUE) != FALSE ) { if ( g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_nBC_QUESTITEM_SERIAL != -1 ) { if ( number == g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_nBC_QUESTITEM_SERIAL ) { if ( g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_iBC_QUEST_ITEM_USER_INDEX != -1 ) { LogAddTD("[Blood Castle] (%d) (Account:%s, Name:%s) Dropped Angel King's Weapon (%d)", this->thisMapNumber-(MAP_INDEX_BLOODCASTLE1-1), gObj[g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_iBC_QUEST_ITEM_USER_INDEX ].AccountID, gObj[g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_iBC_QUEST_ITEM_USER_INDEX].Name, g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_btBC_QUEST_ITEM_NUMBER); g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_iBC_QUEST_ITEM_USER_INDEX = -1; g_BloodCastle.m_BridgeData[this->thisMapNumber-MAP_INDEX_BLOODCASTLE1].m_btBC_QUEST_ITEM_NUMBER = 0; } } } } } } return TRUE; } count++; if ( count > MAX_MAPITEM-1 ) { count = 0; } counttot++; if ( counttot > MAX_MAPITEM-1 ) { return FALSE; } } LogAdd(lMsg.Get(MSGGET(1, 205)), __FILE__, __LINE__ ); return FALSE; }