Core/Phases: some cleanup

- implemented CopyPhaseFrom(obj)
This commit is contained in:
Rat committed 2014-10-30 13:35:12 +01:00
1 parent 4fab55d703
commit 5993b946c9
16 files changed
+43 -59

No files matched your search

+4 -8
View File
@@ -680,8 +680,7 @@ public:
return false;
}
for (auto phase : chr->GetPhases())
wpCreature2->SetInPhase(phase, false, true);
wpCreature2->CopyPhaseFrom(chr);
wpCreature2->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
// To call _LoadGoods(); _LoadQuests(); CreateTrainerSpells();
@@ -899,8 +898,7 @@ public:
return false;
}
for (auto phase : chr->GetPhases())
wpCreature->SetInPhase(phase, false, true);
wpCreature->CopyPhaseFrom(chr);
// Set "wpguid" column to the visual waypoint
stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_WAYPOINT_DATA_WPGUID);
@@ -964,8 +962,7 @@ public:
return false;
}
for (auto phase : chr->GetPhases())
creature->SetInPhase(phase, false, true);
creature->CopyPhaseFrom(chr);
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
if (!creature->LoadCreatureFromDB(creature->GetDBTableGUIDLow(), map))
@@ -1016,8 +1013,7 @@ public:
return false;
}
for (auto phase : chr->GetPhases())
creature->SetInPhase(phase, false, true);
creature->CopyPhaseFrom(chr);
creature->SaveToDB(map->GetId(), (1 << map->GetSpawnMode()), chr->GetPhaseMask());
if (!creature->LoadCreatureFromDB(creature->GetDBTableGUIDLow(), map))