Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C++] Vörös és Kék ital tiltása adott mapindexen
#1
Thumbs Up 
Megírom ezt is, mondjuk nem bonyolult már az Elixírek mintájára beilleszteni a megfelelő kód részletet a case USE_POTION részbe.  Rolleyes


Ezt a részt:
Code:
                    case USE_POTION:
                        if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
                        {
                            if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit") > 0)
                            {
                                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ĂŔ忡Ľ­ »çżëÇĎ˝Ç Ľö ľř˝Ŕ´Ď´Ů."));
                                return false;
                            }
                        
                            switch (item->GetVnum())
                            {
                                case 27001 :
                                case 27002 :
                                case 27003 :
                                case 27004 :
                                case 27005 :
                                case 27006 :
                                    if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit_count") < 10000)
                                    {
                                        if (m_nPotionLimit <= 0)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»çżë Á¦ÇŃ·®Ŕ» ĂĘ°úÇĎż´˝Ŕ´Ď´Ů."));
                                            return false;
                                        }
                                    }
                                    break;

                                default :
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ĂŔ忡Ľ­ »çżëÇĎ˝Ç Ľö ľř˝Ŕ´Ď´Ů."));
                                    return false;
                            }
                        }


Lecseréled erre:

Code:
                    case USE_POTION:
                        if (CArenaManager::instance().IsArenaMap(GetMapIndex()) == true)
                        {
                            if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit") > 0)
                            {
                                ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ĂŔ忡Ľ­ »çżëÇĎ˝Ç Ľö ľř˝Ŕ´Ď´Ů."));
                                return false;
                            }
                            
                                    if (GetMapIndex() == 113 || GetMapIndex() == 112) /////elixírek tiltása
                                    { ////OX
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("potik tiltas"));
                                            return false;
                                    }
                                    ////////////////////////////////////////////
                        
                            switch (item->GetVnum())
                            {
                                case 27001 :
                                case 27002 :
                                case 27003 :
                                case 27004 :
                                case 27005 :
                                case 27006 :
                                    if (quest::CQuestManager::instance().GetEventFlag("arena_potion_limit_count") < 10000)
                                    {
                                        if (m_nPotionLimit <= 0)
                                        {
                                            ChatPacket(CHAT_TYPE_INFO, LC_TEXT("»çżë Á¦ÇŃ·®Ŕ» ĂĘ°úÇĎż´˝Ŕ´Ď´Ů."));
                                            return false;
                                        }
                                    }
                                    break;

                                default :
                                    ChatPacket(CHAT_TYPE_INFO, LC_TEXT("´ë·ĂŔ忡Ľ­ »çżëÇĎ˝Ç Ľö ľř˝Ŕ´Ď´Ů."));
                                    return false;
                            }
                        }



locale_string.txt:

Code:
"potik tiltasa";
"Az italokat nem használhatod ezen a területen!";


Üdv, Pisti95
[Image: 1453876818-b8928becdb9a3058b7c9ff22ccc5caf6.jpeg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)