diff options
author | Shauren <shauren.trinity@gmail.com> | 2016-09-14 23:48:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2016-09-14 23:48:00 +0200 |
commit | debb734e1422b06b42b645eadeaf2c99f431e12d (patch) | |
tree | 6390250aef5f5658dad24d0085da4900b4c7f75a /src/server/game/Garrison/Garrison.cpp | |
parent | 0c113b8731dc397f4ad30d375fd8be5f180d5728 (diff) |
Core/Garrison: Add all garrison error codes
Diffstat (limited to 'src/server/game/Garrison/Garrison.cpp')
-rw-r--r-- | src/server/game/Garrison/Garrison.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/server/game/Garrison/Garrison.cpp b/src/server/game/Garrison/Garrison.cpp index 2e14b55d30b..c2b5bd354d5 100644 --- a/src/server/game/Garrison/Garrison.cpp +++ b/src/server/game/Garrison/Garrison.cpp @@ -346,7 +346,7 @@ void Garrison::LearnBlueprint(uint32 garrBuildingId) if (!sGarrBuildingStore.LookupEntry(garrBuildingId)) learnBlueprintResult.Result = GARRISON_ERROR_INVALID_BUILDINGID; else if (_knownBuildings.count(garrBuildingId)) - learnBlueprintResult.Result = GARRISON_ERROR_BLUEPRINT_KNOWN; + learnBlueprintResult.Result = GARRISON_ERROR_BLUEPRINT_EXISTS; else _knownBuildings.insert(garrBuildingId); @@ -363,7 +363,7 @@ void Garrison::UnlearnBlueprint(uint32 garrBuildingId) if (!sGarrBuildingStore.LookupEntry(garrBuildingId)) unlearnBlueprintResult.Result = GARRISON_ERROR_INVALID_BUILDINGID; else if (!_knownBuildings.count(garrBuildingId)) - unlearnBlueprintResult.Result = GARRISON_ERROR_BLUEPRINT_NOT_KNOWN; + unlearnBlueprintResult.Result = GARRISON_ERROR_REQUIRES_BLUEPRINT; else _knownBuildings.erase(garrBuildingId); @@ -497,7 +497,7 @@ void Garrison::AddFollower(uint32 garrFollowerId) GarrFollowerEntry const* followerEntry = sGarrFollowerStore.LookupEntry(garrFollowerId); if (_followerIds.count(garrFollowerId) || !followerEntry) { - addFollowerResult.Result = GARRISON_GENERIC_UNKNOWN_ERROR; + addFollowerResult.Result = GARRISON_ERROR_FOLLOWER_EXISTS; _owner->SendDirectMessage(addFollowerResult.Write()); return; } @@ -609,7 +609,7 @@ GarrisonError Garrison::CheckBuildingPlacement(uint32 garrPlotInstanceId, uint32 GarrPlotInstanceEntry const* plotInstance = sGarrPlotInstanceStore.LookupEntry(garrPlotInstanceId); Plot const* plot = GetPlot(garrPlotInstanceId); if (!plotInstance || !plot) - return GARRISON_ERROR_INVALID_PLOT; + return GARRISON_ERROR_INVALID_PLOT_INSTANCEID; GarrBuildingEntry const* building = sGarrBuildingStore.LookupEntry(garrBuildingId); if (!building) @@ -625,7 +625,7 @@ GarrisonError Garrison::CheckBuildingPlacement(uint32 garrPlotInstanceId, uint32 if (building->Flags & GARRISON_BUILDING_FLAG_NEEDS_PLAN) { if (!_knownBuildings.count(garrBuildingId)) - return GARRISON_ERROR_BLUEPRINT_NOT_KNOWN; + return GARRISON_ERROR_REQUIRES_BLUEPRINT; } else // Building is built as a quest reward return GARRISON_ERROR_INVALID_BUILDINGID; @@ -661,7 +661,7 @@ GarrisonError Garrison::CheckBuildingRemoval(uint32 garrPlotInstanceId) const { Plot const* plot = GetPlot(garrPlotInstanceId); if (!plot) - return GARRISON_ERROR_INVALID_PLOT; + return GARRISON_ERROR_INVALID_PLOT_INSTANCEID; if (!plot->BuildingInfo.PacketInfo) return GARRISON_ERROR_NO_BUILDING; |