farkmt2official 2
farkmt2official
kralhakan2009 1
kralhakan2009
Vahsi Uzman 1
Vahsi Uzman
Bvural41 1
Bvural41
emirhanHCL 1
emirhanHCL
Hikaye Ekle

Cevaplanmadı Player vs player

  • Konuyu başlatan Konuyu başlatan qay123
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 15
  • Görüntüleme Görüntüleme 1K
Comment this section and try again please
C++:
#ifdef NEW_ICEDAMAGE_SYSTEM
    if (!battle_is_icedamage(ch, victim))
        return false;
#endif

I've seen that you implemented a new system called new_ice_damage_system but check the conditions probably this function is returning false somewhere in the second if statement.

pAttacker && pAttacker-IsPC()) these conditions are true so we continue race=? warrior race probably 1 or 2 depending on the gender not sure what you did in the rest since there were no comments :D but If you want to apply this ice damage only to MOBS(npcs) change your statement in battle_is_attackable to if(victim->IsNPC()) //do stuff
C++:
#ifdef NEW_ICEDAMAGE_SYSTEM
bool battle_is_icedamage(LPCHARACTER pAttacker, LPCHARACTER pVictim)
{
    if (pAttacker && pAttacker->IsPC())
    {
        DWORD race = pAttacker->GetRaceNum();
        const DWORD tmp_dwNDRFlag = pVictim->GetNoDamageRaceFlag();
        if (tmp_dwNDRFlag &&
            (race < MAIN_RACE_MAX_NUM) &&
            (IS_SET(tmp_dwNDRFlag, 1<<race))
        )
        {
            return false;
        }
        const std::set<DWORD> & tmp_setNDAFlag = pVictim->GetNoDamageAffectFlag();
        if (tmp_setNDAFlag.size())
        {
            for (std::set<DWORD>::iterator it = tmp_setNDAFlag.begin(); it != tmp_setNDAFlag.end(); ++it)
            {
                if (!pAttacker->IsAffectFlag(*it))
                {
                    return false;
                }
            }
        }
    }
    return true;
}
#endif

This system was here :) I don´t know what doing this system :D
So how your advice?
Change this: bool battle_is_icedamage(LPCHARACTER pAttacker, LPCHARACTER pVictim)
at this : bool battle_is_icedamage if(victim->IsNPC())

Or some other advice? :)
 
#ifdef NEW_ICEDAMAGE_SYSTEM
if (!battle_is_icedamage(ch, victim))
return false;
#endif

comment this section

*/
#ifdef NEW_ICEDAMAGE_SYSTEM
if (!battle_is_icedamage(ch, victim))
return false;
#endif
*/

and rebuild your game
 
#ifdef NEW_ICEDAMAGE_SYSTEM
if (!battle_is_icedamage(ch, victim))
return false;
#endif

comment this section

*/
#ifdef NEW_ICEDAMAGE_SYSTEM
if (!battle_is_icedamage(ch, victim))
return false;
#endif
*/

and rebuild your game


I don´t know who wrote this code.
I don´t know what this system doing.
I do not want debug mode for me :)
 
Son düzenleme:

Şu an konuyu görüntüleyenler (Toplam : 0, Üye: 0, Misafir: 0)

Benzer konular

Cevaplar
6
Görüntüleme
170
Cevaplar
4
Görüntüleme
176
Cevaplar
6
Görüntüleme
163
Cevaplar
18
Görüntüleme
291
Geri
Üst