Jump to content
Araştır
  • Diğer seçenekler ...
Sonuçları bul ...
Sonuçları bul ...
KO Developers Platformuna Hoşgeldin!
CerfiN

BDW Monument Sorunu

Önerilen Mesajlar

Arkadaşlar merhaba. BDW başlangıcında, kaydında, userları çekmesinde ve atmasında sorun yok ama monuların oyunda bir etkinliği yok. Ondeathprocess de gereken yerler ekli source ve db de ssid ler aynı ama dediğim gibi bi etkisi olmuyor kesince. Nereyi gözden kaçırıyorum acaba?

İletiyi paylaş


Link to post
Sitelerde Paylaş

OnDeathProcess'de ki çağrılması gereken kod bu ama breakpoint koyarak denedim tetiklenmiyor anlamadım.
 

void CNpc::EventMonumentProcess(CUser *pUser)

{



	{

		uint16 nActiveEvent = (uint16)g_pMain->pTempleEvent.ActiveEvent;

		if (nActiveEvent == TEMPLE_EVENT_BORDER_DEFENCE_WAR) {

			bool nMonuEnemy = false, nMonuNation = false;

			uint16 npcId = GetProtoID();



			if (npcId == MONUMENT_BDW_ENEMY_SSID)

			{

				nMonuEnemy = true;

				//g_pMain->FindNpcInZoneAndRemove(npcId, pUser->GetZoneID(), pUser->GetEventRoom());

				g_pMain->NpcUpdate(npcId, m_bMonster, pUser->GetNation(), pUser->GetNation() == KARUS ? MONUMENT_KARUS_SPID : MONUMENT_ELMORAD_SPID);

				g_pMain->SpawnEventNpc(npcId, m_bMonster, pUser->GetZoneID(), GetX(), GetY(), GetZ(), 1, m_bRadiusAmount, 0, pUser->GetNation(), -1, GetEventRoom()/* EventRoom */);



				if (pUser->GetNation() == KARUS)

					g_pMain->pTempleEvent.ElmoDeathCount[pUser->GetEventRoom()] += 20;

				else

					g_pMain->pTempleEvent.KarusDeathCount[pUser->GetEventRoom()] += 20;



				if (g_pMain->pTempleEvent.ElmoDeathCount[pUser->GetEventRoom()] > 59 ||

					g_pMain->pTempleEvent.KarusDeathCount[pUser->GetEventRoom()] > 59)

					nMonuNation = true;

			}

			else {

				nMonuNation = true;

				g_pMain->m_nEventMonumentNation[GetZoneID()][pUser->GetEventRoom()] = pUser->GetNation();

			}



			if (nMonuEnemy)

			{

				string chatstr;

				g_pMain->GetServerResource(IDS_EVENT_BDW_MONUMENT_WIN, &chatstr, pUser->GetNation() == KARUS ? "Karus" : "Elmorad", pUser->GetNation() == KARUS ? "Karus" : "Elmorad");

				Packet result;

				ChatPacket::Construct(&result, WAR_SYSTEM_CHAT, &chatstr);

				g_pMain->Send_Zone(&result, GetZoneID(), nullptr, Nation::ALL, GetEventRoom());

			}



			if (nMonuNation) {

				string chatstr;

				g_pMain->GetServerResource(IDS_EVENT_BDW_WIN_NATION, &chatstr, pUser->GetNation() == KARUS ? "Karus" : "Elmorad", pUser->GetNation() == KARUS ? "Karus" : "Elmorad");

				Packet result;

				ChatPacket::Construct(&result, WAR_SYSTEM_CHAT, &chatstr);

				g_pMain->Send_Zone(&result, GetZoneID(), nullptr, Nation::ALL, GetEventRoom());

				g_pMain->TempleEventFinish(pUser->GetEventRoom());

			}



		}

	}

}

İletiyi paylaş


Link to post
Sitelerde Paylaş

OnDeathProcess de gerekli fonksiyon varsa NpcType a göre o fonksiyonu belirle calisacaktir. Orada zaten npctype larin altinsa fonksiyonlar var bakarsan anlarsin. Db ile ayni olacak type.

İletiyi paylaş


Link to post
Sitelerde Paylaş

×
×
  • Yeni Oluştur...