Core/SAI: Added new parameter to actions 90 and 91
Allows to set and remove all possible bytes1 based on `type` parameter You can see them listed in Unit.h for reference
This commit is contained in:
@@ -1782,7 +1782,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
break;
|
break;
|
||||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||||
if (IsUnit(*itr))
|
if (IsUnit(*itr))
|
||||||
(*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.setunitByte.byte1);
|
(*itr)->ToUnit()->SetByteFlag(UNIT_FIELD_BYTES_1, e.action.setunitByte.type, e.action.setunitByte.byte1);
|
||||||
|
|
||||||
delete targets;
|
delete targets;
|
||||||
break;
|
break;
|
||||||
@@ -1795,7 +1795,7 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
|
|||||||
|
|
||||||
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
for (ObjectList::const_iterator itr = targets->begin(); itr != targets->end(); ++itr)
|
||||||
if (IsUnit(*itr))
|
if (IsUnit(*itr))
|
||||||
(*itr)->ToUnit()->RemoveByteFlag(UNIT_FIELD_BYTES_1, 0, e.action.delunitByte.byte1);
|
(*itr)->ToUnit()->RemoveByteFlag(UNIT_FIELD_BYTES_1, e.action.delunitByte.type, e.action.delunitByte.byte1);
|
||||||
|
|
||||||
delete targets;
|
delete targets;
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -827,11 +827,13 @@ struct SmartAction
|
|||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 byte1;
|
uint32 byte1;
|
||||||
|
uint32 type;
|
||||||
} setunitByte;
|
} setunitByte;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint32 byte1;
|
uint32 byte1;
|
||||||
|
uint32 type;
|
||||||
} delunitByte;
|
} delunitByte;
|
||||||
|
|
||||||
struct
|
struct
|
||||||
|
|||||||
Reference in New Issue
Block a user