Jump to content

darkjoy2k2

Members
  • Posts

    7
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by darkjoy2k2

  1. the normal bank is show with "sendshowbank( GUID). what call is the guildbank shown with?
  2. well, sorry but i must disagree... the MANGOS loads the DATABASE... if i name a item in the database a "Stupid faggot" the game item is displayed as it! the client not directly accesse´s the database... so there must be a possible way, but i already realize that its easier to simply write a new gameobject_template where i can set the name as i want!
  3. the thing with the displayid was an example... modiefied the code but dont get any effect in the client... // overwrite WorldObject function for proper name localization const char* GameObject::GetNameForLocaleIdx(int32 loc_idx) const { if (loc_idx >= 0) { GameObjectLocale const *cl = sObjectMgr.GetGameObjectLocale(GetEntry()); if (cl) { if (cl->Name.size() > (size_t)loc_idx && !cl->Name[loc_idx].empty()) return "schwanz"; // return cl->Name[loc_idx].c_str(); } } return "schwanz"; // return GetName(); } same goes for Creature:GetNameForLocaleIdx but i dont see any effect ingame... thats the only 2 funcs where GetNameForLocaleIdx is used
  4. Can someone show me where the point is, where the name of gameobjects are given to the client? Looking for it but cant figure it out... guess it goes with GetNameForLocaleIdx!? tried for fun gameobject.cpp line 142 / SetUInt32Value(GAMEOBJECT_DISPLAYID, goinfo->displayId); SetUInt32Value(GAMEOBJECT_DISPLAYID, 499); now every gameobject looks like a grave... but how should it look for the displayed name? target: i added data to gameobject who shows the one that created it... i have a dead player that drops a chest with the image of a gravestone and the Name "Grave". i want to bring in checks, that adds the creators name to the displayed name when the special gameobject is at hand... (e.g. PLAYERNAME+"´s "+GAMEOBJECT_NAME" / Peter´s Grave
  5. Hi there! I took some functions from Chathandler and built it in player.cpp so a chest with displayid of a grave is spawned... but how can i manipulate that spawned gameobject afterwards? bool Player::SpawnGameObject(uint32 id, uint32 spawntimeSecs) { // number or [name] Shift-click form |color|Hgameobject_entry:go_id|h[name]|h|r if(!id) return false; const GameObjectInfo *gInfo = ObjectMgr::GetGameObjectInfo(id); if (!gInfo) { return false; } if (gInfo->displayId && !sGameObjectDisplayInfoStore.LookupEntry(gInfo->displayId)) { // report to DB errors log as in loading case sLog.outErrorDb("Gameobject (Entry %u GoType: %u) have invalid displayId (%u), not spawned.",id, gInfo->type, gInfo->displayId); return false; } Player *chr = this; float x = float(chr->GetPositionX()); float y = float(chr->GetPositionY()); float z = float(chr->GetPositionZ()); float o = float(chr->GetOrientation()); Map *map = chr->GetMap(); GameObject* pGameObj = new GameObject; uint32 db_lowGUID = sObjectMgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT); if(!pGameObj->Create(db_lowGUID, gInfo->id, map, chr->GetPhaseMaskForSpawn(), x, y, z, o, 0.0f, 0.0f, 0.0f, 0.0f, 0, GO_STATE_READY)) { delete pGameObj; return false; } if( spawntimeSecs ) { uint32 value = atoi((char*)spawntimeSecs); pGameObj->SetRespawnTime(value); //sLog.outDebug("*** spawntimeSecs: %d", value); } pGameObj->SetName("Testing!!!"); // <<<< THE SPOT I MEAN !!! // fill the gameobject data and save to the db pGameObj->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()),chr->GetPhaseMaskForSpawn()); // this will generate a new guid if the object is in an instance if(!pGameObj->LoadFromDB(db_lowGUID, map)) { delete pGameObj; return false; } map->Add(pGameObj); // TODO: is it really necessary to add both the real and DB table guid here ? sObjectMgr.AddGameobjectToGrid(db_lowGUID, sObjectMgr.GetGOData(db_lowGUID)); return true; } It compiles well... Function is working well to... pGameObj->SetName("Testing!!!"); // <<<< THE SPOT I MEAN !!! doesnt take effect, the spawned object still has the name from gameobject_template... P.s.: Guess i got it... i have to modify the sql-tables every time !?
  6. player.cpp void Player::ResurectUsingRequestData() { /// Teleport before resurrecting by player, otherwise the player might get attacked from creatures near his corpse if(IS_PLAYER_GUID(m_resurrectGUID)) TeleportTo(m_resurrectMap, m_resurrectX, m_resurrectY, m_resurrectZ, GetOrientation()); //we cannot resurrect player when we triggered far teleport //player will be resurrected upon teleportation if(IsBeingTeleportedFar()) { ScheduleDelayedOperation(DELAYED_RESURRECT_PLAYER); return; } ResurrectPlayer(0.0f,false); if(GetMaxHealth() > m_resurrectHealth) SetHealth( m_resurrectHealth ); else SetHealth( GetMaxHealth() ); if(GetMaxPower(POWER_MANA) > m_resurrectMana) SetPower(POWER_MANA, m_resurrectMana ); else SetPower(POWER_MANA, GetMaxPower(POWER_MANA) ); SetPower(POWER_RAGE, 0 ); SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY) ); // peter loot [color="Red"] Corpse *bones = sObjectAccessor.ConvertCorpseForPlayer(GetGUID(),true); bones->SetFlag(CORPSE_FIELD_DYNAMIC_FLAGS, CORPSE_DYNFLAG_LOOTABLE); bones->loot.gold = getLevel(); bones->lootRecipient = this; SendLoot(bones->GetGUID(), LOOT_INSIGNIA); [/color] SpawnCorpseBones(); sLog.outDebug("loot player test", this); } id like to make players drop always some items and gold, not just in pvp, for test purposes lootable from both fractions what i added compiled but showed now function ingame... is the code wrong? or just in the wrong place?
  7. Id like to change the way resurrection works on my server. you die, you let ghost free, you arent teleported to graveyard, must walk to an spirit healer to revive... i commented the teleportto in RepopAtGraveyard() now i have to remove the ability from corpse to allow resurrecting the player if he´s near... how does mangos tell the client "yes you now can resurrect if u want" ? not sure if its in player.cpp, or do i have to look at the corpse object? in corpse.h is a hint: // Value equal client resurrection dialog show radius. #define CORPSE_RECLAIM_RADIUS 39 but it is only used in mischandler.cpp line 639 if (!corpse->IsWithinDistInMap(GetPlayer(), CORPSE_RECLAIM_RADIUS, true)) return; setting CORPSE_RECLAIM_RADIUS to -1 works well! only issue is that it still brings up the resurrection dialogue ingame but nothing happens as u press the button! but i guess changing the popup of this dialouge is client side, which modding isnt supported here right?
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use