Jump to content

lillecarl

Members
  • Posts

    893
  • Joined

  • Last visited

  • Donations

    0.00 GBP 

Everything posted by lillecarl

  1. Then you have to override the dbc values inside the core instead =)
  2. No problem! Actually i think that you did try to make a uint32 value containing "NONE", "ALLIANCE" or "HORDE", maby if you put it into a string it would have worked to compare the variables, because as far as i know you can pus whatever possible data into a string ^^, Anyways, here is wikipedias explanation of the datatype enum and to e honest, i didnt understand everything there! http://en.wikipedia.org/wiki/Enumerated_type
  3. This should do it bool ChatHandler::HandleGonameCommand(char* args) { Player* target; ObjectGuid target_guid; std::string target_name; if (!ExtractPlayerTarget(&args, &target, &target_guid, &target_name)) return false; Player* _player = m_session->GetPlayer(); if (target == _player || target_guid == _player->GetObjectGuid()) { SendSysMessage(LANG_CANT_TELEPORT_SELF); SetSentErrorMessage(true); return false; } if (target) { if (target->GetTeam() != _player->GetTeam()) return false; // check online security if (HasLowerSecurity(target)) return false; std::string chrNameLink = playerLink(target_name); Map* cMap = target->GetMap(); if (cMap->IsBattleGroundOrArena()) { // only allow if gm mode is on if (!_player->isGameMaster()) { PSendSysMessage(LANG_CANNOT_GO_TO_BG_GM,chrNameLink.c_str()); SetSentErrorMessage(true); return false; } // if both players are in different bgs else if (_player->GetBattleGroundId() && _player->GetBattleGroundId() != target->GetBattleGroundId()) { PSendSysMessage(LANG_CANNOT_GO_TO_BG_FROM_BG,chrNameLink.c_str()); SetSentErrorMessage(true); return false; } // all's well, set bg id // when porting out from the bg, it will be reset to 0 _player->SetBattleGroundId(target->GetBattleGroundId(), target->GetBattleGroundTypeId()); // remember current position as entry point for return at bg end teleportation if (!_player->GetMap()->IsBattleGroundOrArena()) _player->SetBattleGroundEntryPoint(); } else if(cMap->IsDungeon()) { // we have to go to instance, and can go to player only if: // 1) we are in his group (either as leader or as member) // 2) we are not bound to any group and have GM mode on if (_player->GetGroup()) { // we are in group, we can go only if we are in the player group if (_player->GetGroup() != target->GetGroup()) { PSendSysMessage(LANG_CANNOT_GO_TO_INST_PARTY,chrNameLink.c_str()); SetSentErrorMessage(true); return false; } } else { // we are not in group, let's verify our GM mode if (!_player->isGameMaster()) { PSendSysMessage(LANG_CANNOT_GO_TO_INST_GM,chrNameLink.c_str()); SetSentErrorMessage(true); return false; } } // if the player or the player's group is bound to another instance // the player will not be bound to another one InstancePlayerBind *pBind = _player->GetBoundInstance(target->GetMapId(), target->GetDifficulty()); if (!pBind) { Group *group = _player->GetGroup(); // if no bind exists, create a solo bind InstanceGroupBind *gBind = group ? group->GetBoundInstance(target->GetMapId(), target) : NULL; // if no bind exists, create a solo bind if (!gBind) { DungeonPersistentState *save = ((DungeonMap*)target->GetMap())->GetPersistanceState(); // if player is group leader then we need add group bind if (group && group->IsLeader(_player->GetObjectGuid())) group->BindToInstance(save, !save->CanReset()); else _player->BindToInstance(save, !save->CanReset()); } } _player->SetDifficulty(target->GetDifficulty()); } PSendSysMessage(LANG_APPEARING_AT, chrNameLink.c_str()); if (needReportToTarget(target)) ChatHandler(target).PSendSysMessage(LANG_APPEARING_TO, GetNameLink().c_str()); // stop flight if need if (_player->IsTaxiFlying()) { _player->GetMotionMaster()->MovementExpired(); _player->m_taxi.ClearTaxiDestinations(); } // save only in non-flight case else _player->SaveRecallPosition(); // to point to see at target with same orientation float x,y,z; target->GetContactPoint(_player,x,y,z); _player->TeleportTo(target->GetMapId(), x, y, z, _player->GetAngle(target), TELE_TO_GM_MODE); } else { // check offline security if (HasLowerSecurity(NULL, target_guid)) return false; std::string nameLink = playerLink(target_name); PSendSysMessage(LANG_APPEARING_AT, nameLink.c_str()); // to point where player stay (if loaded) float x,y,z,o; uint32 map; bool in_flight; if (!Player::LoadPositionFromDB(target_guid, map,x,y,z,o,in_flight)) return false; return HandleGoHelper(_player, map, x, y, &z); } return true; } Just added this 2 lines on the first line after the if target bracket. if (target->GetTeam() != _player->GetTeam()) return false; EDIT: Lol it should be == not != and as i can see it, the getteam function does not return a uint32 value, a simple hint when debugging is to just chat or slog your variables to the command executor, you will probably not get either 67 or 469 as feedback if you print those variables out. Look at the definition for m_team and then look at the definition of Team after that. // In fact !=0 values is alliance/horde root faction ids enum Team { TEAM_NONE = 0, // used when team value unknown or not set, 0 is also meaning that can be used !team check HORDE = 67, ALLIANCE = 469, }; Idk what enum means really, but im sure it does not say uint32 to me, anyways you should never create a variable you do not need to use more then once!
  4. I think the graveyards are fetched from DBC, but i think you can override the dbc values with the database values. But i do not think you can create new ones (This is just guessing since i have never actually done it, just read the code once quick while looking for alternatives to my server, but decided not to)
  5. http://s3.amazonaws.com/ragefaces/77e0fd22f2f37e0b78f2773be1efcc05.png[/img] Also, for example mangos were first with the implementation of achievements as i recall
  6. You can add a new graveyard by replacing the dbc value, either via c++ or via the dbc files. But you will not get any support regarding dbc editing from me
  7. Sticky? This is pretty important information tbh
  8. probably, try resetting your router. Since port forwarding is not needed for the clients to work. Not sure about this otherwise, check your hosts file maby?
  9. This forum does not support mangosr2
  10. oh, sry didnt see you should do it like this in the command player->xprate = value;
  11. No there aint, then show me the code and give me the reason to why mangos would limit the account of connections from the same ip address? Imagine a LAN-Party? I had 9 simultaneous connections from the same ip address to my mangos server, and none of them were gamemaster accounts. There are no reason to why they would waste their time on coding such thing. It's not blizzlike, not usable for anything good etc... so that is a big no. Unless there are some config to enable/disable this feature.
  12. Could you share the 2.4.3 spellwork? I want to start learning "spellfixing", since it is the most game breaking thing, when a spell doesnt work EDIT: Also could you share your scriptdev fork if you happen to have any? Would be good to review and get the fixes into scriptdev2 "offy"
  13. Could we try to summit this? you got a setup like this? Server: External_Server (Hosted somewhere) Home Network: Router (Managing computer1 and computer2) computer1 computer2 If that is the case, then the problem is not related to mangos, because mangos accepts unlimited connections from the same ip address. If the server is on your home network like this: Home Network: Router Server and wow computer wow computer Then the problem might be that you bond your realmlist to 127.0.0.1 (Home) and that makes noone else able to log on to your server. There are probably some more scenarios, but i just want to get a clue about your setup. Also paste your configuration files on http://paste2.org and also paste the data of your "realmlist" database table and then link them here (But do not forget to change the config passwords so you dont get vurnerable)
  14. i think soap uses a port on 7*** by default, look in your mangosd.conf to find your soap port
  15. Yeah i can do that:) But that would need someone to help me with the logging part of the code. If you can tell me how to log it i can test it out! (if its ok if i test on mangos one because that is mainly what i am using) Summary: Help me with the logging code and i help you log:) EDIT: My workstation is up and running now!
  16. As soon as i get my workstation up and running im going to apply shaurens code and see how well it works. And about the sending of more packets, i think in mangos the blizzlike way is the only way?
  17. If what amaru says works, should that be added to the repo then?
  18. Im sorry but atleast try using proper english
  19. Not sure tbh. But just because of the ease of use i would use Debian. Because then you can put your effort into something more productive =) Like mangos!
  20. Im very sure it is there. Just checked
×
×
  • 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