-
Content Count
41 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Projects
Tutorials
Videos
Downloads Plus Support
module__dplus_manager
Everything posted by Roarl
-
Hi there! I added a command in cs_gobject.cpp, called "deletelast", which thus is a subcommand of "gobject". So, I added a ChatCommand in gobjectCommandTable : { "deletelast", rbac::RBAC_PERM_COMMAD_GOBJECT_DELETELAST, false, &HandleGameObjectDeleteLastCommand, "" },And the Handle is : static bool HandleGameObjectDeleteLastCommand(ChatHandler* handler, char const* args) { GameObject* object = NULL; // by DB guid Player* player = handler->GetSession()->GetPlayer(); Map* map = player->GetMap(); ObjectGuid::LowType guidLow = map->GenerateLowGuid<HighGuid::GameObject>() - 1; if (GameObjectData const* gameObjectData = sObjectMgr->GetGOData(guidLow)) object = handler->GetObjectGlobalyWithGuidOrNearWithDbGuid(guidLow, gameObjectData->id); if (!object) { handler->PSendSysMessage(LANG_COMMAND_OBJNOTFOUND, guidLow); handler->SetSentErrorMessage(true); return false; } ObjectGuid ownerGuid = object->GetOwnerGUID(); if (ownerGuid) { Unit* owner = ObjectAccessor::GetUnit(*handler->GetSession()->GetPlayer(), ownerGuid); if (!owner || !ownerGuid.IsPlayer()) { handler->PSendSysMessage(LANG_COMMAND_DELOBJREFERCREATURE, ownerGuid.GetCounter(), object->GetGUID().GetCounter()); handler->SetSentErrorMessage(true); return false; } owner->RemoveGameObject(object, false); } object->SetRespawnTime(0); // not save respawn time object->Delete(); object->DeleteFromDB(); handler->PSendSysMessage(LANG_COMMAND_DELOBJMESSAGE, object->GetGUID().GetCounter()); return true; }I did create a permission in RBAC.h : RBAC_PERM_COMMAD_GOBJECT_DELETELAST = 1000,and I did create rows in auth's tables rbac_permissions and rbac_linked_permissions as well as in world's table commands. USE auth INSERT INTO `rbac_linked_permissions` VALUES (193, 1000); INSERT INTO `rbac_permissions` VALUES (1000, 'Command: gobject deletelast'); USE world INSERT INTO `command` VALUES ('gobject deletelast', 1000, 'Syntax: .gobject deletelast\r\nDelete last gobject in DB.'); Now, I have no problem with scripting the command itself. My problem is rather that the command doesn't even want to trigger. When I type ".gobject deletelast" in-game, TrinityCore World Server Daemon says : "Table 'command' have not existed subcommand 'deletelast' in command 'gobject deletelast', skip." . Would anyone know about what I did wrong here? Thanks in advance for your patience.
-
Hi there, Very very very very tiny (tiniest maybe?) release : a small macro (DOS) I'm using to start/stop mysql service on my computer. This saves me some time as I used to start it manually (I don't have a gargantuan computer, so... I can't afford to leave it running all the time if I wanna play/compile properly). Figured maybe some of you couldn't be fagged to do it (which I would understand) so maybe it'll be useful somehow. for /F "tokens=3 delims=: " %%H in ('sc query "MySQL56" ^| findstr " STATE"') do ( if /I "%%H" NEQ "RUNNING" ( net start "MySQL56" ) ELSE ( net stop "MySQL56" ) )(Don't forget to replace MYSQL56 by whatever version you are using ofc.) Cheers.
-
solved [TC 3.3.5][SOLVED]Custom Gobject Command "not existed"
Roarl replied to Roarl 's topic in Serverside
Erm... solved. But before I tell how please promise you won't chop my head off... SOOOoooo... I built in Debug and was running the Release... =3 =3 (thanks anyway Kaev! / anyone who read this ) -
solved [TC 3.3.5][SOLVED]Custom Gobject Command "not existed"
Roarl replied to Roarl 's topic in Serverside
Oops yes sorry it is gobject deletelast Exported the wrong line (just updated the original post) -
-
Merry Xmas Dammit these screenshot and video x)
-
What the blazes did I just see. I guess... Thank you Hyakkimaru?
-
Wow! This guy definitely has the look for this kind of song, haha! Like any pianist I enjoy piano covers... Especially the ones of Mercuzio, this guy is a genius. This one gets interesting at 0:50 And second one is a pure marvel from the outset
-
Erm well... why not after all! Luckily there is Namiriu and Valkryst, else I'd have the emptiest deskop of all!