Eluna: Add cod and money to sendmail, add missing spawn types for mangos and tc for SpawnCreature

This commit is contained in:
Rochet2
2014-09-14 00:32:25 +03:00
parent 9add43bf2a
commit d9ff37d78d
4 changed files with 56 additions and 1 deletions

View File

@@ -605,6 +605,31 @@ namespace LuaCreature
return 4;
}
/**
* Sets the position the [Creature] returns to when evading from combat
* or respawning.
*
* @param float x
* @param float y
* @param float z
* @param float o
*/
int SetHomePosition(lua_State* L, Creature* creature)
{
float x = Eluna::CHECKVAL<float>(L, 2);
float y = Eluna::CHECKVAL<float>(L, 3);
float z = Eluna::CHECKVAL<float>(L, 4);
float o = Eluna::CHECKVAL<float>(L, 5);
#ifndef TRINITY
creature->SetRespawnCoord(x, y, z, o);
#else
creature->SetHomePosition(x, y, z, o);
#endif
return 0;
}
/**
* Returns a target from the [Creature]'s threat list based on the
* supplied arguments.