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  
Paran

[Vyřešeno][C++]Declarace

Recommended Posts

Zdravím,

 

vůbec,ale vůbec nechápu tuhle chybu,asi jsem slepý,ale nevidím to.

Já si myslím,že všechno je declarované a v pořádku,ale console kompilace píše : "GetGuildHouseMap was not declared in this scope 85line + GetGuildHouseLocation was not declared in this scope 119line".

 

Díky moc za pomoc,už si nevím rady.

 

Fáze 1. ! - Vyřešena

 

Script NPC

 

/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/
#include "ScriptPCH.h"
#include "ObjectMgr.h"
#include "GuildMgr.h"
#include "ScriptMgr.h"
#include "World.h"
#include "Guild.h"
#include "../Custom/GuildHouse.h"

#include "OutdoorPvPMgr.h"

#define MSG_GOSSIP_MARRIED       "Vai in viaggio di nozze"
#define MSG_GOSSIP_TELE          "Teletrasportami Alla sede di gilda"
#define MSG_GOSSIP_BUY           "Crea Sede di gilda"
#define MSG_GOSSIP_SELL          "Vendi sede di gilda"
#define MSG_GOSSIP_ADD           "Compra aggiunte per la sede di Gilda"
#define MSG_GOSSIP_NEXTPAGE      "Successivo -->"
#define MSG_GOSSIP_CLOSE         "Chiudi"
#define MSG_INCOMBAT             "Sei in combat!"
#define MSG_NOGUILDHOUSE         "La tua gilda non possiede una casa!"
#define MSG_NOFREEGH             "Purtroppo tutte le case sono occupate oppure non hai abbastanza membri per acquistarne una di quelle libere."
#define MSG_NOADDGH              "Non hai altre GHAdd da comprare"
#define MSG_ALREADYHAVEGH        "La tua gilda possiede giŕ una sede."
#define MSG_ALREADYHAVEGHADD     "La tua gilda possiede giŕ questo GHAdd."
#define MSG_NOTENOUGHMONEY       "Non hai abbastanza soldi per acquistare. Hai bisogno di %u gold."
#define MSG_NOTENOUGHGUILDMEMBERS "Non hai abbastanza membri in gilda per acquistare la casa. Hai bisogno di %u membri."
#define MSG_GHOCCUPIED           "Sfortunatamente questa casa č giŕ occupata."
#define MSG_CONGRATULATIONS      "Congratulazioni! La sede č stata creata."
#define MSG_SOLD                 "La gilda č stata venduta. ??? ???? %u ??????."
#define MSG_NOTINGUILD           "Non sei in nessuna gilda."
#define MSG_CONFIRM_BUY          "Conferma l'acquisto"
#define MSG_NEGATE_BUY           "Nega l'acquisto"

#define CODE_SELL                "SELL"
#define MSG_CODEBOX_SELL         "Scrivi \"" CODE_SELL "\" in maiuscolo per vendere la casa, dopo premi accept."

#define ACTION_TELE               1001
#define ACTION_CLOSE              1005

#define ICON_GOSSIP_BALOON       0
#define ICON_GOSSIP_WING         2
#define ICON_GOSSIP_BOOK         3
#define ICON_GOSSIP_WHEEL1       4
#define ICON_GOSSIP_WHEEL2       5
#define ICON_GOSSIP_GOLD         6
#define ICON_GOSSIP_BALOONDOTS   7
#define ICON_GOSSIP_TABARD       8
#define ICON_GOSSIP_XSWORDS      9

#define GOSSIP_COUNT_MAX         7

class npc_guild_master : public CreatureScript
{
   public:
       npc_guild_master() : CreatureScript("npc_guild_master") { }

   bool isPlayerGuildLeader(Player *player)
   {
       return ((player->GetRank() == 0) && (player->GetGuildId() != 0));
   };

   bool isPlayerHasGuildhouse(Player *player, Creature *_creature, bool whisper = false)
   {
       if (!player || !_creature)
           return false;

       uint32 map;

       if (GHobj.GetGuildHouseMap(player->GetGuildId(), map))
       {
           if (whisper)
           {
               //whisper to player "already have etc..."
               char msg[200];
               sprintf(msg, MSG_ALREADYHAVEGH);
               _creature->MonsterWhisper(msg, player->GetGUID());
           }        
           return true;
       }
       else
           return false;
   };

   void teleportPlayerToGuildHouse(Player *player, Creature *_creature)
   {
       if (player->GetGuildId() == 0)
       {
           //if player has no guild
           _creature->MonsterWhisper(MSG_NOTINGUILD, player->GetGUID());
           return;
       }

       if (!player->getAttackers().empty())
       {
           //if player in combat
           _creature->MonsterSay(MSG_INCOMBAT, LANG_UNIVERSAL, 0);
           return;
       }

       float x, y, z, o;
       uint32 map;

       if (GHobj.GetGuildHouseLocation(player->GetGuildId(), x, y, z, o, map))
       {
           //teleport player to the specified location
           player->TeleportTo(map, x, y, z, o);
       }
       else
           _creature->MonsterWhisper(MSG_NOGUILDHOUSE, player->GetGUID());
   };

   bool OnGossipHello(Player *player, Creature *_creature)
   {
       if (!player)
           return true;

       player->ADD_GOSSIP_ITEM(ICON_GOSSIP_BALOON, MSG_GOSSIP_TELE, GOSSIP_SENDER_MAIN, ACTION_TELE);        
       player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());
       return true;
   };


   bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 action )
   {
       player->PlayerTalkClass->ClearMenus();

       if (sender != GOSSIP_SENDER_MAIN)
           return false;

       switch (action)
       {
           case ACTION_TELE:
               //teleport player to GH
               player->CLOSE_GOSSIP_MENU();
               teleportPlayerToGuildHouse(player, _creature);
               break;
           case ACTION_CLOSE:
               player->CLOSE_GOSSIP_MENU();
               break;
           default:                    
               break;
       }

       return true;
   };
};

void AddSC_npc_guild_master()
{
   new npc_guild_master();
}

 

 

 

Script GuildHouse.h

 

/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/**
*
* @File : GuildHouse.h
*
* @Authors : Lazzalf
*
* @Date : 31/03/2010
*
* @Version : 0.1
*
**/

#ifndef SC_GUILDHOUSE_SYSTEM
#define SC_GUILDHOUSE_SYSTEM

#include "Common.h"

class GuildHouse;
class GuildHouseObject;


enum GuildAdd_Type
{
   NPC_BASIC        = 0x00000001,
   NPC_GUARD        = 0x00000002,
   NPC_BUFFMAN      = 0x00000004,
   NPC_TELE         = 0x00000008,
};
#define NPC_MAX 32

enum GH_Item_type
{
   CREATURE        = 0,
   OBJECT          = 1,
};

class GuildHouse
{
   public: 
       GuildHouse(uint32 guild_id = 0, uint32 guild_add = 0);
       GuildHouse(uint32 guildID, uint32 id, float x, float y, float z, uint32 map, uint32 member, uint32 cost, uint32 add);

       uint32        GuildId;      
       uint32        Id;    
       uint32        GuildHouse_Add;
       float         m_X, m_Y, m_Z, m_orient;
       uint32        m_map;
       uint32        min_member;
       uint32        price;

};

typedef std::vector<uint32> gh_Item_Vector;
class GH_Item
{    
  public:
     gh_Item_Vector AddCre;
     gh_Item_Vector AddGO;
     bool spawned;
     GH_Item()
     {
         AddCre.clear();
         AddGO.clear();
         spawned = true;
     }
};

typedef UNORDERED_MAP<uint32, GuildHouse> GuildHouseMap;

class GuildHouseObject
{    
   public:
   GuildHouseMap GH_map;
   GuildHouseObject();


   bool CheckGuildID(uint32 guild_id);
   bool CheckGuildHouse(uint32 guild_id);
   bool GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map);
   bool GetGuildHouseMap(uint32 guild_id, uint32 &map);  
   void ControlGuildHouse();
   void LoadGuildHouse();
};

extern GuildHouseObject GHobj;

#endif

 

 

 

Script GuildHouse.cpp

 

/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/**
*
* @File : GuildHouse.cpp
*
* @Authors : Lazzalf
*
* @Date : 31/03/2010
*
* @Version : 0.1
*
**/

#include "GuildHouse.h"
#include "ObjectMgr.h"
#include "GuildMgr.h"
#include "Guild.h"
#include "ObjectAccessor.h"
#include "MapManager.h"

GuildHouseObject::GuildHouseObject()
{
   GH_map.clear();
}

bool GuildHouseObject::CheckGuildID(uint32 guild_id)
{
   if (!guild_id)
       return false;

   Guild* guild = sGuildMgr->GetGuildById(guild_id);  

   if (!guild_id)
   {
       sLog->outError("The guild %u not found", guild_id);
       return false;
   }
   return true;
}

bool GuildHouseObject::CheckGuildHouse(uint32 guild_id)
{
   GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
   if (itr == GH_map.end()) 
       return false;
   return true;
}

bool GuildHouseObject::GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map)
{
   GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
   if (itr == GH_map.end()) 
   return false;
   x = itr->second.m_X;
   y = itr->second.m_Y;
   z = itr->second.m_Z;
   o = itr->second.m_orient;
   map = itr->second.m_map;
   return true;
}

bool GuildHouseObject::GetGuildHouseMap(uint32 guild_id, uint32 &map)
{
   GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
   if (itr == GH_map.end()) 
       return false;
   map = itr->second.m_map;
   return true;
}   

void GuildHouseObject::LoadGuildHouse()
{
   GH_map.clear();
   QueryResult result = WorldDatabase.Query("SELECT `id`,`guildId`,`x`,`y`,`z`,`map`,`minguildsize`,`price` FROM guildhouses ORDER BY guildId ASC");

   if (!result)
   {
       sLog->outString("");
       sLog->outErrorDb(">> Loaded 0 guild house.");
       return;
   }

   do
   {
       Field *fields = result->Fetch();

       uint32 id = fields[0].GetUInt32();
       uint32 guildID = fields[1].GetUInt32();
       float x   = fields[2].GetFloat();
       float y   = fields[3].GetFloat();
       float z   = fields[4].GetFloat();
       uint32 map = fields[5].GetUInt32();
       uint32 min_member = fields[6].GetUInt32();
       uint32 cost = fields[7].GetUInt32();
       uint32 add = 1;

   } while (result->NextRow());

   sLog->outString();
   sLog->outString(">> Loaded %u GuildHouse", GH_map.size() );
}

GuildHouse::GuildHouse(uint32 guild_id, uint32 guild_add)
{
   GuildId = guild_id;    
   GuildHouse_Add = guild_add;
   Id = 0;
   m_X = 0;
   m_Y = 0;  
   m_Z = 0;
   m_orient = 0;
   m_map = 0;
   min_member = 0;
   price = 0;
}

GuildHouse::GuildHouse(uint32 newGuildId, uint32 newId, float x, float y, float z, uint32 map, uint32 member, uint32 cost, uint32 add)
{
   GuildId = newGuildId;
   Id = newId;
   m_X = x;
   m_Y = y;  
   m_Z = z;
   m_map = map;
   min_member = member;
   price = cost;
   m_orient = 0;
   GuildHouse_Add = add;
}

void GuildHouseObject::ControlGuildHouse()
{
   for (GuildHouseMap::iterator itr = GH_map.begin(); itr != GH_map.end(); itr++)
   {
       if (Guild* pGuild = sGuildMgr->GetGuildById((*itr).first))
           if (pGuild->GetMemberSize() < (*itr).second.min_member)
           {                    
               SQLTransaction trans = CharacterDatabase.BeginTransaction();
               pGuild->ModifyBankMoney(trans, (*itr).second.price * 75000, true);
               CharacterDatabase.CommitTransaction(trans);
           }           
   }
}

 

 

Fáze 2. !

EDITED:// Přidány fotky + upraveny scripty !

Už jsem se dostal k tomuto: http://imageshack.us/f/689/kompilace.png/

Edited by Paran

Share this post


Link to post
Share on other sites

Ten skript bych vyhodil, je starý a očividně nedodělaný. Pravděpodobně jediné co bude fungovat je port do GH. K tvému problému, skript někde musí vytvořit globální instanci třídy GuildHouseObject, pravděpodobně bylo napsáno v tom tématu, kde jsi to sebral, kam se měl dopsat řádek "GuildHouseObject GHobj;". Nouzově bude stačit, když to napíšeš do GuildHouse.cpp pod řádky #include.

  • Upvote 1

Share this post


Link to post
Share on other sites

bLuma: ono to mělo více funkcí ,ale to jsem promazal,stačí mi pouze Teleport do GH :) ,ok zkusím.

 

Jinak,jak je tam extern GuildHousablablba GHobj ,tak to je už takhle od originálu.

 

Hlavička GuildHouse.cpp

#include "ObjectAccessor.h"
#include "MapManager.h"

GuildHouseObject GHobj;

GuildHouseObject::GuildHouseObject()
{
   GH_map.clear();
}

 

Porád chyba undefined referenced GHobj

Edited by Paran

Share this post


Link to post
Share on other sites

To s extern jsi tam nechal? Dej rebuild all a pak pošli kompletní build log.

 

 

Ano nechal jsem to tam,mám to smazat ? Celý build.log ti nepošlu mám Linux Console,stejně error je jen na konci ,ty CPP soubory při kompilaci jsou bez erroru.

 

EDIT://

Na linuxech Builg.log nemám :).

 

EDIT2://

Nechal jsem to tam a dávám completní rebuild core :)

 

EDIT3://

bLuma: nepůjdem to řešit třeba na IRC ? http://webchat.quakenet.org | Channel wowresource

Edited by Paran

Share this post


Link to post
Share on other sites

Nemazat

 

Ad 1 tak se nauč pracovat s konzolí a přesměruj si výstupy do souboru (program > build.log 2>&1).

Ad 3 když něco navrhuješ, bylo by vhodné, aby jsi tam byl a nemusel jsem na tebe čekat...

Share this post


Link to post
Share on other sites

Vyřešeno ! Obnovuji topic Last Phase ! :)

 

BUMP C++ Scripts

 

Funkce

//TADY NEVIM JAK TO NASTAVIT ,ABY TO PORTOVALO DO GH URCITE guildID ,kterou si to selectne ....

   void TeleToGH(Player *player, Creature *_creature)
   {
       if (GHobj.GetGuildHouseLocation(player->GetGuildId(), x, y, z, o, map))
       {
           //Teleport to specified GH for Guild
           player->TeleportTo(map, x, y, z, o);
       }
       else
           _creature->MonsterWhisper("Tvoje guilda nema GuildHouse!", player->GetGUID());
   }

//TADY NEVIM JAK TO NASTAVIT ,ABY TO PORTOVALO DO GH URCITE guildID ,kterou si to selectne ....
//END

 

 

GH.cpp
GuildHouseObject GHobj;

GuildHouseObject::GuildHouseObject()
{
   GH_map.clear();
}

bool GuildHouseObject::GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map)
{
   GuildHouseMap::const_iterator itr = GH_map.find(guild_id);
   if (itr == GH_map.end())
   return false;
   x = itr->second.m_X;
   y = itr->second.m_Y;
   z = itr->second.m_Z;
   o = itr->second.m_orient;
   map = itr->second.m_map;
   return true;
}

void GuildHouseObject::LoadGuildHouse()
{
   uint32 oldMSTime = getMSTime();

   GH_map.clear();
   QueryResult result = WorldDatabase.Query("SELECT id, guildId, x, y, z, o, map FROM guildhouses ORDER BY guildId");


   if (!result)
   {
       sLog->outString(">> Loaded 0 guild house. DB table `guildhouses` is empty.");
       sLog->outString();
       return;
   }

   uint32 pocet = 0;
   do
   {  
       Field *fields = result->Fetch();
       TeleportGHLoc thl;

       thl.id = fields[0].GetUInt32();
       thl.guildId = fields[1].GetUInt32();
       thl.x   = fields[2].GetFloat();
       thl.y   = fields[3].GetFloat();
       thl.z   = fields[4].GetFloat();
       thl.o   = fields[5].GetFloat();
       thl.map = fields[6].GetUInt32();

       ++pocet;
  }
  while (result->NextRow());

   sLog->outString();
   sLog->outString(">> Loaded %u GuildHouse in %u ms", pocet, GetMSTimeDiffToNow(oldMSTime));
}

void LoadGuildHouseSystem()
{
   GHobj.LoadGuildHouse();
}

 

 

GH.h

 

GH.h

/*
* Copyright (C) 2009-2010 Trilogy <http://www.wowtrilogy.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

/**
*
* @File : GuildHouse.h
*
* @Authors : Lazzalf
*
* @Date : 31/03/2010
*
* @Version : 0.1
*
**/

#ifndef SC_GUILDHOUSE_SYSTEM
#define SC_GUILDHOUSE_SYSTEM

#include "Common.h"

class GuildHouse;
class GuildHouseObject;
class GuildHouseTele;


enum GuildAdd_Type
{
   NPC_BASIC        = 0x00000001,
   NPC_GUARD        = 0x00000002,
   NPC_BUFFMAN      = 0x00000004,
   NPC_TELE         = 0x00000008,
};
#define NPC_MAX 32

enum GH_Item_type
{
   CREATURE        = 0,
   OBJECT          = 1,
};

struct TeleportGHLoc
{
   uint32 id;
   uint32 guildId;
   float x;
   float y;
   float z;
   float o;
   uint32 map;  
};

class GuildHouse
{
   public:

       uint32        GuildId;      
       uint32        Id;    
       uint32        GuildHouse_Add;
       float         m_X, m_Y, m_Z, m_orient;
       uint32        m_map;
       uint32        min_member;
       uint32        price;

};

typedef UNORDERED_MAP<uint32, GuildHouse> GuildHouseMap;

class GuildHouseObject
{    
   public:
   GuildHouseMap GH_map;
   GuildHouseObject();

   bool GetGuildHouseLocation(uint32 guild_id, float &x, float &y, float &z, float &o, uint32 &map);
   void LoadGuildHouse();
};

void LoadGuildHouseSystem();
extern GuildHouseObject GHobj;

#endif

 

Edited by Paran

Share this post


Link to post
Share on other sites

bool GuildHouseObject::GetGuildHouseLocation - nějak nevidím smysl téhle funkce. Přepiš si ji tak, aby ti vracela pointer na GH, s tím že jako parametr do ní pošleš id guildy hráče - víc nepotřebuješ. A přes dotyčnej pointer si už pak vytáhneš souřadnice gh.

 

Pokud chceš do gh guildy kterou si hráč sám vybere, dělá se to přes gossip, kde vypíšeš všechny gh, jako action dáš např 1000 + gh_id a danou akci si pak zpracuješ: if (action > 1000) int guildhouseid = action - 1000; => znáš idčko který si vybral a odportuješ ho do patřičného gh.

 

edit: Tak už vidím smysl, ono to jako parametr žere adresu těch proměnejch a rovnou je to mění. V tom případě si prvního odstavce nevšímej a pokračuj druhým. :)

Edited by Hkarta
  • Upvote 1

Share this post


Link to post
Share on other sites

Jo,díky moc ,hned mě napadla myšlenka,díky tobě,jak to udělám :) +rep

Edited by Paran

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  

×