mahlendur/_work/Data/Scripts/Content/Spine/Spine_Friends.d
Daniel Heße 892a40ff0f Initial commit with Subversion-codebase from 13/05/2022.
Cleaned up the mess, at this time, only viable data get synced (_work directory for Gothic-data, miranda for mdc-scripts.
Need to symlink files to a working directory.
2022-05-13 17:38:52 +02:00

27 lines
916 B
D

var int Spine_GetFriendCountFunc;
var int Spine_GetFriendNameFunc;
// returns the amount of friends the current player has
// will be 0 when offline, no account or no friends are found
func int Spine_GetFriendCount() {
if (Spine_Initialized && Spine_GetFriendCountFunc) {
CALL__cdecl(Spine_GetFriendCountFunc);
return CALL_RetValAsInt();
};
return 0;
};
// returns the name of a friend
// index specifies the index in the friend list which will be ordered alphabetically
// index has to be in range [0;Spine_GetFriendCount() - 1]
func string Spine_GetFriendName(var int index) {
if (Spine_Initialized && Spine_GetFriendNameFunc) {
const string STR_BUFFER = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
CALL_cStringPtrParam(STR_BUFFER);
CALL_IntParam(index);
CALL__cdecl(Spine_GetFriendNameFunc);
return STR_BUFFER;
};
return "";
};