mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Maps: Add override to allow InstanceMap const* -> InstanceScript const*.
Also tighten const-ness on CanSpawn method of CreatureScript.
This commit is contained in:
@@ -768,6 +768,7 @@ class TC_GAME_API InstanceMap : public Map
|
||||
bool Reset(uint8 method);
|
||||
uint32 GetScriptId() const { return i_script_id; }
|
||||
InstanceScript* GetInstanceScript() { return i_data; }
|
||||
InstanceScript const* GetInstanceScript() const { return i_data; }
|
||||
void PermBindAllPlayers(Player* source);
|
||||
void UnloadAll() override;
|
||||
EnterState CannotEnter(Player* player) override;
|
||||
|
||||
@@ -435,7 +435,7 @@ class TC_GAME_API CreatureScript : public UnitScript, public UpdatableScript<Cre
|
||||
virtual uint32 GetDialogStatus(Player* /*player*/, Creature* /*creature*/) { return DIALOG_STATUS_SCRIPTED_NO_STATUS; }
|
||||
|
||||
// Called when the creature tries to spawn. Return false to block spawn and re-evaluate on next tick.
|
||||
virtual bool CanSpawn(ObjectGuid::LowType /*spawnId*/, CreatureTemplate const* /*cTemplate*/, CreatureData const* /*cData*/, Map const* /*map*/) { return true; }
|
||||
virtual bool CanSpawn(ObjectGuid::LowType /*spawnId*/, CreatureTemplate const* /*cTemplate*/, CreatureData const* /*cData*/, Map const* /*map*/) const { return true; }
|
||||
|
||||
// Called when a CreatureAI object is needed for the creature.
|
||||
virtual CreatureAI* GetAI(Creature* /*creature*/) const { return NULL; }
|
||||
|
||||
Reference in New Issue
Block a user