Add spaces after commas
This commit is contained in:
1 parent
01a79947d5
commit
1003f30448
645 files changed
+9439
-9439
No files matched your search
@@ -109,7 +109,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
|
||||
if (result)
|
||||
point = (*result)[0].GetUInt32();
|
||||
@@ -117,10 +117,10 @@ public:
|
||||
Player* player = handler->GetSession()->GetPlayer();
|
||||
//Map *map = player->GetMap();
|
||||
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u','%u','%f', '%f', '%f')",
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_data (id, point, position_x, position_y, position_z) VALUES ('%u', '%u', '%f', '%f', '%f')",
|
||||
pathid, point+1, player->GetPositionX(), player->GetPositionY(), player->GetPositionZ());
|
||||
|
||||
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point+1,"|r|cff00ff00 created. ");
|
||||
handler->PSendSysMessage("%s%s%u%s%u%s|r", "|cff00ff00", "PathID: |r|cff00ffff", pathid, "|r|cff00ff00: Waypoint |r|cff00ffff", point+1, "|r|cff00ff00 created. ");
|
||||
return true;
|
||||
} // HandleWpAddCommand
|
||||
|
||||
@@ -166,19 +166,19 @@ public:
|
||||
}
|
||||
|
||||
guidlow = target->GetDBTableGUIDLow();
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'",guidlow);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT guid FROM creature_addon WHERE guid = '%u'", guidlow);
|
||||
|
||||
if (result)
|
||||
WorldDatabase.PExecute("UPDATE creature_addon SET path_id = '%u' WHERE guid = '%u'", pathid, guidlow);
|
||||
else
|
||||
WorldDatabase.PExecute("INSERT INTO creature_addon(guid,path_id) VALUES ('%u','%u')", guidlow, pathid);
|
||||
WorldDatabase.PExecute("INSERT INTO creature_addon(guid, path_id) VALUES ('%u', '%u')", guidlow, pathid);
|
||||
|
||||
WorldDatabase.PExecute("UPDATE creature SET MovementType = '%u' WHERE guid = '%u'", WAYPOINT_MOTION_TYPE, guidlow);
|
||||
|
||||
target->LoadPath(pathid);
|
||||
target->SetDefaultMovementType(WAYPOINT_MOTION_TYPE);
|
||||
target->GetMotionMaster()->Initialize();
|
||||
target->MonsterSay("Path loaded.",0,0);
|
||||
target->MonsterSay("Path loaded.", 0, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -219,7 +219,7 @@ public:
|
||||
target->SetDefaultMovementType(IDLE_MOTION_TYPE);
|
||||
target->GetMotionMaster()->MoveTargetedHome();
|
||||
target->GetMotionMaster()->Initialize();
|
||||
target->MonsterSay("Path unloaded.",0,0);
|
||||
target->MonsterSay("Path unloaded.", 0, 0);
|
||||
return true;
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r", "|cffff33ff", "Target have no loaded path.");
|
||||
@@ -263,7 +263,7 @@ public:
|
||||
QueryResult result = WorldDatabase.Query("SELECT MAX(guid) FROM waypoint_scripts");
|
||||
id = result->Fetch()->GetUInt32();
|
||||
WorldDatabase.PExecute("INSERT INTO waypoint_scripts(guid)VALUES(%u)", id+1);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00","Wp Event: New waypoint event added: |r|cff00ffff", id+1);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: New waypoint event added: |r|cff00ffff", id+1);
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -273,7 +273,7 @@ public:
|
||||
{
|
||||
if (!arg_id)
|
||||
{
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff","Wp Event: You must provide waypoint script id.");
|
||||
handler->PSendSysMessage("%s%s|r", "|cff33ffff", "Wp Event: You must provide waypoint script id.");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ public:
|
||||
if (result)
|
||||
{
|
||||
WorldDatabase.PExecute("DELETE FROM waypoint_scripts WHERE guid = %u", id);
|
||||
handler->PSendSysMessage("%s%s%u|r","|cff00ff00","Wp Event: Waypoint script removed: ", id);
|
||||
handler->PSendSysMessage("%s%s%u|r", "|cff00ff00", "Wp Event: Waypoint script removed: ", id);
|
||||
}
|
||||
else
|
||||
handler->PSendSysMessage("|cffff33ffWp Event: ERROR: you have selected a non existing script: %u|r", id);
|
||||
@@ -345,7 +345,7 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
char* arg_2 = strtok(NULL," ");
|
||||
char* arg_2 = strtok(NULL, " ");
|
||||
|
||||
if (!arg_2)
|
||||
{
|
||||
@@ -365,7 +365,7 @@ public:
|
||||
|
||||
char* arg_3;
|
||||
std::string arg_str_2 = arg_2;
|
||||
arg_3 = strtok(NULL," ");
|
||||
arg_3 = strtok(NULL, " ");
|
||||
|
||||
if (!arg_3)
|
||||
{
|
||||
@@ -378,13 +378,13 @@ public:
|
||||
if (arg_str_2 == "setid")
|
||||
{
|
||||
uint32 newid = atoi(arg_3);
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r","|cff00ff00","Wp Event: Wypoint scipt guid: ", newid," id changed: ", id);
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u|r|cff00ff00%s|r|cff00ffff%u|r", "|cff00ff00", "Wp Event: Wypoint scipt guid: ", newid, " id changed: ", id);
|
||||
WorldDatabase.PExecute("UPDATE waypoint_scripts SET id='%u' WHERE guid='%u'",
|
||||
newid, id); return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT id FROM waypoint_scripts WHERE guid='%u'",id);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT id FROM waypoint_scripts WHERE guid='%u'", id);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -439,7 +439,7 @@ public:
|
||||
arg_2, arg_str_3.c_str(), id);
|
||||
}
|
||||
}
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r","|cff00ff00","Waypoint script:", id, arg_2,"updated.");
|
||||
handler->PSendSysMessage("%s%s|r|cff00ffff%u:|r|cff00ff00 %s %s|r", "|cff00ff00", "Waypoint script:", id, arg_2, "updated.");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -599,7 +599,7 @@ public:
|
||||
//sMapMgr->GetMap(npcCreature->GetMapId())->Add(wpCreature2);
|
||||
}
|
||||
|
||||
WorldDatabase.PExecute("UPDATE waypoint_data SET position_x = '%f',position_y = '%f',position_z = '%f' where id = '%u' AND point='%u'",
|
||||
WorldDatabase.PExecute("UPDATE waypoint_data SET position_x = '%f', position_y = '%f', position_z = '%f' where id = '%u' AND point='%u'",
|
||||
chr->GetPositionX(), chr->GetPositionY(), chr->GetPositionZ(), pathid, point);
|
||||
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_CHANGED);
|
||||
@@ -719,7 +719,7 @@ public:
|
||||
|
||||
if (show == "on")
|
||||
{
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT point, position_x,position_y,position_z FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT point, position_x, position_y, position_z FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
|
||||
if (!result)
|
||||
{
|
||||
@@ -740,7 +740,7 @@ public:
|
||||
{
|
||||
Field *fields = result2->Fetch();
|
||||
uint32 wpguid = fields[0].GetUInt32();
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid,VISUAL_WAYPOINT,HIGHGUID_UNIT));
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(wpguid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
|
||||
if (!pCreature)
|
||||
{
|
||||
@@ -793,7 +793,7 @@ public:
|
||||
|
||||
wpCreature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMaskForSpawn());
|
||||
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(),map);
|
||||
wpCreature->LoadFromDB(wpCreature->GetDBTableGUIDLow(), map);
|
||||
map->Add(wpCreature);
|
||||
|
||||
if (target)
|
||||
@@ -813,7 +813,7 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp first, GUID: %u|r", pathid);
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM waypoint_data WHERE point='1' AND id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point='1' AND id = '%u'", pathid);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUND, pathid);
|
||||
@@ -832,7 +832,7 @@ public:
|
||||
Map *map = chr->GetMap();
|
||||
|
||||
Creature* pCreature = new Creature;
|
||||
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT),map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
|
||||
if (!pCreature->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_UNIT), map, chr->GetPhaseMaskForSpawn(), id, 0, 0, x, y, z, o))
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_VP_NOTCREATED, id);
|
||||
delete pCreature;
|
||||
@@ -856,13 +856,13 @@ public:
|
||||
{
|
||||
handler->PSendSysMessage("|cff00ff00DEBUG: wp last, PathID: |r|cff00ffff%u|r", pathid);
|
||||
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'",pathid);
|
||||
QueryResult result = WorldDatabase.PQuery("SELECT MAX(point) FROM waypoint_data WHERE id = '%u'", pathid);
|
||||
if (result)
|
||||
Maxpoint = (*result)[0].GetUInt32();
|
||||
else
|
||||
Maxpoint = 0;
|
||||
|
||||
result = WorldDatabase.PQuery("SELECT position_x,position_y,position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'",Maxpoint, pathid);
|
||||
result = WorldDatabase.PQuery("SELECT position_x, position_y, position_z FROM waypoint_data WHERE point ='%u' AND id = '%u'", Maxpoint, pathid);
|
||||
if (!result)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTFOUNDLAST, pathid);
|
||||
@@ -914,7 +914,7 @@ public:
|
||||
{
|
||||
Field *fields = result->Fetch();
|
||||
uint32 guid = fields[0].GetUInt32();
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid,VISUAL_WAYPOINT,HIGHGUID_UNIT));
|
||||
Creature* pCreature = handler->GetSession()->GetPlayer()->GetMap()->GetCreature(MAKE_NEW_GUID(guid, VISUAL_WAYPOINT, HIGHGUID_UNIT));
|
||||
if (!pCreature)
|
||||
{
|
||||
handler->PSendSysMessage(LANG_WAYPOINT_NOTREMOVED, guid);
|
||||
|
||||
Reference in new issue
Block a user