Jump to content

Help Simple function in C++


Recommended Posts

Hei everybody. I try to disable the polymorph in PVP. 

 

I make this in char_battle.cpp:

Spoiler

 

if (IsPolymorphed() == true && IsPC())

   RemoveAffect(AFFECT_POLYMORPH);

   ChatPacket(CHAT_TYPE_INFO, "Transformarea in modul PVP este interzisa!");

 

 

 

But this is work for all atack :)) (monster/player) So now if i atack a monster/player the polymorph effect are remove :)), i want only to players

Link to comment
Share on other sites

11 minutes ago, Tasho said:

if (IsPC() && IsPolymorphed() && pkVictim->IsPC())

 

Thx you for reply , already test this , is working but if i kill a mob (don`t remove the polymorph) but i receive in chat the message: " Transformarea in modul PVP este interzisa! " and i dont understand why :)))

Link to comment
Share on other sites

Is same code.

//char_skill.cpp
bool CHARACTER::UseSkill(DWORD dwVnum, LPCHARACTER pkVictim, bool bUseGrandMaster)
{
	if (IsPC() && IsPolymorphed() && pkVictim->IsPC())
	{
		RemoveAffect(AFFECT_POLYMORPH);
		ChatPacket(CHAT_TYPE_INFO, "Transformarea in modul PVP este interzisa!");
	}

	[..........................................]
}
  • Love 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 4

      Feeding game source to LLM

    2. 0

      Quest 6/7 Problem

    3. 5

      Effect weapons

    4. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    5. 3

      Crystal Metinstone

    6. 4

      Feeding game source to LLM

    7. 113

      Ulthar SF V2 (TMP4 Base)

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.