Eluna Implement [] to parser, change all & to [] in documentation and fix a bug with CastCustomSpell

This commit is contained in:
Rochet2
2014-08-13 17:01:51 +03:00
parent b16879e622
commit ce2637e322
13 changed files with 337 additions and 337 deletions

View File

@@ -8,21 +8,21 @@
#define AURAMETHODS_H
/***
* The persistent effect of a &Spell that remains on a &Unit after the spell
* The persistent effect of a [Spell] that remains on a [Unit] after the [Spell]
* has been cast.
*
* As an example, if you cast a damage-over-time spell on a target, an Aura is
* As an example, if you cast a damage-over-time spell on a target, an [Aura] is
* put on the target that deals damage continuously.
*
* Auras on your player are displayed in-game as a series of icons to the left
* [Aura]s on your player are displayed in-game as a series of icons to the left
* of the mini-map.
*/
namespace LuaAura
{
/**
* Returns the &Unit that casted the &Spell that caused this &Aura to be applied.
* Returns the [Unit] that casted the [Spell] that caused this [Aura] to be applied.
*
* @return &Unit caster
* @return [Unit] caster
*/
int GetCaster(lua_State* L, Aura* aura)
{
@@ -31,7 +31,7 @@ namespace LuaAura
}
/**
* Returns the GUID of the &Unit that casted the &Spell that caused this &Aura to be applied.
* Returns the GUID of the [Unit] that casted the [Spell] that caused this [Aura] to be applied.
*
* @return string caster_guid : the GUID of the Unit as a decimal string
*/
@@ -46,7 +46,7 @@ namespace LuaAura
}
/**
* Returns the level of the &Unit that casted the &Spell that caused this &Aura to be applied.
* Returns the level of the [Unit] that casted the [Spell] that caused this [Aura] to be applied.
*
* @return uint32 caster_level
*/
@@ -57,7 +57,7 @@ namespace LuaAura
}
/**
* Returns the amount of time left until the &Aura expires.
* Returns the amount of time left until the [Aura] expires.
*
* @return int32 duration : amount of time left in milliseconds
*/
@@ -72,7 +72,7 @@ namespace LuaAura
}
/**
* Returns the ID of the &Spell that caused this &Aura to be applied.
* Returns the ID of the [Spell] that caused this [Aura] to be applied.
*
* @return uint32 aura_id
*/
@@ -83,10 +83,10 @@ namespace LuaAura
}
/**
* Returns the amount of time this &Aura lasts when applied.
* Returns the amount of time this [Aura] lasts when applied.
*
* To determine how much time has passed since this Aura was applied,
* subtract the result of &Aura:GetDuration from the result of this method.
* subtract the result of [Aura]:GetDuration from the result of this method.
*
* @return int32 max_duration : the maximum duration of the Aura, in milliseconds
*/
@@ -101,9 +101,9 @@ namespace LuaAura
}
/**
* Returns the number of times the &Aura has "stacked".
* Returns the number of times the [Aura] has "stacked".
*
* This is the same as the number displayed on the &Aura's icon in-game.
* This is the same as the number displayed on the [Aura]'s icon in-game.
*
* @return uint32 stack_amount
*/
@@ -114,9 +114,9 @@ namespace LuaAura
}
/**
* Returns the &Unit that the &Aura has been applied to.
* Returns the [Unit] that the [Aura] has been applied to.
*
* @return &Unit owner
* @return [Unit] owner
*/
int GetOwner(lua_State* L, Aura* aura)
{
@@ -129,7 +129,7 @@ namespace LuaAura
}
/**
* Change the amount of time before the &Aura expires.
* Change the amount of time before the [Aura] expires.
*
* @param int32 duration : the new duration of the Aura, in milliseconds
*/
@@ -145,9 +145,9 @@ namespace LuaAura
}
/**
* Change the maximum amount of time before the &Aura expires.
* Change the maximum amount of time before the [Aura] expires.
*
* This does not affect the current duration of the &Aura, but if the &Aura
* This does not affect the current duration of the [Aura], but if the [Aura]
* is reset to the maximum duration, it will instead change to `duration`.
*
* @param int32 duration : the new maximum duration of the Aura, in milliseconds
@@ -164,10 +164,10 @@ namespace LuaAura
}
/**
* Change the amount of times the &Aura has "stacked" on the &Unit.
* Change the amount of times the [Aura] has "stacked" on the [Unit].
*
* If `amount` is greater than or equal to the current number of stacks,
* then the &Aura has its duration reset to the maximum duration.
* then the [Aura] has its duration reset to the maximum duration.
*
* @param uint32 amount
*/
@@ -183,7 +183,7 @@ namespace LuaAura
}
/**
* Remove this &Aura from the &Unit it is applied to.
* Remove this [Aura] from the [Unit] it is applied to.
*/
int Remove(lua_State* /*L*/, Aura* aura)
{

View File

@@ -10,7 +10,7 @@
namespace LuaCorpse
{
/**
* Returns the &Corpse Owner GUID.
* Returns the [Corpse] Owner GUID.
*
* @return uint64 ownerGUID
*/
@@ -25,7 +25,7 @@ namespace LuaCorpse
}
/**
* Returns the ghost time of a &Corpse.
* Returns the ghost time of a [Corpse].
*
* @return uint32 ghostTime
*/
@@ -36,7 +36,7 @@ namespace LuaCorpse
}
/**
* Returns the CorpseType of a &Corpse.
* Returns the [CorpseType] of a [Corpse].
*
* <pre>
* enum CorpseType
@@ -47,7 +47,7 @@ namespace LuaCorpse
* };
* </pre>
*
* @return uint8 corpseType
* @return [CorpseType] corpseType
*/
int GetType(lua_State* L, Corpse* corpse)
{
@@ -56,7 +56,7 @@ namespace LuaCorpse
}
/**
* Resets the &Corpse ghost time.
* Resets the [Corpse] ghost time.
*
*/
int ResetGhostTime(lua_State* /*L*/, Corpse* corpse)
@@ -66,7 +66,7 @@ namespace LuaCorpse
}
/**
* Saves the &Corpse to the database.
* Saves the [Corpse] to the database.
*
*/
int SaveToDB(lua_State* /*L*/, Corpse* corpse)
@@ -76,7 +76,7 @@ namespace LuaCorpse
}
/**
* Deletes the &Corpse from the world.
* Deletes the [Corpse] from the world.
*
*/
int DeleteBonesFromWorld(lua_State* /*L*/, Corpse* corpse)

View File

@@ -10,7 +10,7 @@
namespace LuaGameObject
{
/**
* Returns 'true' if the &GameObject can give the specified &Quest
* Returns 'true' if the [GameObject] can give the specified [Quest]
*
* @param uint32 questId : quest entry Id to check
* @return bool hasQuest
@@ -28,7 +28,7 @@ namespace LuaGameObject
}
/**
* Returns 'true' if the &GameObject is spawned
* Returns 'true' if the [GameObject] is spawned
*
* @return bool isSpawned
*/
@@ -39,7 +39,7 @@ namespace LuaGameObject
}
/**
* Returns 'true' if the &GameObject is a transport
* Returns 'true' if the [GameObject] is a transport
*
* @return bool isTransport
*/
@@ -50,7 +50,7 @@ namespace LuaGameObject
}
/**
* Returns 'true' if the &GameObject is active
* Returns 'true' if the [GameObject] is active
*
* @return bool isActive
*/
@@ -67,7 +67,7 @@ namespace LuaGameObject
}*/
/**
* Returns display ID of the &GameObject
* Returns display ID of the [GameObject]
*
* @return uint32 displayId
*/
@@ -78,8 +78,8 @@ namespace LuaGameObject
}
/**
* Returns the state of a &GameObject
* Below are client side GOStates off of 3.3.5a
* Returns the state of a [GameObject]
* Below are client side [GOState]s off of 3.3.5a
*
* <pre>
* enum GOState
@@ -90,7 +90,7 @@ namespace LuaGameObject
* };
* </pre>
*
* @return uint32 goState
* @return [GOState] goState
*/
int GetGoState(lua_State* L, GameObject* go)
{
@@ -99,8 +99,8 @@ namespace LuaGameObject
}
/**
* Returns the loot state of a &GameObject
* Below are Loot States off of 3.3.5a
* Returns the [LootState] of a [GameObject]
* Below are [LootState]s off of 3.3.5a
*
* <pre>
* enum LootState
@@ -112,7 +112,7 @@ namespace LuaGameObject
* };
* </pre>
*
* @return uint32 lootState
* @return [LootState] lootState
*/
int GetLootState(lua_State* L, GameObject* go)
{
@@ -121,7 +121,7 @@ namespace LuaGameObject
}
/**
* Sets the state of a &GameObject
* Sets the state of a [GameObject]
*
* <pre>
* enum GOState
@@ -132,7 +132,7 @@ namespace LuaGameObject
* };
* </pre>
*
* @param uint32 state : all available go states can be seen above
* @param [GOState] state : all available go states can be seen above
*/
int SetGoState(lua_State* L, GameObject* go)
{
@@ -149,8 +149,8 @@ namespace LuaGameObject
}
/**
* Sets the loot state of a &GameObject
* Below are Loot States off of 3.3.5a
* Sets the [LootState] of a [GameObject]
* Below are [LootState]s off of 3.3.5a
*
* <pre>
* enum LootState
@@ -162,7 +162,7 @@ namespace LuaGameObject
* };
* </pre>
*
* @param uint32 state : all available loot states can be seen above
* @param [LootState] state : all available loot states can be seen above
*/
int SetLootState(lua_State* L, GameObject* go)
{
@@ -181,7 +181,7 @@ namespace LuaGameObject
}
/**
* Saves &GameObject to the database
* Saves [GameObject] to the database
*
*/
int SaveToDB(lua_State* /*L*/, GameObject* go)
@@ -191,9 +191,9 @@ namespace LuaGameObject
}
/**
* Removes &GameObject from the world
* Removes [GameObject] from the world
*
* @param bool deleteFromDB : if true, it will delete the &GameObject from the database
* @param bool deleteFromDB : if true, it will delete the [GameObject] from the database
*/
int RemoveFromWorld(lua_State* L, GameObject* go)
{
@@ -205,7 +205,7 @@ namespace LuaGameObject
}
/**
* Registers a timed event to the &GameObject
* Registers a timed event to the [GameObject]
*
* @param function function : function to trigger when the time has passed
* @param uint32 delay : set time in milliseconds for the event to trigger
@@ -227,7 +227,7 @@ namespace LuaGameObject
}
/**
* Removes the timed event from a &GameObject by the specified event ID
* Removes the timed event from a [GameObject] by the specified event ID
*
* @param int32 eventId : event Id to remove
*/
@@ -239,7 +239,7 @@ namespace LuaGameObject
}
/**
* Removes all timed events from a &GameObject
* Removes all timed events from a [GameObject]
*
*/
int RemoveEvents(lua_State* /*L*/, GameObject* go)
@@ -249,9 +249,9 @@ namespace LuaGameObject
}
/**
* Changes uses a door or a button type &GameObject
* Changes uses a door or a button type [GameObject]
*
* @param uint32 delay : cooldown time in seconds to restore the &GameObject back to normal
* @param uint32 delay : cooldown time in seconds to restore the [GameObject] back to normal
*/
int UseDoorOrButton(lua_State* L, GameObject* go)
{
@@ -262,7 +262,7 @@ namespace LuaGameObject
}
/**
* Despawns a &GameObject
* Despawns a [GameObject]
*
* @param uint32 delay : time in seconds to despawn
*/
@@ -278,7 +278,7 @@ namespace LuaGameObject
}
/**
* Respawns a &GameObject
* Respawns a [GameObject]
*
* @param uint32 delay : time of respawn in seconds
*/

View File

@@ -343,7 +343,7 @@ ElunaRegister<Unit> UnitMethods[] =
{ "SendUnitSay", &LuaUnit::SendUnitSay }, // :SendUnitSay(msg, language) - Sends a "Say" message with the specified language (all languages: 0)
{ "SendUnitYell", &LuaUnit::SendUnitYell }, // :SendUnitYell(msg, language) - Sends a "Yell" message with the specified language (all languages: 0)
{ "CastSpell", &LuaUnit::CastSpell }, // :CastSpell(target, spellID[, triggered]) - Casts spell on target (player/npc/creature), if triggered is true then instant cast
{ "CastCustomSpell", &LuaUnit::CastCustomSpell }, // :CastCustomSpell(&Unit target, uint32 spell, bool triggered = false, int32 bp0 = nil, int32 bp1 = nil, int32 bp2 = nil, &Item castItem = nil, uint64 originalCaster = 0) - Casts spell on target (player/npc/creature), if triggered is true then instant cast. pb0, 1 and 2 are modifiers for the base points of the spell.
{ "CastCustomSpell", &LuaUnit::CastCustomSpell }, // :CastCustomSpell([Unit] target, uint32 spell, bool triggered = false, int32 bp0 = nil, int32 bp1 = nil, int32 bp2 = nil, [Item] castItem = nil, uint64 originalCaster = 0) - Casts spell on target (player/npc/creature), if triggered is true then instant cast. pb0, 1 and 2 are modifiers for the base points of the spell.
{ "CastSpellAoF", &LuaUnit::CastSpellAoF }, // :CastSpellAoF(x, y, z, spellID[, triggered]) - Casts the spell on coordinates, if triggered is false has mana cost and cast time
{ "PlayDirectSound", &LuaUnit::PlayDirectSound }, // :PlayDirectSound(soundId[, player]) - Unit plays soundID to player, or everyone around if no player
{ "PlayDistanceSound", &LuaUnit::PlayDistanceSound }, // :PlayDistanceSound(soundId[, player]) - Unit plays soundID to player, or everyone around if no player. The sound fades the further you are

View File

@@ -12,7 +12,7 @@ namespace LuaMap
#ifndef CLASSIC
/**
* Returns 'true' if the &Map is an arena, false otherwise
* Returns 'true' if the [Map] is an arena, false otherwise
*
* @return bool isArena
*/
@@ -24,7 +24,7 @@ namespace LuaMap
#endif
/**
* Returns 'true' if the &Map is a battleground, false otherwise
* Returns 'true' if the [Map] is a battleground, false otherwise
*
* @return bool isBattleGround
*/
@@ -39,7 +39,7 @@ namespace LuaMap
}
/**
* Returns 'true' if the &Map is a dungeon, false otherwise
* Returns 'true' if the [Map] is a dungeon, false otherwise
*
* @return bool isDungeon
*/
@@ -50,7 +50,7 @@ namespace LuaMap
}
/**
* Returns 'true' if the &Map is empty, false otherwise
* Returns 'true' if the [Map] is empty, false otherwise
*
* @return bool isEmpty
*/
@@ -62,7 +62,7 @@ namespace LuaMap
#ifndef CLASSIC
/**
* Returns 'true' if the &Map is a heroic, false otherwise
* Returns 'true' if the [Map] is a heroic, false otherwise
*
* @return bool isHeroic
*/
@@ -74,7 +74,7 @@ namespace LuaMap
#endif
/**
* Returns 'true' if the &Map is a raid, false otherwise
* Returns 'true' if the [Map] is a raid, false otherwise
*
* @return bool isRaid
*/
@@ -85,7 +85,7 @@ namespace LuaMap
}
/**
* Returns the name of the &Map
* Returns the name of the [Map]
*
* @return string mapName
*/
@@ -96,7 +96,7 @@ namespace LuaMap
}
/**
* Returns the height of the &Map at the given X and Y coordinates
* Returns the height of the [Map] at the given X and Y coordinates
*
* @param float x
* @param float y
@@ -118,7 +118,7 @@ namespace LuaMap
}
/**
* Returns the difficulty of the &Map
* Returns the difficulty of the [Map]
*
* @return int32 difficulty
*/
@@ -133,7 +133,7 @@ namespace LuaMap
}
/**
* Returns the instance ID of the &Map
* Returns the instance ID of the [Map]
*
* @return uint32 instanceId
*/
@@ -144,7 +144,7 @@ namespace LuaMap
}
/**
* Returns the player count currently on the &Map
* Returns the player count currently on the [Map]
* Does not include gamemasters
*
* @return uint32 playerCount
@@ -156,7 +156,7 @@ namespace LuaMap
}
/**
* Returns the ID of the &Map
* Returns the ID of the [Map]
*
* @return uint32 mapId
*/
@@ -167,7 +167,7 @@ namespace LuaMap
}
/**
* Returns the area ID of the &Map at the specified X, Y and Z coordinates
* Returns the area ID of the [Map] at the specified X, Y and Z coordinates
*
* @param float x
* @param float y
@@ -189,7 +189,7 @@ namespace LuaMap
}
/**
* Returns a &WorldObject by it's guid from the map if it is spawned
* Returns a [WorldObject] by it's guid from the map if it is spawned
*
* @param uint64 guid
*/

View File

@@ -10,7 +10,7 @@
namespace LuaQuest
{
/**
* Returns 'true' if the &Quest has the specified flag, false otherwise.
* Returns 'true' if the [Quest] has the specified flag, false otherwise.
* Below flags are based off of 3.3.5a. Subject to change.
*
* <pre>
@@ -59,7 +59,7 @@ namespace LuaQuest
#ifndef CLASSIC
/**
* Returns 'true' if the &Quest is a daily quest, false otherwise.
* Returns 'true' if the [Quest] is a daily quest, false otherwise.
*
* @return bool isDaily
*/
@@ -71,7 +71,7 @@ namespace LuaQuest
#endif
/**
* Returns 'true' if the &Quest is repeatable, false otherwise.
* Returns 'true' if the [Quest] is repeatable, false otherwise.
*
* @return bool isRepeatable
*/
@@ -82,7 +82,7 @@ namespace LuaQuest
}
/**
* Returns entry ID of the &Quest.
* Returns entry ID of the [Quest].
*
* @return uint32 entryId
*/
@@ -93,7 +93,7 @@ namespace LuaQuest
}
/**
* Returns the &Quest's level.
* Returns the [Quest]'s level.
*
* @return uint32 level
*/
@@ -104,7 +104,7 @@ namespace LuaQuest
}
/**
* Returns the minimum level required to pick up the &Quest.
* Returns the minimum level required to pick up the [Quest].
*
* @return uint32 minLevel
*/
@@ -115,7 +115,7 @@ namespace LuaQuest
}
/**
* Returns the next &Quest entry ID.
* Returns the next [Quest] entry ID.
*
* @return int32 entryId
*/
@@ -126,7 +126,7 @@ namespace LuaQuest
}
/**
* Returns the previous &Quest entry ID.
* Returns the previous [Quest] entry ID.
*
* @return int32 entryId
*/
@@ -137,7 +137,7 @@ namespace LuaQuest
}
/**
* Returns the next &Quest entry ID in the specific &Quest chain.
* Returns the next [Quest] entry ID in the specific [Quest] chain.
*
* @return int32 entryId
*/
@@ -148,7 +148,7 @@ namespace LuaQuest
}
/**
* Returns the &Quest's flags.
* Returns the [Quest]'s flags.
*
* @return uint32 flags
*/
@@ -163,7 +163,7 @@ namespace LuaQuest
}
/**
* Returns the &Quest's type.
* Returns the [Quest]'s type.
*
* TODO: Document types available.
*

View File

@@ -10,7 +10,7 @@
namespace LuaSpell
{
/**
* Returns 'true' if the &Spell is automatically repeating, false otherwise.
* Returns 'true' if the [Spell] is automatically repeating, false otherwise.
*
* @return bool isAutoRepeating
*/
@@ -21,9 +21,9 @@ namespace LuaSpell
}
/**
* Returns the &Unit that casted the &Spell.
* Returns the [Unit] that casted the [Spell].
*
* @return &Unit caster
* @return [Unit] caster
*/
int GetCaster(lua_State* L, Spell* spell)
{
@@ -32,7 +32,7 @@ namespace LuaSpell
}
/**
* Returns the cast time of the &Spell.
* Returns the cast time of the [Spell].
*
* @return int32 castTime
*/
@@ -43,7 +43,7 @@ namespace LuaSpell
}
/**
* Returns the entry ID of the &Spell.
* Returns the entry ID of the [Spell].
*
* @return uint32 entryId
*/
@@ -54,7 +54,7 @@ namespace LuaSpell
}
/**
* Returns the power cost of the &Spell.
* Returns the power cost of the [Spell].
*
* @return uint32 powerCost
*/
@@ -65,7 +65,7 @@ namespace LuaSpell
}
/**
* Returns the spell duration of the &Spell.
* Returns the spell duration of the [Spell].
*
* @return int32 duration
*/
@@ -80,11 +80,11 @@ namespace LuaSpell
}
/**
* Returns the target destination coordinates of the &Spell.
* Returns the target destination coordinates of the [Spell].
*
* @return float x : x coordinate of the &Spell
* @return float y : y coordinate of the &Spell
* @return float z : z coordinate of the &Spell
* @return float x : x coordinate of the [Spell]
* @return float y : y coordinate of the [Spell]
* @return float z : z coordinate of the [Spell]
*/
int GetTargetDest(lua_State* L, Spell* spell)
{
@@ -106,10 +106,10 @@ namespace LuaSpell
}
/**
* Returns the target &Object of the &Spell.
* Target can be any of the following &Object types: &Player, &Creature, &GameObject, &Item, &Corpse
* Returns the target [Object] of the [Spell].
* Target can be any of the following [Object] types: [Player], [Creature], [GameObject], [Item], [Corpse]
*
* @return &Object target
* @return [Object] target
*/
int GetTarget(lua_State* L, Spell* spell)
{
@@ -138,7 +138,7 @@ namespace LuaSpell
}
/**
* Sets the &Spell to automatically repeat.
* Sets the [Spell] to automatically repeat.
*
* @param bool repeat : set variable to 'true' for spell to automatically repeat
*/
@@ -150,7 +150,7 @@ namespace LuaSpell
}
/**
* Casts the &Spell.
* Casts the [Spell].
*
* May need further documentation.
*/
@@ -162,7 +162,7 @@ namespace LuaSpell
}
/**
* Cancels the &Spell.
* Cancels the [Spell].
*
* May need further documentation.
*/
@@ -173,7 +173,7 @@ namespace LuaSpell
}
/**
* Finishes the &Spell.
* Finishes the [Spell].
*
* May need further documentation.
*/

View File

@@ -1362,16 +1362,16 @@ namespace LuaUnit
}
/**
* Casts the spell at target with modified basepoints or casters.
* See also &Unit:CastSpell
* Casts the [Spell] at target [Unit] with modified basepoints or casters.
* See also [Unit:CastSpell].
*
* @param &Unit target
* @param [Unit] target
* @param uint32 spell
* @param bool triggered = false
* @param int32 bp0 = nil : modifier for the base points of the spell. If left as nil, no change is made
* @param int32 bp1 = nil : modifier for the base points of the spell. If left as nil, no change is made
* @param int32 bp2 = nil : modifier for the base points of the spell. If left as nil, no change is made
* @param &Item castItem = nil
* @param int32 bp0 = nil : modifier for the base points of the [Spell]. If left as nil, no change is made
* @param int32 bp1 = nil : modifier for the base points of the [Spell]. If left as nil, no change is made
* @param int32 bp2 = nil : modifier for the base points of the [Spell]. If left as nil, no change is made
* @param [Item] castItem = nil
* @param uint64 originalCaster = 0
*/
int CastCustomSpell(lua_State* L, Unit* unit)
@@ -1379,11 +1379,11 @@ namespace LuaUnit
Unit* target = Eluna::CHECKOBJ<Unit>(L, 2);
uint32 spell = Eluna::CHECKVAL<uint32>(L, 3);
bool triggered = Eluna::CHECKVAL<bool>(L, 4, false);
bool has_bp0 = lua_isnoneornil(L, 5);
bool has_bp0 = !lua_isnoneornil(L, 5);
int32 bp0 = Eluna::CHECKVAL<int32>(L, 5, 0);
bool has_bp1 = lua_isnoneornil(L, 6);
bool has_bp1 = !lua_isnoneornil(L, 6);
int32 bp1 = Eluna::CHECKVAL<int32>(L, 6, 0);
bool has_bp2 = lua_isnoneornil(L, 7);
bool has_bp2 = !lua_isnoneornil(L, 7);
int32 bp2 = Eluna::CHECKVAL<int32>(L, 7, 0);
Item* castItem = Eluna::CHECKOBJ<Item>(L, 8, false);
uint64 originalCaster = Eluna::CHECKVAL<uint64>(L, 9, 0);
@@ -1620,7 +1620,7 @@ namespace LuaUnit
}
/**
* Adds threat to the &Unit from the victim.
* Adds threat to the [Unit] from the victim.
*
* <pre>
* enum SpellSchoolMask
@@ -1636,9 +1636,9 @@ namespace LuaUnit
* }
* </pre>
*
* @param &Unit victim : &Unit that caused the threat
* @param [Unit] victim : [Unit] that caused the threat
* @param float threat : threat amount
* @param SpellSchoolMask schoolMask = 0 : spell school mask of the threat causer
* @param [SpellSchoolMask] schoolMask = 0 : [SpellSchoolMask] of the threat causer
* @param uint32 spell = 0 : spell entry used for threat
*/
int AddThreat(lua_State* L, Unit* unit)

View File

@@ -10,7 +10,7 @@
namespace LuaWeather
{
/**
* Returns the zone id of the &Weather
* Returns the zone id of the [Weather]
*
* @return uint32 zoneId
*/
@@ -21,7 +21,7 @@ namespace LuaWeather
}
/**
* Sets the &Weather type based on &WeatherType and grade supplied.
* Sets the [Weather] type based on [WeatherType] and grade supplied.
*
* <pre>
* enum WeatherType
@@ -35,8 +35,8 @@ namespace LuaWeather
* };
* </pre>
*
* @param WeatherType type : the &WeatherType, see above available weather types
* @param float grade : the intensity/grade of the &Weather, ranges from 0 to 1
* @param WeatherType type : the [WeatherType], see above available weather types
* @param float grade : the intensity/grade of the [Weather], ranges from 0 to 1
*/
int SetWeather(lua_State* L, Weather* weather)
{
@@ -48,9 +48,9 @@ namespace LuaWeather
}
/**
* Sends a &Weather update to the &Player supplied.
* Sends a [Weather] update to the [Player] supplied.
*
* @param &Player player
* @param [Player] player
*/
int SendWeatherUpdateToPlayer(lua_State* L, Weather* weather)
{
@@ -61,14 +61,14 @@ namespace LuaWeather
}
/**
* Regenerates the &Weather, causing it to change based on the below statistics.
* Regenerates the [Weather], causing it to change based on the below statistics.
*
* * 30% chance of no change
* * 30% chance of &Weather getting better (if not fine) or changing &Weather type
* * 30% chance of &Weather getting worse (if not fine)
* * 30% chance of [Weather] getting better (if not fine) or changing [Weather] type
* * 30% chance of [Weather] getting worse (if not fine)
* * 10% chance of radical change (if not fine)
*
* @return bool changed : returns 'true' if &Weather changed
* @return bool changed : returns 'true' if [Weather] changed
*/
int Regenerate(lua_State* L, Weather* weather)
{
@@ -77,9 +77,9 @@ namespace LuaWeather
}
/**
* Sends a &Weather update to the all &Player in the zone.
* Sends a [Weather] update to the all [Player] in the zone.
*
* @param bool changed : returns 'true' if weather changed for any &Player in the zone, 'false' if no &Player is within the zone
* @param bool changed : returns 'true' if weather changed for any [Player] in the zone, 'false' if no [Player] is within the zone
*/
int UpdateWeather(lua_State* L, Weather* weather)
{

View File

@@ -10,10 +10,10 @@
namespace LuaWorldObject
{
/**
* Returns the name of the &WorldObject
*
* @return string name
*/
* Returns the name of the [WorldObject]
*
* @return string name
*/
int GetName(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetName());
@@ -21,10 +21,10 @@ namespace LuaWorldObject
}
/**
* Returns the current &Map object of the &WorldObject
*
* @return &Map mapObject
*/
* Returns the current [Map] object of the [WorldObject]
*
* @return [Map] mapObject
*/
int GetMap(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetMap());
@@ -33,10 +33,10 @@ namespace LuaWorldObject
#if (!defined(TBC) && !defined(CLASSIC))
/**
* Returns the current phase of the &WorldObject
*
* @return uint32 phase
*/
* Returns the current phase of the [WorldObject]
*
* @return uint32 phase
*/
int GetPhaseMask(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetPhaseMask());
@@ -45,10 +45,10 @@ namespace LuaWorldObject
#endif
/**
* Returns the current instance ID of the &WorldObject
*
* @return uint32 instanceId
*/
* Returns the current instance ID of the [WorldObject]
*
* @return uint32 instanceId
*/
int GetInstanceId(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetInstanceId());
@@ -56,10 +56,10 @@ namespace LuaWorldObject
}
/**
* Returns the current area ID of the &WorldObject
*
* @return uint32 areaId
*/
* Returns the current area ID of the [WorldObject]
*
* @return uint32 areaId
*/
int GetAreaId(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetAreaId());
@@ -67,10 +67,10 @@ namespace LuaWorldObject
}
/**
* Returns the current zone ID of the &WorldObject
*
* @return uint32 zoneId
*/
* Returns the current zone ID of the [WorldObject]
*
* @return uint32 zoneId
*/
int GetZoneId(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetZoneId());
@@ -78,10 +78,10 @@ namespace LuaWorldObject
}
/**
* Returns the current map ID of the &WorldObject
*
* @return uint32 mapId
*/
* Returns the current map ID of the [WorldObject]
*
* @return uint32 mapId
*/
int GetMapId(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetMapId());
@@ -89,10 +89,10 @@ namespace LuaWorldObject
}
/**
* Returns the current X coordinate of the &WorldObject
*
* @return float x
*/
* Returns the current X coordinate of the [WorldObject]
*
* @return float x
*/
int GetX(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetPositionX());
@@ -100,10 +100,10 @@ namespace LuaWorldObject
}
/**
* Returns the current Y coordinate of the &WorldObject
*
* @return float y
*/
* Returns the current Y coordinate of the [WorldObject]
*
* @return float y
*/
int GetY(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetPositionY());
@@ -111,10 +111,10 @@ namespace LuaWorldObject
}
/**
* Returns the current Z coordinate of the &WorldObject
*
* @return float z
*/
* Returns the current Z coordinate of the [WorldObject]
*
* @return float z
*/
int GetZ(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetPositionZ());
@@ -122,10 +122,10 @@ namespace LuaWorldObject
}
/**
* Returns the current orientation of the &WorldObject
*
* @return float orientation / facing
*/
* Returns the current orientation of the [WorldObject]
*
* @return float orientation / facing
*/
int GetO(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetOrientation());
@@ -133,13 +133,13 @@ namespace LuaWorldObject
}
/**
* Returns the coordinates and orientation of the &WorldObject
*
* @return float x : x coordinate of the &WorldObject
* @return float y : y coordinate of the &WorldObject
* @return float z : z coordinate (height) of the &WorldObject
* @return float o : facing / orientation of the &WorldObject
*/
* Returns the coordinates and orientation of the [WorldObject]
*
* @return float x : x coordinate of the [WorldObject]
* @return float y : y coordinate of the [WorldObject]
* @return float z : z coordinate (height) of the [WorldObject]
* @return float o : facing / orientation of the [WorldObject]
*/
int GetLocation(lua_State* L, WorldObject* obj)
{
Eluna::Push(L, obj->GetPositionX());
@@ -150,12 +150,12 @@ namespace LuaWorldObject
}
/**
* Returns the nearest &Player object in sight of the &WorldObject or within the given range
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
*
* @return &Player nearestPlayer
*/
* Returns the nearest [Player] object in sight of the [WorldObject] or within the given range
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
*
* @return [Player] nearestPlayer
*/
int GetNearestPlayer(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -175,13 +175,13 @@ namespace LuaWorldObject
}
/**
* Returns the nearest &GameObject object in sight of the &WorldObject or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of game object to find
*
* @return &GameObject nearestGameObject
*/
* Returns the nearest [GameObject] object in sight of the [WorldObject] or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of game object to find
*
* @return [GameObject] nearestGameObject
*/
int GetNearestGameObject(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -202,13 +202,13 @@ namespace LuaWorldObject
}
/**
* Returns the nearest &Creature object in sight of the &WorldObject or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of creature to find
*
* @return &Creature nearestCreature
*/
* Returns the nearest [Creature] object in sight of the [WorldObject] or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of creature to find
*
* @return [Creature] nearestCreature
*/
int GetNearestCreature(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -229,12 +229,12 @@ namespace LuaWorldObject
}
/**
* Returns a table of &Player objects in sight of the &WorldObject or within the given range
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
*
* @return table playersInRange : table of &Players
*/
* Returns a table of [Player] objects in sight of the [WorldObject] or within the given range
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
*
* @return table playersInRange : table of [Player]s
*/
int GetPlayersInRange(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -265,13 +265,13 @@ namespace LuaWorldObject
}
/**
* Returns a table of &Creature objects in sight of the &WorldObject or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of creatures to find
*
* @return table creaturesInRange : table of &Creatures
*/
* Returns a table of [Creature] objects in sight of the [WorldObject] or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of creatures to find
*
* @return table creaturesInRange : table of [Creature]s
*/
int GetCreaturesInRange(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -303,13 +303,13 @@ namespace LuaWorldObject
}
/**
* Returns a table of &GameObject objects in sight of the &WorldObject or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of game objects to find
*
* @return table gameObjectsInRange : table of &GameObjects
*/
* Returns a table of [GameObject] objects in sight of the [WorldObject] or within the given range and/or with a specific entry ID
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param uint32 entryId = 0 : optionally set entry ID of game objects to find
*
* @return table gameObjectsInRange : table of [GameObject]s
*/
int GetGameObjectsInRange(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -341,16 +341,16 @@ namespace LuaWorldObject
}
/**
* Returns nearest &WorldObject in sight of the &WorldObject.
* The distance, type, entry and hostility requirements the &WorldObject must match can be passed.
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param &TypeMask type = 0 : the &TypeMask that the &WorldObject must be. This can contain multiple types. 0 will be ingored
* @param uint32 entry = 0 : the entry of the &WorldObject, 0 will be ingored
* @param uint32 hostile = 0 : specifies whether the &WorldObject needs to be 1 hostile, 2 friendly or 0 either
*
* @return &WorldObject worldObject
*/
* Returns nearest [WorldObject] in sight of the [WorldObject].
* The distance, type, entry and hostility requirements the [WorldObject] must match can be passed.
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param [TypeMask] type = 0 : the [TypeMask] that the [WorldObject] must be. This can contain multiple types. 0 will be ingored
* @param uint32 entry = 0 : the entry of the [WorldObject], 0 will be ingored
* @param uint32 hostile = 0 : specifies whether the [WorldObject] needs to be 1 hostile, 2 friendly or 0 either
*
* @return [WorldObject] worldObject
*/
int GetNearObject(lua_State* L, WorldObject* obj)
{
float range = Eluna::CHECKVAL<float>(L, 2, SIZE_OF_GRIDS);
@@ -376,15 +376,15 @@ namespace LuaWorldObject
}
/**
* Returns a table of &WorldObjects in sight of the &WorldObject.
* The distance, type, entry and hostility requirements the &WorldObject must match can be passed.
* Returns a table of [WorldObject]s in sight of the [WorldObject].
* The distance, type, entry and hostility requirements the [WorldObject] must match can be passed.
*
* @param float range = 533.33333 : optionally set range. Default range is grid size
* @param &TypeMask type = 0 : the &TypeMask that the &WorldObject must be. This can contain multiple types. 0 will be ingored
* @param uint32 entry = 0 : the entry of the &WorldObject, 0 will be ingored
* @param uint32 hostile = 0 : specifies whether the &WorldObject needs to be 1 hostile, 2 friendly or 0 either
* @param [TypeMask] type = 0 : the [TypeMask] that the [WorldObject] must be. This can contain multiple types. 0 will be ingored
* @param uint32 entry = 0 : the entry of the [WorldObject], 0 will be ingored
* @param uint32 hostile = 0 : specifies whether the [WorldObject] needs to be 1 hostile, 2 friendly or 0 either
*
* @return table worldObjectList : table of &WorldObjects
* @return table worldObjectList : table of [WorldObject]s
*/
int GetNearObjects(lua_State* L, WorldObject* obj)
{
@@ -422,12 +422,12 @@ namespace LuaWorldObject
}
/**
* Returns a &WorldObject based on it's guid if it is spawned
*
* @param uint64 guid
*
* @return &WorldObject worldObject
*/
* Returns a [WorldObject] based on it's guid if it is spawned
*
* @param uint64 guid
*
* @return [WorldObject] worldObject
*/
int GetWorldObject(lua_State* L, WorldObject* obj)
{
uint64 guid = Eluna::CHECKVAL<uint64>(L, 2);
@@ -461,18 +461,18 @@ namespace LuaWorldObject
}
/**
* Returns the distance from this &WorldObject to another &WorldObject, or from this &WorldObject to a point.
*
* @proto dist = (obj)
* @proto dist = (x, y, z)
*
* @param &WorldObject obj
* @param float x : the X-coordinate of the point
* @param float y : the Y-coordinate of the point
* @param float z : the Z-coordinate of the point
*
* @return float dist : the distance in yards
*/
* Returns the distance from this [WorldObject] to another [WorldObject], or from this [WorldObject] to a point.
*
* @proto dist = (obj)
* @proto dist = (x, y, z)
*
* @param [WorldObject] obj
* @param float x : the X-coordinate of the point
* @param float y : the Y-coordinate of the point
* @param float z : the Z-coordinate of the point
*
* @return float dist : the distance in yards
*/
int GetDistance(lua_State* L, WorldObject* obj)
{
WorldObject* target = Eluna::CHECKOBJ<WorldObject>(L, 2, false);
@@ -489,12 +489,12 @@ namespace LuaWorldObject
}
/**
* Returns a point relative to the &WorldObject.
* With distance set to 1 and angle set to 0, this will return a point 1 yard in front of the &WorldObject
* Returns a point relative to the [WorldObject].
* With distance set to 1 and angle set to 0, this will return a point 1 yard in front of the [WorldObject]
*
* @param &WorldObject object
* @param float distance : specifies the distance of the point from the &WorldObject in yards
* @param float angle : specifies the angle of the point relative to the orientation / facing of the &WorldObject in radians
* @param [WorldObject] object
* @param float distance : specifies the distance of the point from the [WorldObject] in yards
* @param float angle : specifies the angle of the point relative to the orientation / facing of the [WorldObject] in radians
*
* @return float x
* @return float y
@@ -515,18 +515,18 @@ namespace LuaWorldObject
}
/**
* Returns the angle between this &WorldObject and another &WorldObject or a point.
* The angle is the angle between two points and orientation will be ignored.
*
* @proto dist = (obj)
* @proto dist = (x, y)
*
* @param &WorldObject object
* @param float x
* @param float y
*
* @return float angle : angle in radians in range 0..2*pi
*/
* Returns the angle between this [WorldObject] and another [WorldObject] or a point.
* The angle is the angle between two points and orientation will be ignored.
*
* @proto dist = (obj)
* @proto dist = (x, y)
*
* @param [WorldObject] object
* @param float x
* @param float y
*
* @return float angle : angle in radians in range 0..2*pi
*/
int GetAngle(lua_State* L, WorldObject* obj)
{
WorldObject* target = Eluna::CHECKOBJ<WorldObject>(L, 2, false);
@@ -543,10 +543,10 @@ namespace LuaWorldObject
}
/**
* Sends a &WorldPacket to &Players in sight of the &WorldObject.
*
* @param &WorldPacket packet
*/
* Sends a [WorldPacket] to [Player]s in sight of the [WorldObject].
*
* @param [WorldPacket] packet
*/
int SendPacket(lua_State* L, WorldObject* obj)
{
WorldPacket* data = Eluna::CHECKOBJ<WorldPacket>(L, 2);
@@ -555,16 +555,16 @@ namespace LuaWorldObject
}
/**
* Spawns a &GameObject at specified location.
*
* @param uint32 entry : &GameObject entry ID
* @param float x
* @param float y
* @param float z
* @param float o
* @param uint32 respawnDelay = 30 : respawn time in seconds
* @return &GameObject gameObject
*/
* Spawns a [GameObject] at specified location.
*
* @param uint32 entry : [GameObject] entry ID
* @param float x
* @param float y
* @param float z
* @param float o
* @param uint32 respawnDelay = 30 : respawn time in seconds
* @return [GameObject] gameObject
*/
int SummonGameObject(lua_State* L, WorldObject* obj)
{
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);
@@ -582,17 +582,17 @@ namespace LuaWorldObject
}
/**
* Spawns the creature at specified location.
*
* @param uint32 entry : &Creature's entry ID
* @param float x
* @param float y
* @param float z
* @param float o
* @param TempSummonType spawnType : defines how and when the creature despawns
* @param uint32 despawnTimer : despawn time in seconds
* @return &Creature spawnedCreature
*/
* Spawns the creature at specified location.
*
* @param uint32 entry : [Creature]'s entry ID
* @param float x
* @param float y
* @param float z
* @param float o
* @param TempSummonType spawnType : defines how and when the creature despawns
* @param uint32 despawnTimer : despawn time in seconds
* @return [Creature] spawnedCreature
*/
int SpawnCreature(lua_State* L, WorldObject* obj)
{
uint32 entry = Eluna::CHECKVAL<uint32>(L, 2);

View File

@@ -10,7 +10,7 @@
namespace LuaPacket
{
/**
* Returns the opcode of the &WorldPacket.
* Returns the opcode of the [WorldPacket].
*
* @return uint16 opcode
*/
@@ -21,9 +21,9 @@ namespace LuaPacket
}
/**
* Returns the size of the &WorldPacket.
* Returns the size of the [WorldPacket].
*
* @return uint32 size : size of &WorldPacket
* @return uint32 size : size of [WorldPacket]
*/
int GetSize(lua_State* L, WorldPacket* packet)
{
@@ -32,9 +32,9 @@ namespace LuaPacket
}
/**
* Sets the opcode of the &WorldPacket by specifying an opcode.
* Sets the opcode of the [WorldPacket] by specifying an opcode.
*
* @param uint32 opcode : the opcode specified to be set for the &WorldPacket
* @param uint32 opcode : the opcode specified to be set for the [WorldPacket]
*/
int SetOpcode(lua_State* L, WorldPacket* packet)
{
@@ -46,7 +46,7 @@ namespace LuaPacket
}
/**
* Reads and returns an int8 value from the &WorldPacket.
* Reads and returns an int8 value from the [WorldPacket].
*
* @return int8 value
*/
@@ -59,7 +59,7 @@ namespace LuaPacket
}
/**
* Reads and returns a uint8 value from the &WorldPacket.
* Reads and returns a uint8 value from the [WorldPacket].
*
* @return uint8 value
*/
@@ -72,7 +72,7 @@ namespace LuaPacket
}
/**
* Reads and returns an int16 value from the &WorldPacket.
* Reads and returns an int16 value from the [WorldPacket].
*
* @return int16 value
*/
@@ -85,7 +85,7 @@ namespace LuaPacket
}
/**
* Reads and returns a uint16 value from the &WorldPacket.
* Reads and returns a uint16 value from the [WorldPacket].
*
* @return uint16 value
*/
@@ -98,7 +98,7 @@ namespace LuaPacket
}
/**
* Reads and returns an int32 value from the &WorldPacket.
* Reads and returns an int32 value from the [WorldPacket].
*
* @return int32 value
*/
@@ -111,7 +111,7 @@ namespace LuaPacket
}
/**
* Reads and returns a uint32 value from the &WorldPacket.
* Reads and returns a uint32 value from the [WorldPacket].
*
* @return uint32 value
*/
@@ -124,7 +124,7 @@ namespace LuaPacket
}
/**
* Reads and returns a float value from the &WorldPacket.
* Reads and returns a float value from the [WorldPacket].
*
* @return float value
*/
@@ -137,7 +137,7 @@ namespace LuaPacket
}
/**
* Reads and returns a double value from the &WorldPacket.
* Reads and returns a double value from the [WorldPacket].
*
* @return double value
*/
@@ -150,7 +150,7 @@ namespace LuaPacket
}
/**
* Reads and returns a uint64 value from the &WorldPacket.
* Reads and returns a uint64 value from the [WorldPacket].
*
* @return uint64 value : value returned as string
*/
@@ -163,7 +163,7 @@ namespace LuaPacket
}
/**
* Reads and returns a string value from the &WorldPacket.
* Reads and returns a string value from the [WorldPacket].
*
* @return string value
*/
@@ -176,9 +176,9 @@ namespace LuaPacket
}
/**
* Writes an uint64 value to the &WorldPacket.
* Writes an uint64 value to the [WorldPacket].
*
* @param uint64 value : the value to be written to the &WorldPacket
* @param uint64 value : the value to be written to the [WorldPacket]
*/
int WriteGUID(lua_State* L, WorldPacket* packet)
{
@@ -188,9 +188,9 @@ namespace LuaPacket
}
/**
* Writes a string to the &WorldPacket.
* Writes a string to the [WorldPacket].
*
* @param string value : the string to be written to the &WorldPacket
* @param string value : the string to be written to the [WorldPacket]
*/
int WriteString(lua_State* L, WorldPacket* packet)
{
@@ -200,9 +200,9 @@ namespace LuaPacket
}
/**
* Writes an int8 value to the &WorldPacket.
* Writes an int8 value to the [WorldPacket].
*
* @param int8 value : the int8 value to be written to the &WorldPacket
* @param int8 value : the int8 value to be written to the [WorldPacket]
*/
int WriteByte(lua_State* L, WorldPacket* packet)
{
@@ -212,9 +212,9 @@ namespace LuaPacket
}
/**
* Writes an uint8 value to the &WorldPacket.
* Writes an uint8 value to the [WorldPacket].
*
* @param uint8 value : the uint8 value to be written to the &WorldPacket
* @param uint8 value : the uint8 value to be written to the [WorldPacket]
*/
int WriteUByte(lua_State* L, WorldPacket* packet)
{
@@ -224,9 +224,9 @@ namespace LuaPacket
}
/**
* Writes an int16 value to the &WorldPacket.
* Writes an int16 value to the [WorldPacket].
*
* @param int16 value : the int16 value to be written to the &WorldPacket
* @param int16 value : the int16 value to be written to the [WorldPacket]
*/
int WriteShort(lua_State* L, WorldPacket* packet)
{
@@ -236,9 +236,9 @@ namespace LuaPacket
}
/**
* Writes an uint16 value to the &WorldPacket.
* Writes an uint16 value to the [WorldPacket].
*
* @param uint16 value : the uint16 value to be written to the &WorldPacket
* @param uint16 value : the uint16 value to be written to the [WorldPacket]
*/
int WriteUShort(lua_State* L, WorldPacket* packet)
{
@@ -248,9 +248,9 @@ namespace LuaPacket
}
/**
* Writes an int32 value to the &WorldPacket.
* Writes an int32 value to the [WorldPacket].
*
* @param int32 value : the int32 value to be written to the &WorldPacket
* @param int32 value : the int32 value to be written to the [WorldPacket]
*/
int WriteLong(lua_State* L, WorldPacket* packet)
{
@@ -260,9 +260,9 @@ namespace LuaPacket
}
/**
* Writes an uint32 value to the &WorldPacket.
* Writes an uint32 value to the [WorldPacket].
*
* @param uint32 value : the uint32 value to be written to the &WorldPacket
* @param uint32 value : the uint32 value to be written to the [WorldPacket]
*/
int WriteULong(lua_State* L, WorldPacket* packet)
{
@@ -272,9 +272,9 @@ namespace LuaPacket
}
/**
* Writes a float value to the &WorldPacket.
* Writes a float value to the [WorldPacket].
*
* @param float value : the float value to be written to the &WorldPacket
* @param float value : the float value to be written to the [WorldPacket]
*/
int WriteFloat(lua_State* L, WorldPacket* packet)
{
@@ -284,9 +284,9 @@ namespace LuaPacket
}
/**
* Writes a double value to the &WorldPacket.
* Writes a double value to the [WorldPacket].
*
* @param double value : the double value to be written to the &WorldPacket
* @param double value : the double value to be written to the [WorldPacket]
*/
int WriteDouble(lua_State* L, WorldPacket* packet)
{

View File

@@ -84,17 +84,17 @@ if __name__ == '__main__':
method_names = []
for class_ in classes:
class_names.append('&amp;' + class_.name)
class_names.append('[' + class_.name + ']')
for method in class_.methods:
method_names.append('&amp;' + class_.name + ':' + method.name)
method_names.append('[' + class_.name + ':' + method.name + ']')
def link_parser(content):
# Replace all occurrencies of &Class:Function and then &Class with a link to given func or class
for name in method_names:
# Take the "amp;" off the front of the method's name.
full_name = name[len('&amp;'):]
# Take the [] off the front of the method's name.
full_name = name[1:-1]
# Split "Class:Method" into "Class" and "Method".
class_name, method_name = full_name.split(':')
url = '{}{}/{}.html'.format(('../' * level), class_name, method_name)
@@ -102,8 +102,8 @@ if __name__ == '__main__':
content = content.replace(name, '<a class="fn" href="{}">{}</a>'.format(url, full_name))
for name in class_names:
# Take the "&amp;" off the front of the class's name.
class_name = name[len('&amp;'):]
# Take the [] off the front of the class's name.
class_name = name[1:-1]
url = '{}{}/index.html'.format(('../' * level), class_name)
# Replace occurrencies of &Class:Method with the url created
content = content.replace(name, '<a class="mod" href="{}">{}</a>'.format(url, class_name))
@@ -128,7 +128,7 @@ if __name__ == '__main__':
# Otherwise try to build a link to the proper page.
if content in class_names:
class_name = content[len('&amp;'):]
class_name = content[1:-1]
url = '{}{}/index.html'.format(('../' * level), class_name)
return '<strong><a class="mod" href="{}">{}</a></strong>'.format(url, class_name)

View File

@@ -111,14 +111,14 @@ class ClassParser(object):
body_regex = re.compile(r"\s*\s?\*\s*(.*)") # The "body", i.e. a * and optionally some descriptive text.
# An extra optional space (\s?) was thrown in to make it different from `class_body_regex`.
param_regex = re.compile(r"""\s*\*\s@param\s # The @param tag starts with opt. whitespace followed by "* @param ".
([&\w]+)\s(\w+) # The data type, a space, and the name of the param.
(?:\s=\s(\w+))? # The default value: a = surrounded by spaces, followed by text.
(?:\s:\s(.+))? # The description: a colon surrounded by spaces, followed by text.
param_regex = re.compile(r"""\s*\*\s@param\s # The @param tag starts with opt. whitespace followed by "* @param ".
([\[\]\w]+)\s(\w+) # The data type, a space, and the name of the param.
(?:\s=\s(\w+))? # The default value: a = surrounded by spaces, followed by text.
(?:\s:\s(.+))? # The description: a colon surrounded by spaces, followed by text.
""", re.X)
# This is the same as the @param tag, minus the default value part.
return_regex = re.compile(r"""\s*\*\s@return\s
([&\w]+)\s(\w+)
([\[\]\w]+)\s(\w+)
(?:\s:\s(.+))?
""", re.X)
proto_regex = re.compile(r"""\s*\*\s@proto\s