Jump to content
  • Announcements

    • Xmat

      Pravidlo pro postování v TTT

      Do sekce Tipy, triky, tutoriály nepatří žádné dotazy.   Postujte sem vaše návody, tipy a různé další věci jež uznáte za vhodné sdělit zdejšímu osazenstvu, ale veškeré dotazy směřujte do sekce Všeobecná diskuse.
    • Replik

      Seznam návodů a důležitých témat v této sekci

      Pro lepší přehlednost jsem vytvořil tento seznam, který vás, méně zkušené, lépe provede touto sekcí. Věřím, že zde najdete, co hledáte. Vypsané jsou návody, které jsou oficiálně uznané jako návody. Běžné diskuze, které neposkytují postupy a rady zvěřejněny nejsou.   Instalace vlastního MaNGOS Serveru Díky těmto návodům budete (měli by jste být) schopni vytvořit a následně spustit váš vlastní server. Nastavení je pro verze s i bez datadisku.   Instalace MaNGOS Serveru (bez datadisku TBC) - Autor Benny Instalace MaNGOS Serveru (s datadiskem TBC) - Autor Malfik Instalace MaNGOS Serveru v prostředí Linux - Autor charlie Instalace MaNGOS Serveru v prostředí Linux - Autor kupkoid   Chyby a jejich řešení při přihlašování k serveru - Autor Cybe   Zálohování uživatelských dat   Dávkový soubor (BAT soubor) pro vytvoření SQL záloh - Autor Replik   Kompilování - tvoření vlastních release (revizí)   Tvorba kompilací pro Win32 (MangoScript) - Autor bLuma   Ostatní - těžko zařaditelné, ale neznamená to, že nejsou dobré   VIP Systém - Autor charlie Tvorba Webových stránek pro MaNGOS - Autor zahuba Tvorba teleportačních NPC (MangoScript) - Autor Replik Registrační web (původně předělaná SPORA) Funkční pro Antrix i MaNGOS - Autor Replik Nastavení a spuštění Minimanager pro MaNGOS - Autor BlackMartin Nastavení MaNGOS Website - Autor Artorius   Samozřejmě jsou zde i jiné návody, ale tyto jsou nejvíce používané, proto věřím, že vám budou nápomocné. Tuto sekci budeme upravovat podle potřeby. Pokud by jste něco nenašli nebo si nevěděli rady, hledejte na fóru a teprve potom založte vlastní topik. Pokud nějaký autor vytvoří kvalitní návod a chtěl by ho zveřejnit i v tomto seznamu, doporučuji, aby mi napsal zprávu skrze PM.   Díky a přeji hezký den na WoWResource   Replik
    • Aristo

      Příspěvky tam, kde nemají co dělat

      Dodržujte zákaz přispívání do topiků s repaky pokud si to zakladatelé nepřejí!! Opakované psaní příspěvků bude trestáno warnem.
    • Aristo

      Používání spoilerů

      Poslední dobou má většina uživatelů fora zvláštní nutkání postovat extrémně dlouhé texty nebo kódy, které zabírají v nejedenom případu i 80% obsahu celé stránky a hodně tak zvedají nepřehlednost v topiku. Chtěl bych všechny uživatele požádat, aby při postování citací, jakýchkoliv kódů, errorů, atp... delších než 30 řádků používali funkci spoileru.   Funkci vyvoláte příkazem [spoiler] text [/spoiler]   Ukázka:  
Sign in to follow this  
Hkarta

[FUN] City Conquest

Recommended Posts

To je divný, protože script je součástí "game", která se mi zkompiluje v pohodě, každopádně okej zkusím to pohledat...

Share this post


Link to post
Share on other sites

Includuju buď

 

#include "../CityConquest/CityConquestMgr.h"

 

nebo

 

#include "CityConquestMrg.h"

 

obojí mi jde bo to mám v obojím nakopčený...

Share this post


Link to post
Share on other sites

jde o to, aby relativní umístění souborů odpovídalo. Funguje to klasicky, pokud pracuješ v souboru C:/Source/Game/Scripts/soubor.cpp a chceš soubor C:/Source/Game/soubor.h, napíšeš do soubor.cpp include "../soubor.h"

 

To že ti to funguje v jednom souboru, neznamená že ti to půjde v druhým, záleží na jejich reálném umístění na disku.

 

A pokud ti to hází ten error, tak to máš prostě bblě, tahle chyba vzniká, když ti chybí header.

Edited by Hkarta

Share this post


Link to post
Share on other sites

Zdravím, díky brsekerovi jsem to již zprovoznil, ale chci vědět jak to funguje? Konkrétně peníze? Jak to probíhá s goldama? Jak to je řešené? Děkuji mnohokrát.

  • Downvote 1

Share this post


Link to post
Share on other sites

Zdravím, díky brsekerovi jsem to již zprovoznil, ale chci vědět jak to funguje? Konkrétně peníze? Jak to probíhá s goldama? Jak to je řešené? Děkuji mnohokrát.

 

cože ? jaké goldy ? a jak to funguje je napsáno hned v prvním postu

Share this post


Link to post
Share on other sites

Omlouvám se, za obnovení tématu, ale už se s tím patlám 4 dny a pořád nějaký errory až jsem se zasekl u tohoto:

 

 

/media/korunni/tom/Trinity2/trinitycore/src/server/game/Scripting/ScriptMgr.cpp: In member function âvoid ScriptMgr::Initialize()â:
/media/korunni/tom/Trinity2/trinitycore/src/server/game/Scripting/ScriptMgr.cpp:186:10: error: request for member âoutStringâ in âACE_Singleton<TYPE, ACE_LOCK>::instance [with TYPE = Log, ACE_LOCK = ACE_Thread_Mutex]()â, which is of non-class type âLog*â
/media/korunni/tom/Trinity2/trinitycore/src/server/game/Scripting/ScriptMgr.cpp:187:5: error: âCITYConquestâ was not declared in this scope
[ 13%] Built target pch_Generate_worldserver
[ 14%] Built target collision
[ 14%] Built target authserver
make[2]: *** [src/server/game/CMakeFiles/game.dir/Scripting/ScriptMgr.cpp.o] Error 1
make[1]: *** [src/server/game/CMakeFiles/game.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 79%] Built target scripts
make: *** [all] Error 2

 

 

Omlouvám se, jestli je to nějaká pitomá chyba...vypadá to na chybu ve ScriptMgr.cpp ale mám vše v pořádku ne?

 

 

* You should have received a copy of the GNU General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "ScriptPCH.h"
#include "Config.h"
#include "DatabaseEnv.h"
#include "DBCStores.h"
#include "ObjectMgr.h"
#include "OutdoorPvPMgr.h"
#include "ScriptLoader.h"
#include "ScriptSystem.h"
#include "Transport.h"
#include "../CityConquest/CityConquestMgr.h"

 

 

 

Předem vám děkuji za odpověď...

Share this post


Link to post
Share on other sites

Ten include toho CityConquest máš blbě...Musí to být

 

Include "CityConquestMgr.h"

 

  • Upvote 1

Share this post


Link to post
Share on other sites

To je myslím zrovna jedno ne? Pokud odkazuje přímo na soubor nebo to dělát takhle.

Share this post


Link to post
Share on other sites

Nekecejte tu neco o includech a podivejte se na radky, na kterych je chyba - 186, 187 - tam uz include nejsou. Menil se zpusob prace se singletony a hkarta tam ma jeste ten stary, tusim, ze tam nekde na radku 186 najdes

sLog.outString...blablabla

a musis to nahradit za

sLog->outString...

A potom na radku 187 mas CITYConquest misto CityConquest - je to case sensitive.

  • Upvote 2

Share this post


Link to post
Share on other sites

Nekecejte tu neco o includech a podivejte se na radky, na kterych je chyba - 186, 187 - tam uz include nejsou. Menil se zpusob prace se singletony a hkarta tam ma jeste ten stary, tusim, ze tam nekde na radku 186 najdes

sLog.outString...blablabla

a musis to nahradit za

sLog->outString...

A potom na radku 187 mas CITYConquest misto CityConquest - je to case sensitive.

 

Tím to bylo, ale vyhodil mi error city_conquest_portal.cpp a je opravdu veliký..možná se to tu už řešilo, ale nevíte kde je problém prosím? Ale brseker měl pravdu..dávám +rep

 

Nový Error:

 

 

../game/libgame.a(ScriptMgr.cpp.o): In function `ScriptMgr::Initialize()':
ScriptMgr.cpp:(.text+0x6fd9): undefined reference to `CityConquest'
ScriptMgr.cpp:(.text+0x6fde): undefined reference to `CityConquestMgr::LoadCities()'
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipHello(Player*, Creature*)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x2e): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x38): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x66): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x90): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x16e): undefined reference to `CityConquest'
../scripts/libscripts.a(city_conquest_portal.cpp.o):city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x174): more undefined references to `CityConquest' follow
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2b6): undefined reference to `CityConquestMgr::StartSiege(int, int)'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2dc): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2e6): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x30e): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x330): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x3b8): undefined reference to `CityConquest'
../scripts/libscripts.a(city_conquest_portal.cpp.o):city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x3c8): more undefined references to `CityConquest' follow
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x457): undefined reference to `CityConquestMgr::CanStartSiege(int, int)'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5a7): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5ad): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5f2): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5f8): undefined reference to `CityConquest'
collect2: ld returned 1 exit status
make[2]: *** [src/server/worldserver/worldserver] Error 1
make[1]: *** [src/server/worldserver/CMakeFiles/worldserver.dir/all] Error 2
make: *** [all] Error 2

 

 

Share this post


Link to post
Share on other sites

Hkartuv script je uz zastaraly, dokonce je na stary ScriptSystem, mohl by ti jit ten Wolfuv. Kdyz nepujde, kdyztak ti ho upravim, ale urcite tam bude mene erroru, nez tady.

Share this post


Link to post
Share on other sites

Hkartuv script je uz zastaraly, dokonce je na stary ScriptSystem, mohl by ti jit ten Wolfuv. Kdyz nepujde, kdyztak ti ho upravim, ale urcite tam bude mene erroru, nez tady.

Já totiž používám ten Wolfůf script. Mám tam toto:

 

 

#include "ScriptPCH.h"
#include "../../game/CityConquest/CityConquestMgr.h"

#define START_OFFSET            2000
#define PORT_OFFSET             5000
#define GOSSIP_ACTION_MAIN      1000
#define GOSSIP_ACTION_SARTLIST  1003
#define GOSSIP_ACTION_PORTLIST  1001
#define GOSSIP_ACTION_CLOSE     1002

class city_conquest_portal : public CreatureScript
{
private:
   int GetActiveSieges(Player* pPlayer)
   {
       int side = 1;
       if(pPlayer->TeamForRace(pPlayer->getRace())==ALLIANCE)
           side = 0;
       Cities::iterator l;
       int i = 0;
       for (l = CityConquest.cities.begin(); l != CityConquest.cities.end(); ++l)
       {
           City *ct = *l;
           if (ct->controlled != side && ct->active == true)
           {
               i++;
           }
       }
       return i;
   }

   int GetActiveSiegesAll(Player* pPlayer)
   {
       Cities::iterator l;
       int i = 0;
       for (l = CityConquest.cities.begin(); l != CityConquest.cities.end(); ++l)
       {
           City *ct = *l;
           if (ct->active == true)
           {
               i++;
           }
       }
       return i;
   }

   void StartSiegeList(int beginAt, Player* pPlayer, Creature* pCreature)
   {
       Cities::iterator l;
       int side = 1;
       if(pPlayer->TeamForRace(pPlayer->getRace())==ALLIANCE)
           side = 0;

       int i = 0;
       int lastid = 0;
       for (l = CityConquest.cities.begin(); l != CityConquest.cities.end(); ++l)
       {
           City *ct = *l;
           if (ct->controlled != side && ct->active == false && ct->minlevel <= pPlayer->getLevel() && ct->maxlevel >= pPlayer->getLevel() && CityConquest.CanStartSiege(ct->id, side) && ct->id >= beginAt)
           {
               if (i < 8)
                   lastid = ct->id;
               if (i < 9)
               {
                   pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, ct->name, GOSSIP_SENDER_MAIN, START_OFFSET + ct->id);
                   i++;
               }
               else if (i == 9)
               {
                   pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Next >>", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_SARTLIST + lastid);
                   i++;
               }

           }
       }
       pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<< Back", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_MAIN);
       pPlayer->SEND_GOSSIP_MENU(1, pCreature->GetGUID());
   }

   void TeleportList( Player* pPlayer, Creature* pCreature)
   {
       Cities::iterator l;
       int side = 1;
       if(pPlayer->TeamForRace(pPlayer->getRace())==ALLIANCE)
           side = 0;

       for (l = CityConquest.cities.begin(); l != CityConquest.cities.end(); ++l)
       {
           City *ct = *l;
           if (ct->active == true)
           {
               char * nm;
               nm = new char[ct->name.size()+1];
               nm[ct->name.size()] = 0;
               memcpy(nm, ct->name.c_str(), ct->name.size());
               char msg[500];

               if (ct->controlled == side)
               {
                   sprintf(msg, "Defend: %s", nm);

                   pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, msg, GOSSIP_SENDER_MAIN, PORT_OFFSET + ct->id);
               }
               else
               {
                   sprintf(msg, "Attack: %s", nm);
                   pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, msg, GOSSIP_SENDER_MAIN, PORT_OFFSET + ct->id);
               }

           }
       }

       pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "<< Back", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_MAIN);
       pPlayer->SEND_GOSSIP_MENU(1, pCreature->GetGUID());
   }

   void MainMenu(Player* pPlayer, Creature* pCreature)
   {
       if (GetActiveSieges(pPlayer) < 5)
           pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "New Conquest", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_SARTLIST + 1);

       if (GetActiveSiegesAll(pPlayer) > 0)
           pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Aid in Conquest", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_PORTLIST);

       pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, "Bye", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_CLOSE);
       pPlayer->SEND_GOSSIP_MENU(1, pCreature->GetGUID());
   }

public:
   city_conquest_portal() : CreatureScript("city_conquest_portal") { }

   bool OnGossipHello(Player* pPlayer, Creature* pCreature)
   {
       MainMenu(pPlayer, pCreature);
       return true;
   }

   bool OnGossipSelect(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 action)
   {
       int id = 0;
       int side = 1;
           if(pPlayer->TeamForRace(pPlayer->getRace())==ALLIANCE)
               side = 0;

       if (action >= PORT_OFFSET)
       {
           id = action - PORT_OFFSET;
           Cities::iterator l;
           for (l = CityConquest.cities.begin(); l != CityConquest.cities.end(); ++l)
           {
               City *ct = *l;
               if (ct->id == id)
               {
                   if (ct->controlled == side)
                       pPlayer->TeleportTo(ct->port_defense->map, ct->port_defense->x, ct->port_defense->y, ct->port_defense->z, ct->port_defense->o, 0);
                   else
                       pPlayer->TeleportTo(ct->port_attack->map, ct->port_attack->x, ct->port_attack->y, ct->port_attack->z, ct->port_attack->o, 0);
                   pPlayer->CLOSE_GOSSIP_MENU();
               }
           }
       }
       else if (action >= START_OFFSET)
       {
           int side = 1;
           if(pPlayer->TeamForRace(pPlayer->getRace())==ALLIANCE)
               side = 0;
           id = action - START_OFFSET;
           CityConquest.StartSiege(id, side);
           MainMenu(pPlayer, pCreature);
       }
       else if (action >= GOSSIP_ACTION_SARTLIST)
       {
           id = action - GOSSIP_ACTION_SARTLIST;
           StartSiegeList(id, pPlayer, pCreature);
       }
       else if (action == GOSSIP_ACTION_CLOSE)
       {
           pPlayer->CLOSE_GOSSIP_MENU();
       }
       else if (action == GOSSIP_ACTION_PORTLIST)
       {
           TeleportList(pPlayer, pCreature);
       }
       else if (action == GOSSIP_ACTION_MAIN)
       {
           MainMenu(pPlayer, pCreature);
       }

       return true;
   }
};

void AddSC_city_conquest_portal()
{
   new city_conquest_portal();
}

 

 

 

Dokázal bys mi to upravit prosím? :unsure:

Share this post


Link to post
Share on other sites

Ja ho uz kompiloval, chyby tam byly, ale takovyhle ne, zkontroluj si cestu toho includu, jestli opravdu je spravne.

Share this post


Link to post
Share on other sites

Ja ho uz kompiloval, chyby tam byly, ale takovyhle ne, zkontroluj si cestu toho includu, jestli opravdu je spravne.

 

Includy jsem zkontroloval...všechno by mělo být správně...tak já už nevím :unsure:

Share this post


Link to post
Share on other sites

wolfův měl taky nějakou chybu. Ale když prolezeš topic, je tu jeden kterej je ozkoušenej a funkční na novej script system.

- scripty pro npc vem odsud http://www.wowresource.eu/index.php?app=core&module=attach&section=attach&attach_id=1618 (ale jen pro npc, v city conquest třídě je tam nějaké typo, které se mi nechce hledat ;) )

Edited by Hkarta

Share this post


Link to post
Share on other sites

wolfův měl taky nějakou chybu. Ale když prolezeš topic, je tu jeden kterej je ozkoušenej a funkční na novej script system.

- scripty pro npc vem odsud http://www.wowresource.eu/index.php?app=core&module=attach&section=attach&attach_id=1618 (ale jen pro npc, v city conquest třídě je tam nějaké typo, které se mi nechce hledat ;) )

 

Použil jsem to Hkarto...děkuju ti moc, ale pořád mi to hází tenhle error...jako by byla někde chyba v portalu :unsure:

 

 

 

../game/libgame.a(ScriptMgr.cpp.o): In function `ScriptMgr::Initialize()':
ScriptMgr.cpp:(.text+0x6fd9): undefined reference to `CityConquest'
ScriptMgr.cpp:(.text+0x6fde): undefined reference to `CityConquestMgr::LoadCities()'
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipHello(Player*, Creature*)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x2e): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x38): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x66): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x90): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x16e): undefined reference to `CityConquest'
../scripts/libscripts.a(city_conquest_portal.cpp.o):city_conquest_portal.cpp:(.text._ZN20city_conquest_portal13OnGossipHelloEP6PlayerP8Creature[city_conquest_portal::OnGossipHello(Player*, Creature*)]+0x174): more undefined references to `CityConquest' follow
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2b6): undefined reference to `CityConquestMgr::StartSiege(int, int)'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2dc): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x2e6): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x30e): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x330): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x3b8): undefined reference to `CityConquest'
../scripts/libscripts.a(city_conquest_portal.cpp.o):city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x3c8): more undefined references to `CityConquest' follow
../scripts/libscripts.a(city_conquest_portal.cpp.o): In function `city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)':
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x457): undefined reference to `CityConquestMgr::CanStartSiege(int, int)'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5a7): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5ad): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5f2): undefined reference to `CityConquest'
city_conquest_portal.cpp:(.text._ZN20city_conquest_portal14OnGossipSelectEP6PlayerP8Creaturejj[city_conquest_portal::OnGossipSelect(Player*, Creature*, unsigned int, unsigned int)]+0x5f8): undefined reference to `CityConquest'
collect2: ld returned 1 exit status
make[2]: *** [src/server/worldserver/worldserver] Error 1
make[1]: *** [src/server/worldserver/CMakeFiles/worldserver.dir/all] Error 2
make: *** [all] Error 2

 

 

 

Omlouvám se vám, za oživení tohoto tématu, doufám, že se nebudete zlobit :(

Share this post


Link to post
Share on other sites

Prvni pohled napovida - spatne includy - nekde si ho vynechal.

 

Jojo, ale jak koukám na ty includy, tak se zdá být vše v pořádku...

SriptMgr.cpp

 

 

#include "../CityConquest/CityConquestMgr.h"

void ScriptMgr::Initialize()
{
   uint32 oldMSTime = getMSTime();

   LoadDatabase();

   sLog->outString("Loading C++ scripts");
   sLog->outString("Initializing City Conquest Engine (c) Hkarta");
   CityConquest.LoadCities();

   FillSpellSummary();
   AddScripts();

   sLog->outString(">> Loaded %u C++ scripts in %u ms", GetScriptCount(), GetMSTimeDiffToNow(oldMSTime));
   sLog->outString();
}

 

 

 

Nebo ne? :unsure:

Share this post


Link to post
Share on other sites

Druhý pohled křičí - špatně navrženej singleton.

 

EDIT: Vím asi kde je bota, možná bych to trošku upravil. Můžu něco zkusit. Mám volnou celou noc. :innocent:

Edited by Wolf Officious

Share this post


Link to post
Share on other sites

Druhý pohled křičí - špatně navrženej singleton.

 

EDIT: Vím asi kde je bota, možná bych to trošku upravil. Můžu něco zkusit. Mám volnou celou noc. :innocent:

 

Nevím co to je singleton :D ale pokud bys měl čas se na to mrknout...byl bych ti opravdu moc vděčný ;) děkuju ti Wolfe :nw2_guitar:

 

EDIT: Core revize: 2703c6a38be4 (wotlk)

Edited by Glorius

Share this post


Link to post
Share on other sites

Singleton (česky jedináček nebo také unikát) je název pro návrhový vzor, používaný při programování. Využijeme ho při řešení problému, kdy je potřeba, aby v celém programu běžela pouze jedna instance třídy. Tento návrhový vzor zabezpečí, že třída bude mít jedinou instanci a poskytne k ní globální přístupový bod.

 

Zdroj: http://cs.wikipedia.org/wiki/Singleton

 

Teprve nedávno jsem se to učil. Jakou že to máš vlastně revizi? Kdyžtak jenom edituj minulej post, to bude stačit, ať to tu neni hned zakydaný.

Edited by Wolf Officious

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×