Core/OutdoorPvP: refactor using Position and Quat to pack parameters

- Moved statics to cpp
- Save scriptids into an array
This commit is contained in:
ariel-
2017-06-11 16:41:11 -03:00
parent c210b93594
commit 3e7b64b2f7
20 changed files with 431 additions and 494 deletions

View File

@@ -1607,11 +1607,9 @@ Battleground* ScriptMgr::CreateBattleground(BattlegroundTypeId /*typeId*/)
return NULL;
}
OutdoorPvP* ScriptMgr::CreateOutdoorPvP(OutdoorPvPData const* data)
OutdoorPvP* ScriptMgr::CreateOutdoorPvP(uint32 scriptId)
{
ASSERT(data);
GET_SCRIPT_RET(OutdoorPvPScript, data->ScriptId, tmpscript, NULL);
GET_SCRIPT_RET(OutdoorPvPScript, scriptId, tmpscript, NULL);
return tmpscript->GetOutdoorPvP();
}

View File

@@ -71,7 +71,6 @@ struct Condition;
struct CreatureTemplate;
struct CreatureData;
struct ItemTemplate;
struct OutdoorPvPData;
#define VISIBLE_RANGE 166.0f //MAX visible range (size of grid)
@@ -919,7 +918,7 @@ class TC_GAME_API ScriptMgr
public: /* OutdoorPvPScript */
OutdoorPvP* CreateOutdoorPvP(OutdoorPvPData const* data);
OutdoorPvP* CreateOutdoorPvP(uint32 scriptId);
public: /* CommandScript */