Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/maps/scripts/WonderVictory.js
Trigger.prototype.IsNormalWonder = function(entity) | |||||
{ | |||||
return Engine.QueryInterface(entity, IID_Wonder) && | |||||
!Engine.QueryInterface(entity, IID_CaptureTheWonder); | |||||
}; | |||||
Trigger.prototype.WonderVictoryEntityRenamed = function(data) | Trigger.prototype.WonderVictoryEntityRenamed = function(data) | ||||
{ | { | ||||
if (this.wonderVictoryMessages[data.entity] && Engine.QueryInterface(data.newentity, IID_Wonder)) | if (this.wonderVictoryMessages[data.entity] && this.IsNormalWonder(data.newentity)) | ||||
{ | { | ||||
// When an entity is renamed, we first create a new entity, | // When an entity is renamed, we first create a new entity, | ||||
// which in case it is a wonder will receive a timer. | // which in case it is a wonder will receive a timer. | ||||
Context not available. | |||||
Trigger.prototype.WonderVictoryOwnershipChanged = function(data) | Trigger.prototype.WonderVictoryOwnershipChanged = function(data) | ||||
{ | { | ||||
if (!Engine.QueryInterface(data.entity, IID_Wonder)) | if (!this.IsNormalWonder(data.entity)) | ||||
return; | return; | ||||
this.WonderVictoryDeleteTimer(data.entity); | this.WonderVictoryDeleteTimer(data.entity); | ||||
Context not available. |
Wildfire Games · Phabricator