mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
refactor(Core/Scripts): restyle scripts lib with astyle (#3467)
This commit is contained in:
@@ -85,7 +85,7 @@ public:
|
||||
PreparedQueryResult result = WorldDatabase.Query(stmt);
|
||||
|
||||
uint32 maxpathid = result->Fetch()->GetInt32();
|
||||
pathid = maxpathid+1;
|
||||
pathid = maxpathid + 1;
|
||||
handler->PSendSysMessage("%s%s|r", "|cff00ff00", "New path started.");
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
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
|
||||
|
||||
@@ -318,7 +318,7 @@ public:
|
||||
|
||||
WorldDatabase.Execute(stmt);
|
||||
|
||||
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;
|
||||
@@ -365,8 +365,7 @@ public:
|
||||
a11 = fields[9].GetFloat();
|
||||
|
||||
handler->PSendSysMessage("|cffff33ffid:|r|cff00ffff %u|r|cff00ff00, guid: |r|cff00ffff%u|r|cff00ff00, delay: |r|cff00ffff%u|r|cff00ff00, command: |r|cff00ffff%u|r|cff00ff00, datalong: |r|cff00ffff%u|r|cff00ff00, datalong2: |r|cff00ffff%u|r|cff00ff00, datatext: |r|cff00ffff%s|r|cff00ff00, posx: |r|cff00ffff%f|r|cff00ff00, posy: |r|cff00ffff%f|r|cff00ff00, posz: |r|cff00ffff%f|r|cff00ff00, orientation: |r|cff00ffff%f|r", id, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11);
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
}
|
||||
|
||||
if (show == "del")
|
||||
@@ -428,8 +427,8 @@ public:
|
||||
std::string arg_string = arg_2;
|
||||
|
||||
if ((arg_string != "setid") && (arg_string != "delay") && (arg_string != "command")
|
||||
&& (arg_string != "datalong") && (arg_string != "datalong2") && (arg_string != "dataint") && (arg_string != "posx")
|
||||
&& (arg_string != "posy") && (arg_string != "posz") && (arg_string != "orientation"))
|
||||
&& (arg_string != "datalong") && (arg_string != "datalong2") && (arg_string != "dataint") && (arg_string != "posx")
|
||||
&& (arg_string != "posy") && (arg_string != "posz") && (arg_string != "orientation"))
|
||||
{
|
||||
handler->SendSysMessage("|cffff33ffERROR: No valid argument present.|r");
|
||||
return true;
|
||||
@@ -554,8 +553,8 @@ public:
|
||||
// Check
|
||||
// Remember: "show" must also be the name of a column!
|
||||
if ((show != "delay") && (show != "action") && (show != "action_chance")
|
||||
&& (show != "move_type") && (show != "del") && (show != "move") && (show != "wpadd")
|
||||
)
|
||||
&& (show != "move_type") && (show != "del") && (show != "move") && (show != "wpadd")
|
||||
)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -619,8 +618,7 @@ public:
|
||||
Field* fields = result->Fetch();
|
||||
pathid = fields[0].GetUInt32();
|
||||
point = fields[1].GetUInt32();
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
// We have the waypoint number and the GUID of the "master npc"
|
||||
// Text is enclosed in "<>", all other arguments not
|
||||
@@ -719,7 +717,7 @@ public:
|
||||
return true;
|
||||
} // move
|
||||
|
||||
const char *text = arg_str;
|
||||
const char* text = arg_str;
|
||||
|
||||
if (text == 0)
|
||||
{
|
||||
@@ -824,8 +822,7 @@ public:
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Move flag: |r|cff00ffff%u|r", flag);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Waypoint event: |r|cff00ffff%u|r", ev_id);
|
||||
handler->PSendSysMessage("|cff00ff00Show info: Event chance: |r|cff00ffff%u|r", ev_chance);
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -881,8 +878,7 @@ public:
|
||||
creature->AddObjectToRemoveList();
|
||||
}
|
||||
|
||||
}
|
||||
while (result2->NextRow());
|
||||
} while (result2->NextRow());
|
||||
|
||||
if (hasError)
|
||||
{
|
||||
@@ -938,8 +934,7 @@ public:
|
||||
wpCreature->SetObjectScale(0.5f);
|
||||
wpCreature->SetLevel(point > STRONG_MAX_LEVEL ? STRONG_MAX_LEVEL : point);
|
||||
}
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
handler->SendSysMessage("|cff00ff00Showing the current creature's path.|r");
|
||||
return true;
|
||||
@@ -1079,8 +1074,7 @@ public:
|
||||
creature->DeleteFromDB();
|
||||
creature->AddObjectToRemoveList();
|
||||
}
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
// set "wpguid" column to "empty" - no visual waypoint spawned
|
||||
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_ALL_WPGUID);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user