mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 05:21:29 +00:00
[Bug Fix] Fix AddCrystals() in Perl/Lua (#4445)
This commit is contained in:
parent
6296ed6d41
commit
f475cecdb1
@ -1214,25 +1214,23 @@ void Lua_Client::AddPVPPoints(uint32 points) {
|
|||||||
self->AddPVPPoints(points);
|
self->AddPVPPoints(points);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Lua_Client::AddCrystals(uint32 radiant, uint32 ebon) {
|
void Lua_Client::AddCrystals(uint32 radiant_count, uint32 ebon_count) {
|
||||||
Lua_Safe_Call_Void();
|
Lua_Safe_Call_Void();
|
||||||
|
|
||||||
if (ebon != 0) {
|
if (ebon_count != 0) {
|
||||||
if (ebon > 0) {
|
if (ebon_count > 0) {
|
||||||
self->AddEbonCrystals(ebon);
|
self->AddEbonCrystals(ebon_count);
|
||||||
return;
|
} else {
|
||||||
|
self->RemoveEbonCrystals(ebon_count);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self->RemoveEbonCrystals(ebon);
|
if (radiant_count != 0) {
|
||||||
|
if (radiant_count > 0) {
|
||||||
|
self->AddRadiantCrystals(radiant_count);
|
||||||
|
} else {
|
||||||
|
self->RemoveRadiantCrystals(radiant_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (radiant != 0) {
|
|
||||||
if (radiant > 0) {
|
|
||||||
self->AddRadiantCrystals(radiant);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
self->RemoveRadiantCrystals(radiant);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -316,7 +316,7 @@ public:
|
|||||||
void KeyRingAdd(uint32 item);
|
void KeyRingAdd(uint32 item);
|
||||||
bool KeyRingCheck(uint32 item);
|
bool KeyRingCheck(uint32 item);
|
||||||
void AddPVPPoints(uint32 points);
|
void AddPVPPoints(uint32 points);
|
||||||
void AddCrystals(uint32 radiant, uint32 ebon);
|
void AddCrystals(uint32 radiant_count, uint32 ebon_count);
|
||||||
void SetEbonCrystals(uint32 value);
|
void SetEbonCrystals(uint32 value);
|
||||||
void SetRadiantCrystals(uint32 value);
|
void SetRadiantCrystals(uint32 value);
|
||||||
uint32 GetPVPPoints();
|
uint32 GetPVPPoints();
|
||||||
|
|||||||
@ -1162,20 +1162,18 @@ void Perl_Client_AddCrystals(Client* self, uint32 radiant_count, uint32 ebon_cou
|
|||||||
if (ebon_count != 0) {
|
if (ebon_count != 0) {
|
||||||
if (ebon_count > 0) {
|
if (ebon_count > 0) {
|
||||||
self->AddEbonCrystals(ebon_count);
|
self->AddEbonCrystals(ebon_count);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
self->RemoveEbonCrystals(ebon_count);
|
self->RemoveEbonCrystals(ebon_count);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (radiant_count != 0) {
|
if (radiant_count != 0) {
|
||||||
if (radiant_count > 0) {
|
if (radiant_count > 0) {
|
||||||
self->AddRadiantCrystals(radiant_count);
|
self->AddRadiantCrystals(radiant_count);
|
||||||
return;
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
self->RemoveRadiantCrystals(radiant_count);
|
self->RemoveRadiantCrystals(radiant_count);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Perl_Client_SetEbonCrystals(Client* self, uint32 value)
|
void Perl_Client_SetEbonCrystals(Client* self, uint32 value)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user